swscale: support unscaled planar Nbit->8bit with non native endian source.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-05-10 00:17:44 +02:00
parent 09ff3cc77b
commit c4f7050bb1

View File

@ -1904,7 +1904,11 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t* src[], int srcStride[
uint16_t *dstPtr2 = (uint16_t*)dstPtr;
if (dst_depth == 8) {
if(isBE(c->srcFormat) == HAVE_BIGENDIAN){
DITHER_COPY(dstPtr, dstStride[plane], srcPtr2, srcStride[plane]/2, )
} else {
DITHER_COPY(dstPtr, dstStride[plane], srcPtr2, srcStride[plane]/2, av_bswap16)
}
} else if (src_depth == 8) {
for (i = 0; i < height; i++) {
for (j = 0; j < length; j++)