diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-18 00:46:31 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-18 01:21:48 +0100 |
commit | 28b85b1fff428ad9ee68883ff0dd73090f36eed2 (patch) | |
tree | 45b4df80e2593550550f392d0c2468b7bc737e02 /libavcodec | |
parent | 85e6f6d9c180fe717d9c0baf37c3cb6cd80360a1 (diff) | |
download | ffmpeg-28b85b1fff428ad9ee68883ff0dd73090f36eed2.tar.gz |
mjpegenc: fix YUV444 with w%16!=0
Fixes Ticket2040
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mjpegenc.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index b476bcd232..e817905e42 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -466,12 +466,14 @@ void ff_mjpeg_encode_mb(MpegEncContext *s, DCTELEM block[6][64]) encode_block(s, block[5], 5); encode_block(s, block[9], 9); - encode_block(s, block[1], 1); - encode_block(s, block[3], 3); - encode_block(s, block[6], 6); - encode_block(s, block[10], 10); - encode_block(s, block[7], 7); - encode_block(s, block[11], 11); + if (16*s->mb_x+8 < s->width) { + encode_block(s, block[1], 1); + encode_block(s, block[3], 3); + encode_block(s, block[6], 6); + encode_block(s, block[10], 10); + encode_block(s, block[7], 7); + encode_block(s, block[11], 11); + } } else { for(i=0;i<5;i++) { encode_block(s, block[i], i); |