From: DRC Date: Thu, 13 Mar 2014 20:33:43 +0000 (+0000) Subject: If we have transformed a 4:2:2 or 4:4:0 image in any way that transposes the horizont... X-Git-Tag: 1.3.90~134 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ce6891f048e10723c1e4e8be5be0b445d2a3527d;p=libjpeg-turbo If we have transformed a 4:2:2 or 4:4:0 image in any way that transposes the horizontal and vertical dimensions, then we need to inform the decompression function that the subsampling type has changed. Otherwise, tjDecodeYUV() will not produce correct results. git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1162 632fc199-4ca6-4c93-a231-07263d6284db --- diff --git a/tjbench.c b/tjbench.c index 707501d..4e28f06 100644 --- a/tjbench.c +++ b/tjbench.c @@ -584,6 +584,13 @@ void decompTest(char *filename) _ntilesw=(_w+_tilew-1)/_tilew; _ntilesh=(_h+_tileh-1)/_tileh; + if(xformop==TJXOP_TRANSPOSE || xformop==TJXOP_TRANSVERSE + || xformop==TJXOP_ROT90 || xformop==TJXOP_ROT270) + { + if(_subsamp==TJSAMP_422) _subsamp=TJSAMP_440; + else if(_subsamp==TJSAMP_440) _subsamp=TJSAMP_422; + } + for(row=0, tile=0; row<_ntilesh; row++) { for(col=0; col<_ntilesw; col++, tile++)