sws: fix BE/LE handling for fillPlane16()

Based on fill_plane9or10() by luca barbato

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/6/merge
Michael Niedermayer 12 years ago
parent a201639a01
commit 65e0a3ccd8
  1. 10
      libswscale/swscale_unscaled.c
  2. 4
      tests/ref/lavfi/pixfmts_copy
  3. 4
      tests/ref/lavfi/pixfmts_null
  4. 4
      tests/ref/lavfi/pixfmts_pixdesctest
  5. 4
      tests/ref/lavfi/pixfmts_scale
  6. 4
      tests/ref/lavfi/pixfmts_vflip

@ -146,8 +146,14 @@ static void fillPlane16(uint8_t *plane, int stride, int width, int height, int y
uint8_t *ptr = plane + stride * y; uint8_t *ptr = plane + stride * y;
int v = alpha ? 0xFFFF>>(15-bits) : (1<<bits); int v = alpha ? 0xFFFF>>(15-bits) : (1<<bits);
for (i = 0; i < height; i++) { for (i = 0; i < height; i++) {
for (j = 0; j < width; j++) { #define FILL(wfunc) \
AV_WN16(ptr+2*j, v); for (j = 0; j < width; j++) {\
wfunc(ptr+2*j, v);\
}
if (big_endian) {
FILL(AV_WB16);
} else {
FILL(AV_WL16);
} }
ptr += stride; ptr += stride;
} }

@ -74,11 +74,11 @@ yuv444p16le 96a857dba8dc6792c58daec872825b32
yuv444p9be 07727e5c9040b7f0a17d591288ac330d yuv444p9be 07727e5c9040b7f0a17d591288ac330d
yuv444p9le 4d12d20a68dc28618594c96c2ade4ff4 yuv444p9le 4d12d20a68dc28618594c96c2ade4ff4
yuva420p 3a8c5c142e051367c196f95696e0e2c3 yuva420p 3a8c5c142e051367c196f95696e0e2c3
yuva420p10be c15ea36665ebb6c6400b2817f8dc0959 yuva420p10be 1b7c5ec6691498e24676ce6ed97f62f8
yuva420p10le ad2d0424033e7acbafa6d58f59b4487e yuva420p10le ad2d0424033e7acbafa6d58f59b4487e
yuva420p16be 6afcf758f4b66c0b4173c942d42212d7 yuva420p16be 6afcf758f4b66c0b4173c942d42212d7
yuva420p16le 13e195aa96329eb49921b6f9f07b875c yuva420p16le 13e195aa96329eb49921b6f9f07b875c
yuva420p9be bfbc86280eb417d53c3e09df1d6628b2 yuva420p9be 05a78390de312dfd21ac666a9da05fbd
yuva420p9le 78f5593bf51a31841ef83df41d0316eb yuva420p9le 78f5593bf51a31841ef83df41d0316eb
yuva422p 45ae66d6f69fd5b77e6831e98d228bf4 yuva422p 45ae66d6f69fd5b77e6831e98d228bf4
yuva422p10be 90ce250a517843b3e8a1ac0f4fdad733 yuva422p10be 90ce250a517843b3e8a1ac0f4fdad733

@ -74,11 +74,11 @@ yuv444p16le 96a857dba8dc6792c58daec872825b32
yuv444p9be 07727e5c9040b7f0a17d591288ac330d yuv444p9be 07727e5c9040b7f0a17d591288ac330d
yuv444p9le 4d12d20a68dc28618594c96c2ade4ff4 yuv444p9le 4d12d20a68dc28618594c96c2ade4ff4
yuva420p 3a8c5c142e051367c196f95696e0e2c3 yuva420p 3a8c5c142e051367c196f95696e0e2c3
yuva420p10be c15ea36665ebb6c6400b2817f8dc0959 yuva420p10be 1b7c5ec6691498e24676ce6ed97f62f8
yuva420p10le ad2d0424033e7acbafa6d58f59b4487e yuva420p10le ad2d0424033e7acbafa6d58f59b4487e
yuva420p16be 6afcf758f4b66c0b4173c942d42212d7 yuva420p16be 6afcf758f4b66c0b4173c942d42212d7
yuva420p16le 13e195aa96329eb49921b6f9f07b875c yuva420p16le 13e195aa96329eb49921b6f9f07b875c
yuva420p9be bfbc86280eb417d53c3e09df1d6628b2 yuva420p9be 05a78390de312dfd21ac666a9da05fbd
yuva420p9le 78f5593bf51a31841ef83df41d0316eb yuva420p9le 78f5593bf51a31841ef83df41d0316eb
yuva422p 45ae66d6f69fd5b77e6831e98d228bf4 yuva422p 45ae66d6f69fd5b77e6831e98d228bf4
yuva422p10be 90ce250a517843b3e8a1ac0f4fdad733 yuva422p10be 90ce250a517843b3e8a1ac0f4fdad733

@ -74,11 +74,11 @@ yuv444p16le 96a857dba8dc6792c58daec872825b32
yuv444p9be 07727e5c9040b7f0a17d591288ac330d yuv444p9be 07727e5c9040b7f0a17d591288ac330d
yuv444p9le 4d12d20a68dc28618594c96c2ade4ff4 yuv444p9le 4d12d20a68dc28618594c96c2ade4ff4
yuva420p 3a8c5c142e051367c196f95696e0e2c3 yuva420p 3a8c5c142e051367c196f95696e0e2c3
yuva420p10be a3fd7193dc4abb551ab7f88b7e366d33 yuva420p10be 1b7c5ec6691498e24676ce6ed97f62f8
yuva420p10le ad2d0424033e7acbafa6d58f59b4487e yuva420p10le ad2d0424033e7acbafa6d58f59b4487e
yuva420p16be 6afcf758f4b66c0b4173c942d42212d7 yuva420p16be 6afcf758f4b66c0b4173c942d42212d7
yuva420p16le 13e195aa96329eb49921b6f9f07b875c yuva420p16le 13e195aa96329eb49921b6f9f07b875c
yuva420p9be cb12ffe4ea54b118020b97d7bc0c7fe5 yuva420p9be 05a78390de312dfd21ac666a9da05fbd
yuva420p9le 78f5593bf51a31841ef83df41d0316eb yuva420p9le 78f5593bf51a31841ef83df41d0316eb
yuva422p 45ae66d6f69fd5b77e6831e98d228bf4 yuva422p 45ae66d6f69fd5b77e6831e98d228bf4
yuva422p10be 90ce250a517843b3e8a1ac0f4fdad733 yuva422p10be 90ce250a517843b3e8a1ac0f4fdad733

@ -74,11 +74,11 @@ yuv444p16le f8bac16bf1f2afbd3626e07bcc815a9f
yuv444p9be db739906e3ae3b8792cdc5a0c3387565 yuv444p9be db739906e3ae3b8792cdc5a0c3387565
yuv444p9le 693b8d30958ef1a37296b1690b4b36d2 yuv444p9le 693b8d30958ef1a37296b1690b4b36d2
yuva420p df46b738bdaf30d3a7f880b5ae45b092 yuva420p df46b738bdaf30d3a7f880b5ae45b092
yuva420p10be 8e5f3b069fdf2f0c14f49ad827991092 yuva420p10be 6dc9de933b1033aea729907fcf9d392d
yuva420p10le e6915376ad7d0f2be9d50099e5ee33ef yuva420p10le e6915376ad7d0f2be9d50099e5ee33ef
yuva420p16be aa8ca29a93936c62ef038ca8a57f47d7 yuva420p16be aa8ca29a93936c62ef038ca8a57f47d7
yuva420p16le ee0cbb31f9cdb897c1982df0caa8ffa0 yuva420p16le ee0cbb31f9cdb897c1982df0caa8ffa0
yuva420p9be b8ca5603123aeb953b9d4fc8ec8e35e1 yuva420p9be 38aa61fcb702a956c3bf0dfca63441e2
yuva420p9le 220212a81cda0f2d112f7ae96d532ff9 yuva420p9le 220212a81cda0f2d112f7ae96d532ff9
yuva422p 650755270debb03d2c03b2e93b64c576 yuva422p 650755270debb03d2c03b2e93b64c576
yuva422p10be fe0d8c2509d2d23f856093f9aea83cba yuva422p10be fe0d8c2509d2d23f856093f9aea83cba

@ -74,11 +74,11 @@ yuv444p16le 201e3acfa6f7628dfe2a1663de1128b1
yuv444p9be 6143c321929ade9e0bc93ddea926e936 yuv444p9be 6143c321929ade9e0bc93ddea926e936
yuv444p9le e43ba2026848ec803fabf74d77c10125 yuv444p9le e43ba2026848ec803fabf74d77c10125
yuva420p dc8fd115eaf203a3eac351b92a7d8f18 yuva420p dc8fd115eaf203a3eac351b92a7d8f18
yuva420p10be 8dc20d4b654a82680dcb75391f1c8c28 yuva420p10be b3aaa8a5c9b9c3c9d66053159af3ec99
yuva420p10le f43a991e8b5fe7e192cf4e0dfee2b6cb yuva420p10le f43a991e8b5fe7e192cf4e0dfee2b6cb
yuva420p16be b5c54895e87521f65a298d33bab5eb08 yuva420p16be b5c54895e87521f65a298d33bab5eb08
yuva420p16le 95e208bc6644e23a2126ac5fca085f06 yuva420p16le 95e208bc6644e23a2126ac5fca085f06
yuva420p9be aa122367fc3fde822f812a4b878893f8 yuva420p9be 1ba55d16f060bf54698dd7200523b44f
yuva420p9le 4b57b8bd1534743f6740502c74bef385 yuva420p9le 4b57b8bd1534743f6740502c74bef385
yuva422p 6091f9c62a121c09eadb02e9173b2da2 yuva422p 6091f9c62a121c09eadb02e9173b2da2
yuva422p10be 93b6afb2b1d1538b1c87caa040c43f4e yuva422p10be 93b6afb2b1d1538b1c87caa040c43f4e

Loading…
Cancel
Save