[FFmpeg-devel] [PATCH] Add tonemap filter

Paul B Mahol onemda at gmail.com
Mon Aug 14 17:25:45 EEST 2017


Hi,

On 8/11/17, Vittorio Giovara <vittorio.giovara at gmail.com> wrote:
[...]
> +    /* do the tone map */
> +    for (y = 0; y < in->height; y++)
> +        for (x = 0; x < in->width; x++)
> +            tonemap(s, out, in, desc, x, y, peak);
> +
> +    /* copy/generate alpha if needed */
> +    if (desc->flags & AV_PIX_FMT_FLAG_ALPHA && odesc->flags &
> AV_PIX_FMT_FLAG_ALPHA) {
> +        av_image_copy_plane(out->data[3], out->linesize[3],
> +                            in->data[3], in->linesize[3],
> +                            out->linesize[3], outlink->h);
> +    } else if (odesc->flags & AV_PIX_FMT_FLAG_ALPHA) {
> +        for (y = 0; y < outlink->h; y++)
> +            memset(out->data[3] + y * out->linesize[3], 0xff, outlink->w);

This looks strange.

Rest looks fine.


More information about the ffmpeg-devel mailing list