[FFmpeg-cvslog] avcodec/mpegvideo_enc: workaround applications specifying intra dc level based on 8 and othes based on 0bit
Michael Niedermayer
git at videolan.org
Tue Jul 15 20:14:06 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jul 15 19:12:00 2014 +0200| [97f86cd97604b705d6065be8088dce9cb150dc25] | committer: Michael Niedermayer
avcodec/mpegvideo_enc: workaround applications specifying intra dc level based on 8 and othes based on 0bit
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=97f86cd97604b705d6065be8088dce9cb150dc25
---
libavcodec/mpegvideo_enc.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 9c4f2a5..e88b4f3 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -335,6 +335,13 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
s->mpeg_quant = avctx->mpeg_quant;
s->rtp_mode = !!avctx->rtp_payload_size;
s->intra_dc_precision = avctx->intra_dc_precision;
+
+ // workaround some differences between how applications specify dc precission
+ if (s->intra_dc_precision < 0) {
+ s->intra_dc_precision += 8;
+ } else if (s->intra_dc_precision >= 8)
+ s->intra_dc_precision -= 8;
+
s->user_specified_pts = AV_NOPTS_VALUE;
if (s->gop_size <= 1) {
More information about the ffmpeg-cvslog
mailing list