avcodec/libvpxenc: enable dynamic max quantizer reconfiguration
Signed-off-by: James Zern <jzern@google.com>
This commit is contained in:
parent
c9ecbc08a1
commit
706f12992d
3 changed files with 14 additions and 1 deletions
|
|
@ -1629,6 +1629,16 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt,
|
|||
vpx_svc_layer_id_t layer_id;
|
||||
int layer_id_valid = 0;
|
||||
|
||||
if (avctx->qmax >= 0 && enccfg->rc_max_quantizer != avctx->qmax) {
|
||||
struct vpx_codec_enc_cfg cfg = *enccfg;
|
||||
cfg.rc_max_quantizer = avctx->qmax;
|
||||
res = vpx_codec_enc_config_set(&ctx->encoder, &cfg);
|
||||
if (res != VPX_CODEC_OK) {
|
||||
log_encoder_error(avctx, "Error reconfiguring encoder");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
}
|
||||
|
||||
if (frame) {
|
||||
const AVFrameSideData *sd = av_frame_get_side_data(frame, AV_FRAME_DATA_REGIONS_OF_INTEREST);
|
||||
rawimg = &ctx->rawimg;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#include "version_major.h"
|
||||
|
||||
#define LIBAVCODEC_VERSION_MINOR 25
|
||||
#define LIBAVCODEC_VERSION_MICRO 100
|
||||
#define LIBAVCODEC_VERSION_MICRO 101
|
||||
|
||||
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
|
||||
LIBAVCODEC_VERSION_MINOR, \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue