[FFmpeg-devel] [PATCH v2 1/3] libavutil: introduce AVFilmGrainParams side data

Lynne dev at lynne.ee
Mon Nov 23 18:02:03 EET 2020


Nov 23, 2020, 15:06 by jamrial at gmail.com:

> On 11/23/2020 9:08 AM, Lynne wrote:
>
>
>> From e11df30e25f1b27a4ec3efb7dc894b8cf59113d2 Mon Sep 17 00:00:00 2001
>> From: Lynne <dev at lynne.ee>
>> Date: Thu, 12 Nov 2020 12:44:30 +0100
>> Subject: [PATCH v3 1/4] libavutil: introduce AVFilmGrainParams side data
>>
>> This patch introduces a new frame side data type AVFilmGrainParams for use
>> with video codecs which are able to use it.
>>
>> It is generalized rather than being AV1 specific as AV2 is expected to carry
>> the same data, as well as the fact there already exist rarely-used specifications
>> for both H.264 and HEVC.
>>
>
> This part of the commit message is no longer true, so remove it.
>

Done.


> Looking at the HEVC spec, film_grain_full_range_flag does not have the same semantics as clip_to_restricted_range.
>
> If this field is going to be outside AVFilmGrain###Params, then it needs to be generic enough for it. So maybe call it color_range and make it of type AVColorRange?
> Alternatively, just put it in AVFilmGrainAOMParams and lets not try to predict what other FG implementations are going to do in the future.
>

I've put it into AOM's struct. I think that's safer and I thought it somehow didn't
fit in into the main one.

I've added the comments you requested for both structs, fixed a few comments
that were wrong, and as discussed on IRC changed the data types to what is
smallest and matches best for the coefficients and generic ints for everything
else (#coeffs, shifts, offsets and multipliers).

Attached v4 and locally updated the libdav1d patch.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: v4-0001-libavutil-introduce-AVFilmGrainParams-side-data.patch
Type: text/x-patch
Size: 11085 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20201123/b9651a7f/attachment.bin>


More information about the ffmpeg-devel mailing list