Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-30 21:11:52 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-10-30 21:51:15 +0400
commit65e0a3ccd823f21e0b8eb1f82b5a13fc33f21a04 (patch)
tree972f50b3b5126f437c96ec0db976936c47b7e6f1 /libswscale
parenta201639a01284003a055f195f4e850a0cf3fc2d5 (diff)
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')
-rw-r--r--libswscale/swscale_unscaled.c10
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;
}