AOMediaCodec / afgs1-spec

Film grain synthesis algorithm and parameters
https://aomediacodec.github.io/afgs1-spec/
Other
8 stars 7 forks source link

Semantics of update_grain_flag incorrect #71

Closed alexismt73 closed 10 months ago

alexismt73 commented 10 months ago

We currently have the following semantics:

update_grain_flag equal to 1 specifies the presence of a new set of film grain parameters. update_grain_flag equal to 0 specifies that the previous set of parameters in the frame display order should be used.

The above says that the previous set of parameters in the frame display order should be used.

But we are predicting the data from the last signalled version of film_grain_param_set_idx. Not in display order.

Btw, should there be a requirement that the first instance of a film_grain_param_set_idx should maybe have update_grain_flag equal to 1?

Maybe the definition should be as follows:

update_grain_flag equal to 1 specifies the presence of a new set of film grain parameters. update_grain_flag equal to 0 specifies that the previous set of parameters in coding order with index equal to film_grain_param_set_idx should be used.

alexismt73 commented 10 months ago

Note also the text that follows: It is a requirement of conformance to this specification that for every distinct value of film_grain_param_set_idx used in a coded video sequence, the first frame in the display order with that value of film_grain_param_set_idx that has apply_grain_flag flag equal to 1 have update_grain_flag equal to 1.

Note: This requirement means that film grain parameters associated with a particular film_grain_param_set_idx value can only be inferred from previously signaled parameters in the display order with the same value of film_grain_param_set_idx in the current coded video sequence.

andrey-norkin commented 10 months ago

I noticed this problem hopefully addressed it in #73