Re: [FFmpeg-devel] [PATCH 3/3] avcodec/nvdec_av1: fix setting film grain parameters for frames with update_grain == 0

2020-11-12 Thread Timo Rothenpieler

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".

Re: [FFmpeg-devel] [PATCH 3/3] avcodec/nvdec_av1: fix setting film grain parameters for frames with update_grain == 0

2020-11-12 Thread James Almer

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.

___
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".

Re: [FFmpeg-devel] [PATCH 3/3] avcodec/nvdec_av1: fix setting film grain parameters for frames with update_grain == 0

2020-11-12 Thread Timo Rothenpieler

On 12.11.2020 22:19, Timo Rothenpieler wrote:

Are you sure this is necessary at all?
If apply_grain is 0, the value of those should be entirely irrelevant.


As in, just always set them, and just move the fg_header definition to 
the top.

___
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".

Re: [FFmpeg-devel] [PATCH 3/3] avcodec/nvdec_av1: fix setting film grain parameters for frames with update_grain == 0

2020-11-12 Thread Timo Rothenpieler

Are you sure this is necessary at all?
If apply_grain is 0, the value of those should be entirely irrelevant.
___
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".