aboutsummaryrefslogtreecommitdiffstats
path: root/tests/utils.c
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2025-05-18 22:52:09 +0200
committerRamiro Polla <ramiro.polla@gmail.com>2025-05-23 00:01:04 +0200
commit748e960e04248569d121ac4ebba11109b6c81acb (patch)
tree4fd86980b6e84300a60ed86c47fe4026870c1c1e /tests/utils.c
parent0c1d87d1e61cbb0f0ffa0d95d9e8b77d5bbde70a (diff)
downloadffmpeg-748e960e04248569d121ac4ebba11109b6c81acb.tar.gz
swscale/swscale_unscaled: fix packed16togbra16() for formats with bpc between 9-14 bits
Currently, packed16togbra16() always sets the alpha value to 0xFFFF, without taking the bit depth into consideration. This causes a bug on x86, which can be reproduced with: ./libswscale/tests/swscale -unscaled 1 -src xyz12le -dst gbrap12be The problem arises in ff_hscale14to15_4_ssse3(), in the conversion from gbrap12be to yuva444p, which comes after the conversion from xyz12le to gbrap12be. It has something to do with pmaddwd not working on unsigned values. There is some code to deal with 0xFFFF if the input has a bit depth of 16, but not for bit depths < 16. We could fix ff_hscale14to15_4_ssse3() to also work correctly with 0xFFFF on bit depths < 16, or we could just not write 0xFFFF there in the first place, which is what this commit does.
Diffstat (limited to 'tests/utils.c')
0 files changed, 0 insertions, 0 deletions