aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_extractplanes.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2022-09-14 16:41:48 +0200
committerPaul B Mahol <onemda@gmail.com>2022-09-25 18:34:49 +0200
commit9995a76f7c5b507c0304de6a926b32c70d5ea2aa (patch)
tree11a3c18666210a5b1677eeb16749d919ffdf2ce9 /libavfilter/vf_extractplanes.c
parentbaf9099cf380fad2be4ae17379f6cb5762bb2c92 (diff)
downloadffmpeg-9995a76f7c5b507c0304de6a926b32c70d5ea2aa.tar.gz
avfilter/vf_extractplanes: add support for packed rgb float formats
Diffstat (limited to 'libavfilter/vf_extractplanes.c')
-rw-r--r--libavfilter/vf_extractplanes.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavfilter/vf_extractplanes.c b/libavfilter/vf_extractplanes.c
index 60b55578cf..3c794eaa28 100644
--- a/libavfilter/vf_extractplanes.c
+++ b/libavfilter/vf_extractplanes.c
@@ -124,6 +124,7 @@ AVFILTER_DEFINE_CLASS(extractplanes);
#define FLOAT_FORMATS(suf) \
AV_PIX_FMT_GRAYF32##suf, \
+ AV_PIX_FMT_RGBF32##suf, AV_PIX_FMT_RGBAF32##suf, \
AV_PIX_FMT_GBRPF32##suf, AV_PIX_FMT_GBRAPF32##suf \
static int query_formats(AVFilterContext *ctx)
@@ -283,6 +284,13 @@ static void extract_from_packed(uint8_t *dst, int dst_linesize,
dst[x * 2 ] = src[x * step + comp * 2 ];
dst[x * 2 + 1] = src[x * step + comp * 2 + 1];
}
+ case 4:
+ for (x = 0; x < width; x++) {
+ dst[x * 4 ] = src[x * step + comp * 4 ];
+ dst[x * 4 + 1] = src[x * step + comp * 4 + 1];
+ dst[x * 4 + 2] = src[x * step + comp * 4 + 2];
+ dst[x * 4 + 3] = src[x * step + comp * 4 + 3];
+ }
break;
}
dst += dst_linesize;