diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-30 18:11:52 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-30 18:51:15 +0100 |
commit | 65e0a3ccd823f21e0b8eb1f82b5a13fc33f21a04 (patch) | |
tree | 972f50b3b5126f437c96ec0db976936c47b7e6f1 /libswscale/swscale_unscaled.c | |
parent | a201639a01284003a055f195f4e850a0cf3fc2d5 (diff) | |
download | ffmpeg-65e0a3ccd823f21e0b8eb1f82b5a13fc33f21a04.tar.gz |
sws: fix BE/LE handling for fillPlane16()
Based on fill_plane9or10() by luca barbato
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/swscale_unscaled.c')
-rw-r--r-- | libswscale/swscale_unscaled.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index 08cc2ed146..aaef02fdd5 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -146,8 +146,14 @@ static void fillPlane16(uint8_t *plane, int stride, int width, int height, int y uint8_t *ptr = plane + stride * y; int v = alpha ? 0xFFFF>>(15-bits) : (1<<bits); for (i = 0; i < height; i++) { - for (j = 0; j < width; j++) { - AV_WN16(ptr+2*j, v); +#define FILL(wfunc) \ + for (j = 0; j < width; j++) {\ + wfunc(ptr+2*j, v);\ + } + if (big_endian) { + FILL(AV_WB16); + } else { + FILL(AV_WL16); } ptr += stride; } |