-
Notifications
You must be signed in to change notification settings - Fork 15
New libvpx version #82
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,14 +48,15 @@ cd $WORKDIR/third_party | |
| build_vpxenc() { | ||
| # Build the vpxenc and vpxdec binaries | ||
| if [ ! -d libvpx ]; then | ||
| git clone http://git.chromium.org/webm/libvpx.git | ||
| git clone https://chromium.googlesource.com/webm/libvpx | ||
| fi | ||
| cd libvpx | ||
| # Ensure we check out exactly a consistent version. | ||
| git checkout -f master | ||
| #git checkout v1.3.0 | ||
| # Check out the Oct 20 2014 version of libvpx. | ||
| git checkout 9c98fb2bab6125a0614576bf7635981163b1cc79 | ||
| # git checkout 9c98fb2bab6125a0614576bf7635981163b1cc79 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about cleaning up these comments and commented out lines? |
||
| git checkout v1.6.0 | ||
| ./configure | ||
| # Leftovers from previous compilations may be troublesome. | ||
| make clean | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,10 +29,12 @@ def __init__(self, name='vp9'): | |
| super(Vp9Codec, self).__init__(name) | ||
| self.extension = 'webm' | ||
| self.option_set = encoder.OptionSet( | ||
| encoder.IntegerOption('cpu-used', 0, 16), | ||
| encoder.IntegerOption('cpu-used', 0, 8), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this cpu-used change mean? The description in http://www.webmproject.org/docs/encoder-parameters/ seems a bit cryptic to me. Which is fancy words for that I don't understand it. :-)
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They used to use the range 9..16 for experimental speedups. Now I think they use -8..-1 for the same purpose. I've cut off the upper numbers (which will invalidate the parameter sets that use those numbers). |
||
| # The "best" option gives encodes that are too slow to be useful. | ||
| encoder.ChoiceOption(['good', 'rt']).Mandatory(), | ||
| encoder.IntegerOption('passes', 1, 2), | ||
| encoder.IntegerOption('aq-mode', 0, 4), | ||
| encoder.Option('end-usage', ['cbr', 'vbr', 'cq', 'q']), | ||
| ) | ||
|
|
||
| def StartEncoder(self, context): | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,10 +37,10 @@ Change-Id: Ic0000f50d5edf6351dad4ed0d398f7a88922bece | |
| 5 files changed, 53 insertions(+), 5 deletions(-) | ||
|
|
||
| diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c | ||
| index 3cceb5a..c737d3c 100644 | ||
| index d5a0fff..4487ab4 100644 | ||
| --- a/vp8/encoder/onyx_if.c | ||
| +++ b/vp8/encoder/onyx_if.c | ||
| @@ -1578,7 +1578,8 @@ void vp8_change_config(VP8_COMP *cpi, VP8_CONFIG *oxcf) | ||
| @@ -1615,7 +1615,8 @@ void vp8_change_config(VP8_COMP *cpi, VP8_CONFIG *oxcf) | ||
| if (oxcf->worst_allowed_q < 0) | ||
| cpi->oxcf.fixed_q = q_trans[0]; | ||
| else | ||
|
|
@@ -51,12 +51,12 @@ index 3cceb5a..c737d3c 100644 | |
| if (oxcf->alt_q < 0) | ||
| cpi->oxcf.alt_q = q_trans[0]; | ||
| diff --git a/vp8/vp8_cx_iface.c b/vp8/vp8_cx_iface.c | ||
| index b1b079c..b6bef48 100644 | ||
| index 22a82b7..0c75011 100644 | ||
| --- a/vp8/vp8_cx_iface.c | ||
| +++ b/vp8/vp8_cx_iface.c | ||
| @@ -132,8 +132,19 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx, | ||
| @@ -139,8 +139,19 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx, | ||
| RANGE_CHECK(cfg, g_timebase.den, 1, 1000000000); | ||
| RANGE_CHECK(cfg, g_timebase.num, 1, cfg->g_timebase.den); | ||
| RANGE_CHECK(cfg, g_timebase.num, 1, 1000000000); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this change?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All the changes in vp8_fixed_q.patch are made by:
So this shouldn't be a change that I wrote, it should be a change from 1.3 to 1.6 in the file being patched. But I need to read the file really carefully to be sure that's the case! |
||
| RANGE_CHECK_HI(cfg, g_profile, 3); | ||
| - RANGE_CHECK_HI(cfg, rc_max_quantizer, 63); | ||
| - RANGE_CHECK_HI(cfg, rc_min_quantizer, cfg->rc_max_quantizer); | ||
|
|
@@ -76,7 +76,7 @@ index b1b079c..b6bef48 100644 | |
| RANGE_CHECK_HI(cfg, g_threads, 64); | ||
| #if CONFIG_REALTIME_ONLY | ||
| RANGE_CHECK_HI(cfg, g_lag_in_frames, 0); | ||
| @@ -333,7 +344,11 @@ static vpx_codec_err_t set_vp8e_config(VP8_CONFIG *oxcf, | ||
| @@ -342,7 +353,11 @@ static vpx_codec_err_t set_vp8e_config(VP8_CONFIG *oxcf, | ||
| oxcf->best_allowed_q = cfg.rc_min_quantizer; | ||
| oxcf->worst_allowed_q = cfg.rc_max_quantizer; | ||
| oxcf->cq_level = vp8_cfg.cq_level; | ||
|
|
@@ -89,7 +89,7 @@ index b1b079c..b6bef48 100644 | |
|
|
||
| oxcf->under_shoot_pct = cfg.rc_undershoot_pct; | ||
| oxcf->over_shoot_pct = cfg.rc_overshoot_pct; | ||
| @@ -1271,6 +1286,10 @@ static vpx_codec_enc_cfg_map_t vp8e_usage_cfg_map[] = | ||
| @@ -1315,6 +1330,10 @@ static vpx_codec_enc_cfg_map_t vp8e_usage_cfg_map[] = | ||
| 256, /* rc_target_bandwidth */ | ||
| 4, /* rc_min_quantizer */ | ||
| 63, /* rc_max_quantizer */ | ||
|
|
@@ -101,10 +101,10 @@ index b1b079c..b6bef48 100644 | |
| 100, /* rc_overshoot_pct */ | ||
|
|
||
| diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c | ||
| index d3c2a13..7cb89b4 100644 | ||
| index 10d6893..03b84d6 100644 | ||
| --- a/vp9/vp9_cx_iface.c | ||
| +++ b/vp9/vp9_cx_iface.c | ||
| @@ -1344,6 +1344,12 @@ static vpx_codec_enc_cfg_map_t encoder_usage_cfg_map[] = { | ||
| @@ -1596,6 +1596,12 @@ static vpx_codec_enc_cfg_map_t encoder_usage_cfg_map[] = { | ||
| 256, // rc_target_bandwidth | ||
| 0, // rc_min_quantizer | ||
| 63, // rc_max_quantizer | ||
|
|
@@ -113,15 +113,15 @@ index d3c2a13..7cb89b4 100644 | |
| + -1, | ||
| + -1, | ||
| + -1, | ||
| + | ||
| 100, // rc_undershoot_pct | ||
| 100, // rc_overshoot_pct | ||
| + | ||
| 25, // rc_undershoot_pct | ||
| 25, // rc_overshoot_pct | ||
|
|
||
| diff --git a/vpx/vpx_encoder.h b/vpx/vpx_encoder.h | ||
| index 044243d..41a6b3c 100644 | ||
| index 955e873..c7939e4 100644 | ||
| --- a/vpx/vpx_encoder.h | ||
| +++ b/vpx/vpx_encoder.h | ||
| @@ -519,6 +519,11 @@ extern "C" { | ||
| @@ -538,6 +538,11 @@ extern "C" { | ||
| */ | ||
| unsigned int rc_max_quantizer; | ||
|
|
||
|
|
@@ -134,10 +134,10 @@ index 044243d..41a6b3c 100644 | |
| /* | ||
| * bitrate tolerance | ||
| diff --git a/vpxenc.c b/vpxenc.c | ||
| index 2b89fc1..b9364e6 100644 | ||
| index efcf064..d34ad7a 100644 | ||
| --- a/vpxenc.c | ||
| +++ b/vpxenc.c | ||
| @@ -282,6 +282,14 @@ static const arg_def_t min_quantizer = ARG_DEF( | ||
| @@ -284,6 +284,14 @@ static const arg_def_t min_quantizer = ARG_DEF( | ||
| NULL, "min-q", 1, "Minimum (best) quantizer"); | ||
| static const arg_def_t max_quantizer = ARG_DEF( | ||
| NULL, "max-q", 1, "Maximum (worst) quantizer"); | ||
|
|
@@ -152,7 +152,7 @@ index 2b89fc1..b9364e6 100644 | |
| static const arg_def_t undershoot_pct = ARG_DEF( | ||
| NULL, "undershoot-pct", 1, "Datarate undershoot (min) target (%)"); | ||
| static const arg_def_t overshoot_pct = ARG_DEF( | ||
| @@ -295,7 +303,8 @@ static const arg_def_t buf_optimal_sz = ARG_DEF( | ||
| @@ -297,7 +305,8 @@ static const arg_def_t buf_optimal_sz = ARG_DEF( | ||
| static const arg_def_t *rc_args[] = { | ||
| &dropframe_thresh, &resize_allowed, &resize_width, &resize_height, | ||
| &resize_up_thresh, &resize_down_thresh, &end_usage, &target_bitrate, | ||
|
|
@@ -162,7 +162,7 @@ index 2b89fc1..b9364e6 100644 | |
| &buf_initial_sz, &buf_optimal_sz, NULL | ||
| }; | ||
|
|
||
| @@ -1105,6 +1114,14 @@ static int parse_stream_params(struct VpxEncoderConfig *global, | ||
| @@ -1159,6 +1168,14 @@ static int parse_stream_params(struct VpxEncoderConfig *global, | ||
| config->cfg.rc_min_quantizer = arg_parse_uint(&arg); | ||
| } else if (arg_match(&arg, &max_quantizer, argi)) { | ||
| config->cfg.rc_max_quantizer = arg_parse_uint(&arg); | ||
|
|
@@ -177,6 +177,4 @@ index 2b89fc1..b9364e6 100644 | |
| } else if (arg_match(&arg, &undershoot_pct, argi)) { | ||
| config->cfg.rc_undershoot_pct = arg_parse_uint(&arg); | ||
| } else if (arg_match(&arg, &overshoot_pct, argi)) { | ||
| -- | ||
| 1.8.2.3 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again reminder to consider making this function testable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack.