History

lavc/snowenc: Expose an option to set the rc_eq expression

Snow uses the ratecontrol module, but does not expose a way to set the rc_eq expression. The default expression, set in the ratecontrol module, will always be used. Make it possible to set rc_eq by adding an AVOption to snowenc. The option definition is mostly a copy from the mpegvideo common options definition of rc_eq (libavcodec/mpegvideo.h), with some minor style adjustments to be closer to the other snowenc option initializer expressions.

Alexander Strasser committed 6 years ago

Commit b40dd2f1 parent ecd71911 file · +5 −0Browse files

Unified · Split

libavcodec/snowenc.c+5−0
@@ -1948,6 +1948,11 @@ static const AVOption options[] = { · 1947 unmodified lines
19481948 { "pred", "Spatial decomposition type", OFFSET(pred), AV_OPT_TYPE_INT, { .i64 = 0 }, DWT_97, DWT_53, VE, "pred" },
19491949 { "dwt97", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "pred" },
19501950 { "dwt53", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, INT_MIN, INT_MAX, VE, "pred" },
1951+ { "rc_eq", "Set rate control equation. When computing the expression, besides the standard functions "
1952+ "defined in the section 'Expression Evaluation', the following functions are available: "
1953+ "bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv "
1954+ "fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex.",
1955+ OFFSET(m.rc_eq), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, VE },
19511956 { NULL },
19521957 };
19531958

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t