[FFmpeg-devel] [PATCH] lavfi/geq: improve support for formats with alpha plane

Paul B Mahol onemda at gmail.com
Mon Feb 25 13:27:22 CET 2013


On 2/25/13, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Mon, Feb 25, 2013 at 09:31:56AM +0000, Paul B Mahol wrote:
>> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> [...]
>> @@ -110,15 +113,19 @@ static av_cold int geq_init(AVFilterContext *ctx,
>> const char *args)
>>          if (!geq->expr_str[2]) geq->expr_str[2] =
>> av_strdup(geq->expr_str[1]);
>>      }
>>
>> -    if (!geq->expr_str[1] || !geq->expr_str[2]) {
>> +    if (!geq->expr_str[3])
>> +        /* No alpha at all: fallback on luma */
>> +        geq->expr_str[3] = av_strdup(geq->expr_str[0]);
>
> wouldnt 100% opaque be a better default ?

Yes, will apply with that.

>
>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Rewriting code that is poorly written but fully understood is good.
> Rewriting code that one doesnt understand is a sign that one is less smart
> then the original author, trying to rewrite it will not make it better.
>


More information about the ffmpeg-devel mailing list