swscale: fix unscaled yuv422p16be -> yuv422p10le
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 9 May 2011 22:15:03 +0000 (00:15 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 9 May 2011 22:15:03 +0000 (00:15 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswscale/swscale.c

index 085670b..1e412b3 100644 (file)
@@ -1928,8 +1928,11 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t* src[], int srcStride[
                         srcPtr2 += srcStride[plane]/2;
                     }
                 } else {
-                    //FIXME non native endian
-                    DITHER_COPY(dstPtr2, dstStride[plane]/2, srcPtr2, srcStride[plane]/2, )
+                    if(isBE(c->srcFormat) == HAVE_BIGENDIAN){
+                        DITHER_COPY(dstPtr2, dstStride[plane]/2, srcPtr2, srcStride[plane]/2, )
+                    }else{
+                        DITHER_COPY(dstPtr2, dstStride[plane]/2, srcPtr2, srcStride[plane]/2, av_bswap16)
+                    }
                 }
             } else if(is16BPS(c->srcFormat) && !is16BPS(c->dstFormat)) {
                 //FIXME add dither