diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-18 00:37:28 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-18 02:52:57 +0200 |
commit | 58fe57d5a05ad8d15c320b2bd163debbc412bdd3 (patch) | |
tree | 53f93217e69f6b7cbed9922908c34cec43b8c909 /libavcodec/x86/mpegvideo.c | |
parent | bf9464027ba28f726ae6fff5754879ae098e5471 (diff) | |
download | ffmpeg-58fe57d5a05ad8d15c320b2bd163debbc412bdd3.tar.gz |
avcodec/mpeg12enc: Basic support for encoding non even QPs for -non_linear_quant 1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/x86/mpegvideo.c')
-rw-r--r-- | libavcodec/x86/mpegvideo.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/x86/mpegvideo.c b/libavcodec/x86/mpegvideo.c index 3df6b864c5..af47422cf2 100644 --- a/libavcodec/x86/mpegvideo.c +++ b/libavcodec/x86/mpegvideo.c @@ -25,6 +25,7 @@ #include "libavutil/x86/cpu.h" #include "libavcodec/avcodec.h" #include "libavcodec/mpegvideo.h" +#include "libavcodec/mpegvideodata.h" #if HAVE_MMX_INLINE @@ -308,7 +309,8 @@ static void dct_unquantize_mpeg2_intra_mmx(MpegEncContext *s, av_assert2(s->block_last_index[n]>=0); - qscale <<= 1; + if (s->q_scale_type) qscale = ff_mpeg2_non_linear_qscale[qscale]; + else qscale <<= 1; if(s->alternate_scan) nCoeffs= 63; //FIXME else nCoeffs= s->intra_scantable.raster_end[ s->block_last_index[n] ]; @@ -375,7 +377,8 @@ static void dct_unquantize_mpeg2_inter_mmx(MpegEncContext *s, av_assert2(s->block_last_index[n]>=0); - qscale <<= 1; + if (s->q_scale_type) qscale = ff_mpeg2_non_linear_qscale[qscale]; + else qscale <<= 1; if(s->alternate_scan) nCoeffs= 63; //FIXME else nCoeffs= s->intra_scantable.raster_end[ s->block_last_index[n] ]; |