Browse Source

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.8
Michael Niedermayer 14 years ago
parent
commit
c4f7050bb1
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      libswscale/swscale.c

+ 5
- 1
libswscale/swscale.c 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) {
DITHER_COPY(dstPtr, dstStride[plane], srcPtr2, srcStride[plane]/2, )
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++)


Loading…
Cancel
Save