mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avfilter/vf_extractplanes: add support for packed rgb float formats
This commit is contained in:
parent
baf9099cf3
commit
9995a76f7c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user