Add a new control of golden frame boost in CBR mode 0 means that golden boost is off, and uses average frame target rate, a non-zero number means the percentage of boost over average frame bitrate is given initially to golden frames in CBR mode. Change-Id: If4334fe2cc424b65ae0cce27f71b5561bf1e577d
diff --git a/vpx/vp8cx.h b/vpx/vp8cx.h index 406a0d2..67e00fb 100644 --- a/vpx/vp8cx.h +++ b/vpx/vp8cx.h
@@ -208,6 +208,19 @@ */ VP8E_SET_MAX_INTER_BITRATE_PCT, + /*!\brief Boost percentage for Golden Frame in CBR mode + * + * This value controls the amount of boost given to Golden Frame in + * CBR mode. It is expressed as a percentage of the average + * per-frame bitrate, with the special (and default) value 0 meaning + * the feature is off, i.e., no golden frame boost in CBR mode and + * average bitrate target is used. + * + * For example, to allow 100% more bits, i.e, 2X, in a golden frame + * than average frame, set this to 100. + * + */ + VP8E_SET_GF_CBR_BOOST_PCT, /* TODO(jkoleszar): Move to vp9cx.h */ VP9E_SET_LOSSLESS, @@ -376,6 +389,7 @@ VPX_CTRL_USE_TYPE(VP8E_SET_MAX_INTRA_BITRATE_PCT, unsigned int) VPX_CTRL_USE_TYPE(VP8E_SET_MAX_INTER_BITRATE_PCT, unsigned int) +VPX_CTRL_USE_TYPE(VP8E_SET_GF_CBR_BOOST_PCT, unsigned int) VPX_CTRL_USE_TYPE(VP9E_SET_LOSSLESS, unsigned int) VPX_CTRL_USE_TYPE(VP9E_SET_FRAME_PARALLEL_DECODING, unsigned int)