[FFmpeg-devel] [PATCH] Add alphaextract, alphamerge filters

Stefano Sabatini stefasab at gmail.com
Fri Jul 20 11:29:18 CEST 2012


On date Thursday 2012-07-19 21:43:31 -0700, Steven Robertson encoded:
> On Thu, Jul 19, 2012 at 12:56 AM, Stefano Sabatini <stefasab at gmail.com> wrote:
[...]
> > Also why are you copying the entire line, rather than just the image
> > data?
> 
> So that the filters will work with 16-bit data just by extending the
> pad configuration (which I may look into soon).

Can you elaborate on this (and provide an use case)?

[...]
> From af200d4fdfe2997600b6f3924500cdeb34ae6cd2 Mon Sep 17 00:00:00 2001
> From: Steven Robertson <steven at strobe.cc>
> Date: Tue, 10 Jul 2012 22:14:57 -0700
> Subject: [PATCH] Add alphaextract, alphamerge filters.
> 
> These filters are designed for storing and transmitting video sequences
> with alpha using higher-efficiency codecs such as x264 which don't
> natively support an alpha channel. 'alphaextract' takes an input stream
> with an alpha channel and returns a video containing just the alpha
> component as a grayscale value; 'alphamerge' takes an RGB or YUV stream
> and adds an alpha channel recovered from a second grayscale stream.
> 
> Signed-off-by: Steven Robertson <steven at strobe.cc>
> ---
>  doc/filters.texi                 |  25 +++++
>  libavfilter/Makefile             |   2 +
>  libavfilter/allfilters.c         |   2 +
>  libavfilter/vf_alphaextract.c    | 117 ++++++++++++++++++++++
>  libavfilter/vf_alphamerge.c      | 208 +++++++++++++++++++++++++++++++++++++++
>  tests/lavfi-regression.sh        |  15 ++-
>  tests/ref/lavfi/alphaextract_rgb |   1 +
>  tests/ref/lavfi/alphaextract_yuv |   1 +
>  tests/ref/lavfi/alphamerge_rgb   |   1 +
>  tests/ref/lavfi/alphamerge_yuv   |   1 +
>  10 files changed, 370 insertions(+), 3 deletions(-)
>  create mode 100644 libavfilter/vf_alphaextract.c
>  create mode 100644 libavfilter/vf_alphamerge.c
>  create mode 100644 tests/ref/lavfi/alphaextract_rgb
>  create mode 100644 tests/ref/lavfi/alphaextract_yuv
>  create mode 100644 tests/ref/lavfi/alphamerge_rgb
>  create mode 100644 tests/ref/lavfi/alphamerge_yuv

Patch looks good.
-- 
FFmpeg = Funny & Free Mega Ponderous Ermetic Gladiator


More information about the ffmpeg-devel mailing list