From 09ff3cc77b0844d2c6cd4d36bc2770fc05f882f5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 10 May 2011 00:15:03 +0200 Subject: [PATCH] swscale: fix unscaled yuv422p16be -> yuv422p10le Signed-off-by: Michael Niedermayer --- libswscale/swscale.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 085670be15..1e412b3a25 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -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