# HG changeset patch # User michael # Date 1031611719 0 # Node ID 064ada190b6c4e9dc871b7486276ade9a585bf4b # Parent e8c9bfb533ad1af4be9e79451d2e726a75d42b00 fixing y422p output diff -r e8c9bfb533ad -r 064ada190b6c postproc/swscale_template.c --- a/postproc/swscale_template.c Mon Sep 09 22:44:23 2002 +0000 +++ b/postproc/swscale_template.c Mon Sep 09 22:48:39 2002 +0000 @@ -2503,7 +2503,8 @@ { if(isPlanarYUV(dstFormat) || isGray(dstFormat)) //YV12 like { - if((dstY&1) || isGray(dstFormat)) uDest=vDest= NULL; //FIXME split functions in lumi / chromi + const int chrSkipMask= (1<chrDstVSubSample)-1; + if((dstY&chrSkipMask) || isGray(dstFormat)) uDest=vDest= NULL; //FIXME split functions in lumi / chromi if(vLumFilterSize == 1 && vChrFilterSize == 1) // Unscaled YV12 { int16_t *lumBuf = lumPixBuf[0]; @@ -2559,7 +2560,8 @@ int16_t **chrSrcPtr= chrPixBuf + chrBufIndex + firstChrSrcY - lastInChrBuf + vChrBufSize; if(isPlanarYUV(dstFormat) || isGray(dstFormat)) //YV12 { - if((dstY&1) || isGray(dstFormat)) uDest=vDest= NULL; + const int chrSkipMask= (1<chrDstVSubSample)-1; + if((dstY&chrSkipMask) || isGray(dstFormat)) uDest=vDest= NULL; //FIXME split functions in lumi / chromi yuv2yuvXinC( vLumFilter+dstY*vLumFilterSize , lumSrcPtr, vLumFilterSize, vChrFilter+chrDstY*vChrFilterSize, chrSrcPtr, vChrFilterSize,