diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-01-28 14:21:33 +0000 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-01-28 14:21:33 +0000 |
commit | 4f32ccb61800ef1a0acf02010784da4f15adde44 (patch) | |
tree | faf32743b2d433700e741917a60fe8fbfd68cd0a /libavcodec/mpegvideo_enc.c | |
parent | 2edd47582b4db2b89b821d6e809d5a4671487b0e (diff) | |
parent | 84c4714f397c9c50eb9d49008cc1c08385f68f31 (diff) | |
download | ffmpeg-streaming-4f32ccb61800ef1a0acf02010784da4f15adde44.zip ffmpeg-streaming-4f32ccb61800ef1a0acf02010784da4f15adde44.tar.gz |
Merge commit '84c4714f397c9c50eb9d49008cc1c08385f68f31'
* commit '84c4714f397c9c50eb9d49008cc1c08385f68f31':
lavc: Move brd_scale to codec private options
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r-- | libavcodec/mpegvideo_enc.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index dc3497f..948f395 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -1031,6 +1031,13 @@ FF_ENABLE_DEPRECATION_WARNINGS FF_ENABLE_DEPRECATION_WARNINGS #endif +#if FF_API_PRIVATE_OPT + FF_DISABLE_DEPRECATION_WARNINGS + if (avctx->brd_scale) + s->brd_scale = avctx->brd_scale; + FF_ENABLE_DEPRECATION_WARNINGS +#endif + if (s->b_frame_strategy == 2) { for (i = 0; i < s->max_b_frames + 2; i++) { s->tmp_frames[i] = av_frame_alloc(); @@ -1038,8 +1045,8 @@ FF_ENABLE_DEPRECATION_WARNINGS return AVERROR(ENOMEM); s->tmp_frames[i]->format = AV_PIX_FMT_YUV420P; - s->tmp_frames[i]->width = s->width >> avctx->brd_scale; - s->tmp_frames[i]->height = s->height >> avctx->brd_scale; + s->tmp_frames[i]->width = s->width >> s->brd_scale; + s->tmp_frames[i]->height = s->height >> s->brd_scale; ret = av_frame_get_buffer(s->tmp_frames[i], 32); if (ret < 0) @@ -1354,7 +1361,7 @@ static int estimate_best_b_count(MpegEncContext *s) { AVCodec *codec = avcodec_find_encoder(s->avctx->codec_id); AVCodecContext *c = avcodec_alloc_context3(NULL); - const int scale = s->avctx->brd_scale; + const int scale = s->brd_scale; int i, j, out_size, p_lambda, b_lambda, lambda2; int64_t best_rd = INT64_MAX; int best_b_count = -1; |