summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo_enc.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2015-11-09 03:15:06 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2016-01-21 15:33:19 -0500
commit2862b63783b5556f7f3fb2d097629bc6879f833a (patch)
tree990909a954f2ce1a6cd5ed5f7e94c305426b5b66 /libavcodec/mpegvideo_enc.c
parent243df1351d2d928caa084a5704ed783f0b83f072 (diff)
lavc: Move prediction_method to codec private options
This options is only used by huffyuv, ffvhuv, jpegls, mjpeg, mpegvideoenc, png, utvideo. It is a very codec-specific options, so deprecate the global variant. Set proper limits to the maximum allowed values, and update utvideoenc tests to use the new option name. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r--libavcodec/mpegvideo_enc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index fbbbb00990..599cd065fa 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -921,6 +921,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
FF_DISABLE_DEPRECATION_WARNINGS
if (avctx->brd_scale)
s->brd_scale = avctx->brd_scale;
+
+ if (avctx->prediction_method)
+ s->pred = avctx->prediction_method + 1;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
@@ -3583,7 +3586,7 @@ static int encode_picture(MpegEncContext *s, int picture_number)
case FMT_MJPEG:
if (CONFIG_MJPEG_ENCODER)
ff_mjpeg_encode_picture_header(s->avctx, &s->pb, &s->intra_scantable,
- s->intra_matrix);
+ s->pred, s->intra_matrix);
break;
case FMT_H261:
if (CONFIG_H261_ENCODER)