aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-11 21:38:11 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-11 21:38:11 +0100
commitb8ff951ce03f2ec2f362394add0e1e96a5add385 (patch)
tree43d4c5dd7fe104ad6cc6baf221da247d839dd21c /libavcodec
parent859d74040e4b56b605abe92b00c0060b48eee73a (diff)
downloadffmpeg-b8ff951ce03f2ec2f362394add0e1e96a5add385.tar.gz
avcodec/mpegvideo_enc: init chroma matrix for mjpeg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpegvideo_enc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 105f2cdfaa..c1fe13a350 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -3504,13 +3504,17 @@ static int encode_picture(MpegEncContext *s, int picture_number)
for(i=1;i<64;i++){
int j= s->dsp.idct_permutation[i];
+ s->chroma_intra_matrix[j] =
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= ff_mpeg2_dc_scale_table[s->intra_dc_precision];
+ s->chroma_intra_matrix[0] =
s->intra_matrix[0] = ff_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);
+ ff_convert_matrix(&s->dsp, s->q_chroma_intra_matrix, s->q_chroma_intra_matrix16,
+ s->chroma_intra_matrix, s->intra_quant_bias, 8, 8, 1);
s->qscale= 8;
}
if(s->codec_id == AV_CODEC_ID_AMV){