[FFmpeg-cvslog] swscale: support unscaled planar Nbit->8bit with non native endian source.
Michael Niedermayer
git at videolan.org
Tue May 10 00:44:20 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue May 10 00:17:44 2011 +0200| [c4f7050bb1e449a9b45a98cc460c06bd89afa8b4] | committer: Michael Niedermayer
swscale: support unscaled planar Nbit->8bit with non native endian source.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c4f7050bb1e449a9b45a98cc460c06bd89afa8b4
---
libswscale/swscale.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 1e412b3..744e002 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -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++)
More information about the ffmpeg-cvslog
mailing list