diff options
author | Manuel Stoeckl <code@mstoeckl.com> | 2021-09-24 19:09:15 -0400 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-26 16:26:10 +0200 |
commit | 32329397e289cc70550f110b72820ef3d219f7e0 (patch) | |
tree | 7439a04eff86627a2dafc457f0f83ae4e819bb42 /libswscale/yuv2rgb.c | |
parent | 0760d9153c39e95e175c434e56916e7d950a4f03 (diff) |
swscale: add input/output support for X2BGR10LE
Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswscale/yuv2rgb.c')
-rw-r--r-- | libswscale/yuv2rgb.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c index c2e8d4894c..353de2f822 100644 --- a/libswscale/yuv2rgb.c +++ b/libswscale/yuv2rgb.c @@ -783,6 +783,8 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], c->dstFormat == AV_PIX_FMT_RGB555LE || c->dstFormat == AV_PIX_FMT_RGB444BE || c->dstFormat == AV_PIX_FMT_RGB444LE || + c->dstFormat == AV_PIX_FMT_X2RGB10BE || + c->dstFormat == AV_PIX_FMT_X2RGB10LE || c->dstFormat == AV_PIX_FMT_RGB8 || c->dstFormat == AV_PIX_FMT_RGB4 || c->dstFormat == AV_PIX_FMT_RGB4_BYTE || @@ -793,7 +795,8 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], 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(X2RGB10LE, X2RGB10BE); + c->dstFormat == AV_PIX_FMT_NE(X2RGB10LE, X2RGB10BE) || + c->dstFormat == AV_PIX_FMT_NE(X2BGR10LE, X2BGR10BE); const int bpp = c->dstFormatBpp; uint8_t *y_table; uint16_t *y_table16; @@ -966,9 +969,9 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], fill_gv_table(c->table_gV, 1, cgv); break; case 30: - rbase = 20; + rbase = isRgb ? 20 : 0; gbase = 10; - bbase = 0; + bbase = isRgb ? 0 : 20; needAlpha = CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat); if (!needAlpha) abase = 30; |