diff options
author | Fei Wang <fei.w.wang@intel.com> | 2020-07-20 09:34:07 +0800 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-07-20 21:00:00 +0200 |
commit | 854478328033531ec77fc23b958b21805572e541 (patch) | |
tree | c68a896e13d6aeccaca2013b736e1214ba290d5a /libswscale/yuv2rgb.c | |
parent | b6663adaae948a66574dff58923a862774663439 (diff) |
swscale/yuv2rgb: consider x2rgb10le on big endian hardware
This fixed FATE fail report by filter-pixfmts* for x2rgb10le on big
endian hardware.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswscale/yuv2rgb.c')
-rw-r--r-- | libswscale/yuv2rgb.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c index 71d4b90baa..e02d74f2c3 100644 --- a/libswscale/yuv2rgb.c +++ b/libswscale/yuv2rgb.c @@ -793,7 +793,8 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], c->dstFormat == AV_PIX_FMT_NE(RGB444LE, RGB444BE) || c->dstFormat == AV_PIX_FMT_NE(BGR565LE, BGR565BE) || c->dstFormat == AV_PIX_FMT_NE(BGR555LE, BGR555BE) || - c->dstFormat == AV_PIX_FMT_NE(BGR444LE, BGR444BE); + c->dstFormat == AV_PIX_FMT_NE(BGR444LE, BGR444BE) || + c->dstFormat == AV_PIX_FMT_NE(X2RGB10LE, X2RGB10BE); const int bpp = c->dstFormatBpp; uint8_t *y_table; uint16_t *y_table16; @@ -982,6 +983,9 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], y_table32[i + 2 * table_plane_size] = yval << bbase; yb += cy; } + if (isNotNe) + for (i = 0; i < table_plane_size * 3; i++) + y_table32[i] = av_bswap32(y_table32[i]); fill_table(c->table_rV, 4, crv, y_table32 + yoffs); fill_table(c->table_gU, 4, cgu, y_table32 + yoffs + table_plane_size); fill_table(c->table_bU, 4, cbu, y_table32 + yoffs + 2 * table_plane_size); |