47 #define OFFSET(x) offsetof(ExtractPlanesContext, x)
48 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
100 int i,
depth = 0, be = 0;
123 out_pixfmts = out8_pixfmts;
125 out_pixfmts = out16be_pixfmts;
127 out_pixfmts = out16le_pixfmts;
139 int plane_avail,
ret, i;
158 for (i = 0; i < 4; i++)
159 e->
map[i] = rgba_map[e->
map[i]];
173 if (e->
map[output] == 1 || e->
map[output] == 2) {
188 for (y = 0; y <
height; y++) {
191 for (x = 0; x <
width; x++)
192 dst[x] = src[x * step + comp];
195 for (x = 0; x <
width; x++) {
196 dst[x * 2 ] = src[x * step + comp * 2 ];
197 dst[x * 2 + 1] = src[x * step + comp * 2 + 1];
210 int i, eof = 0,
ret = 0;
214 const int idx = e->
map[i];
230 outlink->
w, outlink->
h,
260 for (i = 0; i < 4; i++) {
264 if (!(planes & (1 << i)))
300 .
name =
"extractplanes",
303 .priv_class = &extractplanes_class,
307 .
inputs = extractplanes_inputs,
312 #if CONFIG_ALPHAEXTRACT_FILTER
323 AVFilter avfilter_vf_alphaextract = {
324 .
name =
"alphaextract",
326 "grayscale image component."),
328 .
init = init_alphaextract,
331 .
inputs = extractplanes_inputs,