1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

mpegvideo_enc: fix gray flag with 444 jpeg

Fixes Ticket2155

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-02-27 02:56:06 +01:00
parent 2d7044683f
commit 1672624ddc

View File

@ -2156,6 +2156,12 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s,
s->block_last_index[5] = 0; s->block_last_index[5] = 0;
s->block[4][0] = s->block[4][0] =
s->block[5][0] = (1024 + s->c_dc_scale / 2) / s->c_dc_scale; s->block[5][0] = (1024 + s->c_dc_scale / 2) / s->c_dc_scale;
if (!s->chroma_y_shift) { /* 422 / 444 */
for (i=6; i<12; i++) {
s->block_last_index[i] = 0;
s->block[i][0] = s->block[4][0];
}
}
} }
// non c quantize code returns incorrect block_last_index FIXME // non c quantize code returns incorrect block_last_index FIXME