aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/output.c
diff options
context:
space:
mode:
authorManuel Stoeckl <code@mstoeckl.com>2021-09-24 19:09:15 -0400
committerMichael Niedermayer <michael@niedermayer.cc>2021-09-26 16:26:10 +0200
commit32329397e289cc70550f110b72820ef3d219f7e0 (patch)
tree7439a04eff86627a2dafc457f0f83ae4e819bb42 /libswscale/output.c
parent0760d9153c39e95e175c434e56916e7d950a4f03 (diff)
downloadffmpeg-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/output.c')
-rw-r--r--libswscale/output.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libswscale/output.c b/libswscale/output.c
index f1d9a61d53..58b10f85a5 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -1603,7 +1603,7 @@ yuv2rgb_write(uint8_t *_dest, int i, int Y1, int Y2,
dest[i * 2 + 0] = r[Y1 + dr1] + g[Y1 + dg1] + b[Y1 + db1];
dest[i * 2 + 1] = r[Y2 + dr2] + g[Y2 + dg2] + b[Y2 + db2];
- } else if (target == AV_PIX_FMT_X2RGB10) {
+ } else if (target == AV_PIX_FMT_X2RGB10 || target == AV_PIX_FMT_X2BGR10) {
uint32_t *dest = (uint32_t *) _dest;
const uint32_t *r = (const uint32_t *) _r;
const uint32_t *g = (const uint32_t *) _g;
@@ -1848,6 +1848,7 @@ YUV2RGBWRAPPER(yuv2rgb,, 8, AV_PIX_FMT_RGB8, 0)
YUV2RGBWRAPPER(yuv2rgb,, 4, AV_PIX_FMT_RGB4, 0)
YUV2RGBWRAPPER(yuv2rgb,, 4b, AV_PIX_FMT_RGB4_BYTE, 0)
YUV2RGBWRAPPER(yuv2, rgb, x2rgb10, AV_PIX_FMT_X2RGB10, 0)
+YUV2RGBWRAPPER(yuv2, rgb, x2bgr10, AV_PIX_FMT_X2BGR10, 0)
static av_always_inline void yuv2rgb_write_full(SwsContext *c,
uint8_t *dest, int i, int Y, int A, int U, int V,
@@ -3000,6 +3001,12 @@ av_cold void ff_sws_init_output_funcs(SwsContext *c,
*yuv2packed2 = yuv2x2rgb10_2_c;
*yuv2packedX = yuv2x2rgb10_X_c;
break;
+ case AV_PIX_FMT_X2BGR10LE:
+ case AV_PIX_FMT_X2BGR10BE:
+ *yuv2packed1 = yuv2x2bgr10_1_c;
+ *yuv2packed2 = yuv2x2bgr10_2_c;
+ *yuv2packedX = yuv2x2bgr10_X_c;
+ break;
}
}
switch (dstFormat) {