Commit 97f86cd9 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/mpegvideo_enc: workaround applications specifying intra dc level based...

avcodec/mpegvideo_enc: workaround applications specifying intra dc level based on 8 and othes based on 0bit
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8a91cf85
...@@ -335,6 +335,13 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) ...@@ -335,6 +335,13 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
s->mpeg_quant = avctx->mpeg_quant; s->mpeg_quant = avctx->mpeg_quant;
s->rtp_mode = !!avctx->rtp_payload_size; s->rtp_mode = !!avctx->rtp_payload_size;
s->intra_dc_precision = avctx->intra_dc_precision; 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; s->user_specified_pts = AV_NOPTS_VALUE;
if (s->gop_size <= 1) { if (s->gop_size <= 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment