ref: 81708cc326d256296026b70ae89468410a84ed41
parent: 771fc832f3889c067b76899c8209bd0854ba7f7d
author: John Koleszar <[email protected]>
date: Wed Mar 27 07:07:26 EDT 2013
Convert g_frame_parallel_decoding to control interface Restore ABI compatibility with the master branch. Change-Id: Ic57e7e1de09ab33bd37990e52a63ba7c8f1432a4
--- a/vp8/vp8_cx_iface.c
+++ b/vp8/vp8_cx_iface.c
@@ -1238,7 +1238,6 @@
{1, 30}, /* g_timebase */
0, /* g_error_resilient */
- 0, /* g_frame_parallel_decoding */
VPX_RC_ONE_PASS, /* g_pass */
--- a/vp9/vp9_cx_iface.c
+++ b/vp9/vp9_cx_iface.c
@@ -37,6 +37,7 @@
unsigned int cq_level; /* constrained quality level */
unsigned int rc_max_intra_bitrate_pct;
unsigned int lossless;
+ unsigned int frame_parallel_decoding_mode;
};
struct extraconfig_map {
@@ -64,6 +65,7 @@
10, /* cq_level */
0, /* rc_max_intra_bitrate_pct */
0, /* lossless */
+ 0, /* frame_parallel_decoding_mode */
}
}
};
@@ -313,7 +315,7 @@
oxcf->lossless = vp8_cfg.lossless;
oxcf->error_resilient_mode = cfg.g_error_resilient;
- oxcf->frame_parallel_decoding_mode = cfg.g_frame_parallel_decoding;
+ oxcf->frame_parallel_decoding_mode = vp8_cfg.frame_parallel_decoding_mode;
/*
printf("Current VP9 Settings: \n");
printf("target_bandwidth: %d\n", oxcf->target_bandwidth);
@@ -423,6 +425,7 @@
MAP(VP8E_SET_CQ_LEVEL, xcfg.cq_level);
MAP(VP8E_SET_MAX_INTRA_BITRATE_PCT, xcfg.rc_max_intra_bitrate_pct);
MAP(VP9E_SET_LOSSLESS, xcfg.lossless);
+ MAP(VP9E_SET_FRAME_PARALLEL_DECODING, xcfg.frame_parallel_decoding_mode);
}
res = validate_config(ctx, &ctx->cfg, &xcfg);
@@ -1096,7 +1099,6 @@
{1, 30}, /* g_timebase */
0, /* g_error_resilient */
- 0, /* g_frame_parallel_decoding */
VPX_RC_ONE_PASS, /* g_pass */
--- a/vpx/vp8cx.h
+++ b/vpx/vp8cx.h
@@ -190,6 +190,7 @@
VP9E_SET_LOSSLESS,
VP9E_SET_TILE_COLUMNS,
VP9E_SET_TILE_ROWS,
+ VP9E_SET_FRAME_PARALLEL_DECODING
};
/*!\brief vpx 1-D scaling mode
@@ -310,6 +311,7 @@
VPX_CTRL_USE_TYPE(VP9E_SET_LOSSLESS, unsigned int)
+VPX_CTRL_USE_TYPE(VP9E_SET_FRAME_PARALLEL_DECODING, unsigned int)
/*! @} - end defgroup vp8_encoder */
#include "vpx_codec_impl_bottom.h"
#endif
--- a/vpx/vpx_encoder.h
+++ b/vpx/vpx_encoder.h
@@ -334,12 +334,6 @@
*/
vpx_codec_er_flags_t g_error_resilient;
- /*!\brief Enable frame parallel decoding mode
- * This value should be 1 to encode in a way that enables frame parallel
- * decoding. Otherwise make it 0.
- */
- unsigned int g_frame_parallel_decoding;
-
/*!\brief Multi-pass Encoding Mode
*
--- a/vpxenc.c
+++ b/vpxenc.c
@@ -1023,10 +1023,6 @@
"Output timestamp precision (fractional seconds)");
static const arg_def_t error_resilient = ARG_DEF(NULL, "error-resilient", 1,
"Enable error resiliency features");
-#if CONFIG_VP9_ENCODER
-static const arg_def_t frame_parallel_decoding = ARG_DEF(
- NULL, "frame-parallel", 1, "Enable frame parallel decodability features");
-#endif
static const arg_def_t lag_in_frames = ARG_DEF(NULL, "lag-in-frames", 1,
"Max number of frames to lag");
@@ -1034,9 +1030,6 @@
&use_yv12, &use_i420, &usage, &threads, &profile,
&width, &height, &stereo_mode, &timebase, &framerate,
&error_resilient,
-#if CONFIG_VP9_ENCODER
- &frame_parallel_decoding,
-#endif
&lag_in_frames, NULL
};
@@ -1136,6 +1129,10 @@
static const arg_def_t max_intra_rate_pct = ARG_DEF(NULL, "max-intra-rate", 1,
"Max I-frame bitrate (pct)");
static const arg_def_t lossless = ARG_DEF(NULL, "lossless", 1, "Lossless mode");
+#if CONFIG_VP9_ENCODER
+static const arg_def_t frame_parallel_decoding = ARG_DEF(
+ NULL, "frame-parallel", 1, "Enable frame parallel decodability features");
+#endif
#if CONFIG_VP8_ENCODER
static const arg_def_t *vp8_args[] = {
@@ -1159,6 +1156,7 @@
&cpu_used, &auto_altref, &noise_sens, &sharpness, &static_thresh,
&tile_cols, &tile_rows, &arnr_maxframes, &arnr_strength, &arnr_type,
&tune_ssim, &cq_level, &max_intra_rate_pct, &lossless,
+ &frame_parallel_decoding,
NULL
};
static const int vp9_arg_ctrl_map[] = {
@@ -1167,7 +1165,7 @@
VP9E_SET_TILE_COLUMNS, VP9E_SET_TILE_ROWS,
VP8E_SET_ARNR_MAXFRAMES, VP8E_SET_ARNR_STRENGTH, VP8E_SET_ARNR_TYPE,
VP8E_SET_TUNING, VP8E_SET_CQ_LEVEL, VP8E_SET_MAX_INTRA_BITRATE_PCT,
- VP9E_SET_LOSSLESS,
+ VP9E_SET_LOSSLESS, VP9E_SET_FRAME_PARALLEL_DECODING,
0
};
#endif
@@ -1936,10 +1934,6 @@
validate_positive_rational(arg.name, &config->cfg.g_timebase);
} else if (arg_match(&arg, &error_resilient, argi))
config->cfg.g_error_resilient = arg_parse_uint(&arg);
-#if CONFIG_VP9_ENCODER
- else if (arg_match(&arg, &frame_parallel_decoding, argi))
- config->cfg.g_frame_parallel_decoding = arg_parse_uint(&arg);
-#endif
else if (arg_match(&arg, &lag_in_frames, argi))
config->cfg.g_lag_in_frames = arg_parse_uint(&arg);
else if (arg_match(&arg, &dropframe_thresh, argi))
@@ -2124,9 +2118,6 @@
SHOW(g_timebase.num);
SHOW(g_timebase.den);
SHOW(g_error_resilient);
-#if CONFIG_VP9_ENCODER
- SHOW(g_frame_parallel_decoding);
-#endif
SHOW(g_pass);
SHOW(g_lag_in_frames);
SHOW(rc_dropframe_thresh);