From 2862b63783b5556f7f3fb2d097629bc6879f833a Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Mon, 9 Nov 2015 03:15:06 +0100 Subject: 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 --- libavcodec/mpegvideo_enc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libavcodec/mpegvideo_enc.c') 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) -- cgit v1.2.3