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/input.c | |
parent | 0760d9153c39e95e175c434e56916e7d950a4f03 (diff) | |
download | ffmpeg-32329397e289cc70550f110b72820ef3d219f7e0.tar.gz |
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/input.c')
-rw-r--r-- | libswscale/input.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/libswscale/input.c b/libswscale/input.c index b65aaf7c06..477dc3d6b2 100644 --- a/libswscale/input.c +++ b/libswscale/input.c @@ -245,7 +245,8 @@ rgb48funcs(bgr, BE, AV_PIX_FMT_BGR48BE) origin == AV_PIX_FMT_ARGB || \ origin == AV_PIX_FMT_ABGR) \ ? AV_RN32A(&src[(i) * 4]) \ - : ((origin == AV_PIX_FMT_X2RGB10LE) \ + : ((origin == AV_PIX_FMT_X2RGB10LE || \ + origin == AV_PIX_FMT_X2BGR10LE) \ ? AV_RL32(&src[(i) * 4]) \ : (isBE(origin) ? AV_RB16(&src[(i) * 2]) \ : AV_RL16(&src[(i) * 2])))) @@ -393,6 +394,7 @@ rgb16_32_wrapper(AV_PIX_FMT_RGB565BE, rgb16be, 0, 0, 0, 0, 0xF800, 0x07E0, rgb16_32_wrapper(AV_PIX_FMT_RGB555BE, rgb15be, 0, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, 0, 5, 10, RGB2YUV_SHIFT + 7) rgb16_32_wrapper(AV_PIX_FMT_RGB444BE, rgb12be, 0, 0, 0, 0, 0x0F00, 0x00F0, 0x000F, 0, 4, 8, RGB2YUV_SHIFT + 4) rgb16_32_wrapper(AV_PIX_FMT_X2RGB10LE, rgb30le, 16, 6, 0, 0, 0x3FF00000, 0xFFC00, 0x3FF, 0, 0, 4, RGB2YUV_SHIFT + 6) +rgb16_32_wrapper(AV_PIX_FMT_X2BGR10LE, bgr30le, 0, 6, 16, 0, 0x3FF, 0xFFC00, 0x3FF00000, 4, 0, 0, RGB2YUV_SHIFT + 6) static void gbr24pToUV_half_c(uint8_t *_dstU, uint8_t *_dstV, const uint8_t *gsrc, const uint8_t *bsrc, const uint8_t *rsrc, @@ -1344,6 +1346,9 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c) case AV_PIX_FMT_X2RGB10LE: c->chrToYV12 = rgb30leToUV_half_c; break; + case AV_PIX_FMT_X2BGR10LE: + c->chrToYV12 = bgr30leToUV_half_c; + break; } } else { switch (srcFormat) { @@ -1428,6 +1433,9 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c) case AV_PIX_FMT_X2RGB10LE: c->chrToYV12 = rgb30leToUV_c; break; + case AV_PIX_FMT_X2BGR10LE: + c->chrToYV12 = bgr30leToUV_c; + break; } } @@ -1708,7 +1716,10 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c) c->lumToYV12 = y210le_Y_c; break; case AV_PIX_FMT_X2RGB10LE: - c->lumToYV12 =rgb30leToY_c; + c->lumToYV12 = rgb30leToY_c; + break; + case AV_PIX_FMT_X2BGR10LE: + c->lumToYV12 = bgr30leToY_c; break; } if (c->needAlpha) { |