On 12.11.2020 22:23, James Almer wrote:
On 11/12/2020 6:19 PM, Timo Rothenpieler wrote:
Are you sure this is necessary at all?
If apply_grain is 0, the value of those should be entirely irrelevant.

This is not about apply_grain == 0, but about apply_grain == 1 && update_grain == 0. In those cases, the parser only reads a frame index from the bitstream (film_grain_params_ref_idx), and you're supposed to get the FG values from said referenced frame.

As is, nvdec_av1 is filling all CUVIDAV1PICPARAMS FG fields except apply_grain and random_seed with zeroes on such frames.

Yes, but you still could just define the fg_header at the top of the function, and just fill the fields from it unconditionally. It will contain garbage on frames with !apply_grain, but it shouldn't matter.

It's purely a nit about the style, since I'm trying to keep as much stuff in the struct initialization.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to