diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-03-16 00:27:13 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-03-16 00:27:13 +0300 |
commit | 6506c3d2b2b68e4e0e8b745ed0788c4304381042 (patch) | |
tree | f3821cd22eca0c322715764b4deeb676bd71f194 /libavcodec/mpegvideo_enc.c | |
parent | 802323508c17164ffa78c37cfa6d520f96e3b2a8 (diff) |
Support intra_dc_precision>8 in jpeg
Originally committed as revision 22554 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r-- | libavcodec/mpegvideo_enc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 4d282951fc..ba1f690800 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -2894,12 +2894,14 @@ static int encode_picture(MpegEncContext *s, int picture_number) if (s->out_format == FMT_MJPEG) { /* for mjpeg, we do include qscale in the matrix */ - s->intra_matrix[0] = ff_mpeg1_default_intra_matrix[0]; for(i=1;i<64;i++){ int j= s->dsp.idct_permutation[i]; s->intra_matrix[j] = av_clip_uint8((ff_mpeg1_default_intra_matrix[i] * s->qscale) >> 3); } + s->y_dc_scale_table= + s->c_dc_scale_table= mpeg2_dc_scale_table[s->intra_dc_precision]; + s->intra_matrix[0] = mpeg2_dc_scale_table[s->intra_dc_precision][8]; ff_convert_matrix(&s->dsp, s->q_intra_matrix, s->q_intra_matrix16, s->intra_matrix, s->intra_quant_bias, 8, 8, 1); s->qscale= 8; |