Convert g_frame_parallel_decoding to control interface
Restore ABI compatibility with the master branch. Change-Id: Ic57e7e1de09ab33bd37990e52a63ba7c8f1432a4
This commit is contained in:
parent
771fc832f3
commit
81708cc326
@ -1238,7 +1238,6 @@ static vpx_codec_enc_cfg_map_t vp8e_usage_cfg_map[] =
|
|||||||
{1, 30}, /* g_timebase */
|
{1, 30}, /* g_timebase */
|
||||||
|
|
||||||
0, /* g_error_resilient */
|
0, /* g_error_resilient */
|
||||||
0, /* g_frame_parallel_decoding */
|
|
||||||
|
|
||||||
VPX_RC_ONE_PASS, /* g_pass */
|
VPX_RC_ONE_PASS, /* g_pass */
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ struct vp8_extracfg {
|
|||||||
unsigned int cq_level; /* constrained quality level */
|
unsigned int cq_level; /* constrained quality level */
|
||||||
unsigned int rc_max_intra_bitrate_pct;
|
unsigned int rc_max_intra_bitrate_pct;
|
||||||
unsigned int lossless;
|
unsigned int lossless;
|
||||||
|
unsigned int frame_parallel_decoding_mode;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct extraconfig_map {
|
struct extraconfig_map {
|
||||||
@ -64,6 +65,7 @@ static const struct extraconfig_map extracfg_map[] = {
|
|||||||
10, /* cq_level */
|
10, /* cq_level */
|
||||||
0, /* rc_max_intra_bitrate_pct */
|
0, /* rc_max_intra_bitrate_pct */
|
||||||
0, /* lossless */
|
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->lossless = vp8_cfg.lossless;
|
||||||
|
|
||||||
oxcf->error_resilient_mode = cfg.g_error_resilient;
|
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("Current VP9 Settings: \n");
|
||||||
printf("target_bandwidth: %d\n", oxcf->target_bandwidth);
|
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_CQ_LEVEL, xcfg.cq_level);
|
||||||
MAP(VP8E_SET_MAX_INTRA_BITRATE_PCT, xcfg.rc_max_intra_bitrate_pct);
|
MAP(VP8E_SET_MAX_INTRA_BITRATE_PCT, xcfg.rc_max_intra_bitrate_pct);
|
||||||
MAP(VP9E_SET_LOSSLESS, xcfg.lossless);
|
MAP(VP9E_SET_LOSSLESS, xcfg.lossless);
|
||||||
|
MAP(VP9E_SET_FRAME_PARALLEL_DECODING, xcfg.frame_parallel_decoding_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
res = validate_config(ctx, &ctx->cfg, &xcfg);
|
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 */
|
{1, 30}, /* g_timebase */
|
||||||
|
|
||||||
0, /* g_error_resilient */
|
0, /* g_error_resilient */
|
||||||
0, /* g_frame_parallel_decoding */
|
|
||||||
|
|
||||||
VPX_RC_ONE_PASS, /* g_pass */
|
VPX_RC_ONE_PASS, /* g_pass */
|
||||||
|
|
||||||
|
@ -190,6 +190,7 @@ enum vp8e_enc_control_id {
|
|||||||
VP9E_SET_LOSSLESS,
|
VP9E_SET_LOSSLESS,
|
||||||
VP9E_SET_TILE_COLUMNS,
|
VP9E_SET_TILE_COLUMNS,
|
||||||
VP9E_SET_TILE_ROWS,
|
VP9E_SET_TILE_ROWS,
|
||||||
|
VP9E_SET_FRAME_PARALLEL_DECODING
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!\brief vpx 1-D scaling mode
|
/*!\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_LOSSLESS, unsigned int)
|
||||||
|
|
||||||
|
VPX_CTRL_USE_TYPE(VP9E_SET_FRAME_PARALLEL_DECODING, unsigned int)
|
||||||
/*! @} - end defgroup vp8_encoder */
|
/*! @} - end defgroup vp8_encoder */
|
||||||
#include "vpx_codec_impl_bottom.h"
|
#include "vpx_codec_impl_bottom.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -334,12 +334,6 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
vpx_codec_er_flags_t g_error_resilient;
|
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
|
/*!\brief Multi-pass Encoding Mode
|
||||||
*
|
*
|
||||||
|
21
vpxenc.c
21
vpxenc.c
@ -1023,10 +1023,6 @@ static const arg_def_t timebase = ARG_DEF(NULL, "timebase", 1,
|
|||||||
"Output timestamp precision (fractional seconds)");
|
"Output timestamp precision (fractional seconds)");
|
||||||
static const arg_def_t error_resilient = ARG_DEF(NULL, "error-resilient", 1,
|
static const arg_def_t error_resilient = ARG_DEF(NULL, "error-resilient", 1,
|
||||||
"Enable error resiliency features");
|
"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,
|
static const arg_def_t lag_in_frames = ARG_DEF(NULL, "lag-in-frames", 1,
|
||||||
"Max number of frames to lag");
|
"Max number of frames to lag");
|
||||||
|
|
||||||
@ -1034,9 +1030,6 @@ static const arg_def_t *global_args[] = {
|
|||||||
&use_yv12, &use_i420, &usage, &threads, &profile,
|
&use_yv12, &use_i420, &usage, &threads, &profile,
|
||||||
&width, &height, &stereo_mode, &timebase, &framerate,
|
&width, &height, &stereo_mode, &timebase, &framerate,
|
||||||
&error_resilient,
|
&error_resilient,
|
||||||
#if CONFIG_VP9_ENCODER
|
|
||||||
&frame_parallel_decoding,
|
|
||||||
#endif
|
|
||||||
&lag_in_frames, NULL
|
&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,
|
static const arg_def_t max_intra_rate_pct = ARG_DEF(NULL, "max-intra-rate", 1,
|
||||||
"Max I-frame bitrate (pct)");
|
"Max I-frame bitrate (pct)");
|
||||||
static const arg_def_t lossless = ARG_DEF(NULL, "lossless", 1, "Lossless mode");
|
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
|
#if CONFIG_VP8_ENCODER
|
||||||
static const arg_def_t *vp8_args[] = {
|
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,
|
&cpu_used, &auto_altref, &noise_sens, &sharpness, &static_thresh,
|
||||||
&tile_cols, &tile_rows, &arnr_maxframes, &arnr_strength, &arnr_type,
|
&tile_cols, &tile_rows, &arnr_maxframes, &arnr_strength, &arnr_type,
|
||||||
&tune_ssim, &cq_level, &max_intra_rate_pct, &lossless,
|
&tune_ssim, &cq_level, &max_intra_rate_pct, &lossless,
|
||||||
|
&frame_parallel_decoding,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
static const int vp9_arg_ctrl_map[] = {
|
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,
|
VP9E_SET_TILE_COLUMNS, VP9E_SET_TILE_ROWS,
|
||||||
VP8E_SET_ARNR_MAXFRAMES, VP8E_SET_ARNR_STRENGTH, VP8E_SET_ARNR_TYPE,
|
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,
|
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
|
0
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
@ -1936,10 +1934,6 @@ static int parse_stream_params(struct global_config *global,
|
|||||||
validate_positive_rational(arg.name, &config->cfg.g_timebase);
|
validate_positive_rational(arg.name, &config->cfg.g_timebase);
|
||||||
} else if (arg_match(&arg, &error_resilient, argi))
|
} else if (arg_match(&arg, &error_resilient, argi))
|
||||||
config->cfg.g_error_resilient = arg_parse_uint(&arg);
|
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))
|
else if (arg_match(&arg, &lag_in_frames, argi))
|
||||||
config->cfg.g_lag_in_frames = arg_parse_uint(&arg);
|
config->cfg.g_lag_in_frames = arg_parse_uint(&arg);
|
||||||
else if (arg_match(&arg, &dropframe_thresh, argi))
|
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.num);
|
||||||
SHOW(g_timebase.den);
|
SHOW(g_timebase.den);
|
||||||
SHOW(g_error_resilient);
|
SHOW(g_error_resilient);
|
||||||
#if CONFIG_VP9_ENCODER
|
|
||||||
SHOW(g_frame_parallel_decoding);
|
|
||||||
#endif
|
|
||||||
SHOW(g_pass);
|
SHOW(g_pass);
|
||||||
SHOW(g_lag_in_frames);
|
SHOW(g_lag_in_frames);
|
||||||
SHOW(rc_dropframe_thresh);
|
SHOW(rc_dropframe_thresh);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user