# HG changeset patch # User michael # Date 1176600454 0 # Node ID d581a6ba2d9c78d04bc78a8dfee577eb102b1b9b # Parent c91bb8f1cd85836078e1805b654d72e292936ad9 improve horizontal chroma resolution with pal diff -r c91bb8f1cd85 -r d581a6ba2d9c libswscale/swscale.c --- a/libswscale/swscale.c Sun Apr 15 00:53:32 2007 +0000 +++ b/libswscale/swscale.c Sun Apr 15 01:27:34 2007 +0000 @@ -2036,7 +2036,10 @@ c->chrSrcVSubSample+= c->vChrDrop; // drop every 2. pixel for chroma calculation unless user wants full chroma - if((isBGR(srcFormat) || isRGB(srcFormat)) && !(flags&SWS_FULL_CHR_H_INP)) + if((isBGR(srcFormat) || isRGB(srcFormat)) && !(flags&SWS_FULL_CHR_H_INP) + && srcFormat!=PIX_FMT_RGB8 && srcFormat!=PIX_FMT_BGR8 + && srcFormat!=PIX_FMT_RGB4 && srcFormat!=PIX_FMT_BGR4 + && srcFormat!=PIX_FMT_RGB4_BYTE && srcFormat!=PIX_FMT_BGR4_BYTE) c->chrSrcHSubSample=1; if(param){ diff -r c91bb8f1cd85 -r d581a6ba2d9c libswscale/swscale_template.c --- a/libswscale/swscale_template.c Sun Apr 15 00:53:32 2007 +0000 +++ b/libswscale/swscale_template.c Sun Apr 15 01:27:34 2007 +0000 @@ -2296,12 +2296,10 @@ assert(src1 == src2); for(i=0; i>9; - dstV[i]= p>>17; + dstU[i]= p>>8; + dstV[i]= p>>16; } }