nvpro-samples / vk_video_samples

Vulkan video samples
Apache License 2.0
252 stars 41 forks source link

AV1 decode: fix apply_grain for invisible frames #77

Closed fhvwy closed 1 week ago

fhvwy commented 5 months ago

An invisible frame (neither shown nor showable) falls into this case in the AV1 specification 5.9.30:

if ( !film_grain_params_present ||
     (!show_frame && !showable_frame) ) {
    reset_grain_params()
    return
}

6.8.20: "reset_grain_params() is a function call that indicates that all the syntax elements read in film_grain_params should be set equal to 0."

Hence apply_grain should be zero in this case.