diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-05-10 00:37:20 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-05-10 00:37:20 +0200 |
commit | 53789a27f8a2ca06563d9555013e20b191b2a705 (patch) | |
tree | 264e15b28423d0e29e0ee4fc835b49971334f469 | |
parent | 42c9bd313f8cf0975e87078ced5a05c17ad45cc5 (diff) | |
download | ffmpeg-53789a27f8a2ca06563d9555013e20b191b2a705.tar.gz |
swscale: use Nbit code to handle !is16BPS(c->srcFormat) && is16BPS(c->dstFormat)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libswscale/swscale.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 6379bc15ec..521ed8e3da 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -1898,7 +1898,7 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t* src[], int srcStride[ fillPlane(dst[plane], dstStride[plane], length, height, y, (plane==3) ? 255 : 128); } else { if(isNBPS(c->srcFormat) || isNBPS(c->dstFormat) - || (is16BPS(c->srcFormat) && !is16BPS(c->dstFormat)) + || (is16BPS(c->srcFormat) != is16BPS(c->dstFormat)) ) { const int src_depth = av_pix_fmt_descriptors[c->srcFormat].comp[plane].depth_minus1+1; const int dst_depth = av_pix_fmt_descriptors[c->dstFormat].comp[plane].depth_minus1+1; @@ -1940,15 +1940,6 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t* src[], int srcStride[ DITHER_COPY(dstPtr2, dstStride[plane]/2, srcPtr2, srcStride[plane]/2, av_bswap16) } } - } else if(!is16BPS(c->srcFormat) && is16BPS(c->dstFormat)) { - for (i=0; i<height; i++) { - for (j=0; j<length; j++) { - dstPtr[ j<<1 ] = srcPtr[j]; - dstPtr[(j<<1)+1] = srcPtr[j]; - } - srcPtr+= srcStride[plane]; - dstPtr+= dstStride[plane]; - } } else if(is16BPS(c->srcFormat) && is16BPS(c->dstFormat) && isBE(c->srcFormat) != isBE(c->dstFormat)) { |