comparison mjpegdec.c @ 11007:8d4ae55fdada libavcodec

Metasoft MJPEG codec has Cb and Cr swapped, fixes issue 1611.
author cehoyos
date Tue, 26 Jan 2010 10:30:24 +0000
parents d99420b73262
children 5ab861519e79
comparison
equal deleted inserted replaced
11006:d99420b73262 11007:8d4ae55fdada
918 if (index == s->nb_components) 918 if (index == s->nb_components)
919 { 919 {
920 av_log(s->avctx, AV_LOG_ERROR, "decode_sos: index(%d) out of components\n", index); 920 av_log(s->avctx, AV_LOG_ERROR, "decode_sos: index(%d) out of components\n", index);
921 return -1; 921 return -1;
922 } 922 }
923 /* Metasoft MJPEG codec has Cb and Cr swapped */
924 if (s->avctx->codec_tag == MKTAG('M', 'T', 'S', 'J')
925 && nb_components == 3 && s->nb_components == 3 && i)
926 index = 3 - i;
923 927
924 s->comp_index[i] = index; 928 s->comp_index[i] = index;
925 929
926 s->nb_blocks[i] = s->h_count[index] * s->v_count[index]; 930 s->nb_blocks[i] = s->h_count[index] * s->v_count[index];
927 s->h_scount[i] = s->h_count[index]; 931 s->h_scount[i] = s->h_count[index];