diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2012-10-31 11:26:32 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2012-10-31 17:53:57 +0100 |
commit | 38fdf7258035eb520ca152e9bea6d95cdfaca424 (patch) | |
tree | b201aa07daa6818160a208bd6565864916b521fd /libswscale/input.c | |
parent | 5707af8d0b9c5a7e8a742a11798e406f99d78cea (diff) | |
download | ffmpeg-38fdf7258035eb520ca152e9bea6d95cdfaca424.tar.gz |
swscale: do not forget to swap data in formats with different endianness
Otherwise during scaling it will try to interpret input in the wrong way and
that leads to the test results disagreeing on different platforms and with
different optimizations.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libswscale/input.c')
-rw-r--r-- | libswscale/input.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/libswscale/input.c b/libswscale/input.c index 142cc29a62..2e8d43f446 100644 --- a/libswscale/input.c +++ b/libswscale/input.c @@ -724,6 +724,15 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c) case AV_PIX_FMT_YUV420P16LE: case AV_PIX_FMT_YUV422P16LE: case AV_PIX_FMT_YUV444P16LE: + case AV_PIX_FMT_YUVA444P9LE: + case AV_PIX_FMT_YUVA422P9LE: + case AV_PIX_FMT_YUVA420P9LE: + case AV_PIX_FMT_YUVA422P10LE: + case AV_PIX_FMT_YUVA444P10LE: + case AV_PIX_FMT_YUVA420P10LE: + case AV_PIX_FMT_YUVA420P16LE: + case AV_PIX_FMT_YUVA422P16LE: + case AV_PIX_FMT_YUVA444P16LE: c->chrToYV12 = bswap16UV_c; break; #else @@ -736,6 +745,15 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c) case AV_PIX_FMT_YUV420P16BE: case AV_PIX_FMT_YUV422P16BE: case AV_PIX_FMT_YUV444P16BE: + case AV_PIX_FMT_YUVA444P9BE: + case AV_PIX_FMT_YUVA422P9BE: + case AV_PIX_FMT_YUVA420P9BE: + case AV_PIX_FMT_YUVA422P10BE: + case AV_PIX_FMT_YUVA444P10BE: + case AV_PIX_FMT_YUVA420P10BE: + case AV_PIX_FMT_YUVA420P16BE: + case AV_PIX_FMT_YUVA422P16BE: + case AV_PIX_FMT_YUVA444P16BE: c->chrToYV12 = bswap16UV_c; break; #endif @@ -917,6 +935,18 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c) case AV_PIX_FMT_GRAY16LE: c->lumToYV12 = bswap16Y_c; break; + case AV_PIX_FMT_YUVA444P9LE: + case AV_PIX_FMT_YUVA422P9LE: + case AV_PIX_FMT_YUVA420P9LE: + case AV_PIX_FMT_YUVA444P10LE: + case AV_PIX_FMT_YUVA422P10LE: + case AV_PIX_FMT_YUVA420P10LE: + case AV_PIX_FMT_YUVA420P16LE: + case AV_PIX_FMT_YUVA422P16LE: + case AV_PIX_FMT_YUVA444P16LE: + c->lumToYV12 = bswap16Y_c; + c->alpToYV12 = bswap16Y_c; + break; #else case AV_PIX_FMT_YUV444P9BE: case AV_PIX_FMT_YUV422P9BE: @@ -930,6 +960,18 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c) case AV_PIX_FMT_GRAY16BE: c->lumToYV12 = bswap16Y_c; break; + case AV_PIX_FMT_YUVA444P9BE: + case AV_PIX_FMT_YUVA422P9BE: + case AV_PIX_FMT_YUVA420P9BE: + case AV_PIX_FMT_YUVA444P10BE: + case AV_PIX_FMT_YUVA422P10BE: + case AV_PIX_FMT_YUVA420P10BE: + case AV_PIX_FMT_YUVA420P16BE: + case AV_PIX_FMT_YUVA422P16BE: + case AV_PIX_FMT_YUVA444P16BE: + c->lumToYV12 = bswap16Y_c; + c->alpToYV12 = bswap16Y_c; + break; #endif case AV_PIX_FMT_YUYV422: case AV_PIX_FMT_Y400A: |