diff --git a/vp8/vp8_cx_iface.c b/vp8/vp8_cx_iface.c index 0b58b0eaa..b985cb1b7 100644 --- a/vp8/vp8_cx_iface.c +++ b/vp8/vp8_cx_iface.c @@ -1238,7 +1238,6 @@ static vpx_codec_enc_cfg_map_t vp8e_usage_cfg_map[] = {1, 30}, /* g_timebase */ 0, /* g_error_resilient */ - 0, /* g_frame_parallel_decoding */ VPX_RC_ONE_PASS, /* g_pass */ diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c index 19255bbf9..56453e249 100644 --- a/vp9/vp9_cx_iface.c +++ b/vp9/vp9_cx_iface.c @@ -37,6 +37,7 @@ struct vp8_extracfg { 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 @@ static const struct extraconfig_map extracfg_map[] = { 10, /* cq_level */ 0, /* rc_max_intra_bitrate_pct */ 0, /* lossless */ + 0, /* frame_parallel_decoding_mode */ } } }; @@ -313,7 +315,7 @@ static vpx_codec_err_t set_vp8e_config(VP9_CONFIG *oxcf, 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 @@ static vpx_codec_err_t set_param(vpx_codec_alg_priv_t *ctx, 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 @@ static vpx_codec_enc_cfg_map_t vp8e_usage_cfg_map[] = { {1, 30}, /* g_timebase */ 0, /* g_error_resilient */ - 0, /* g_frame_parallel_decoding */ VPX_RC_ONE_PASS, /* g_pass */ diff --git a/vpx/vp8cx.h b/vpx/vp8cx.h index 0b910b99d..7f19dd033 100644 --- a/vpx/vp8cx.h +++ b/vpx/vp8cx.h @@ -190,6 +190,7 @@ enum vp8e_enc_control_id { 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(VP8E_SET_MAX_INTRA_BITRATE_PCT, unsigned int) 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 diff --git a/vpx/vpx_encoder.h b/vpx/vpx_encoder.h index 2ec09bdd4..ffdbc0644 100644 --- a/vpx/vpx_encoder.h +++ b/vpx/vpx_encoder.h @@ -334,12 +334,6 @@ extern "C" { */ 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 * diff --git a/vpxenc.c b/vpxenc.c index d08ca5cb1..3295fd9a4 100644 --- a/vpxenc.c +++ b/vpxenc.c @@ -1023,10 +1023,6 @@ static const arg_def_t timebase = ARG_DEF(NULL, "timebase", 1, "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 @@ static const arg_def_t *global_args[] = { &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 cq_level = ARG_DEF(NULL, "cq-level", 1, 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 @@ static const arg_def_t *vp9_args[] = { &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 @@ static const int vp9_arg_ctrl_map[] = { 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 @@ static int parse_stream_params(struct global_config *global, 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 @@ static void show_stream_config(struct stream_state *stream, 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);