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
This commit is contained in:
DRC
2014-03-13 20:33:43 +00:00
parent f9baac9585
commit ce6891f048

View File

@@ -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++)