avcodec/av1: signal the presence of Film Grain in the decoder context

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2021-08-16 12:39:19 -03:00
parent 651fed3860
commit 9b05263ac1

View File

@ -575,6 +575,11 @@ static int set_context_with_sequence(AVCodecContext *avctx,
break;
}
if (seq->film_grain_params_present)
avctx->properties |= FF_CODEC_PROPERTY_FILM_GRAIN;
else
avctx->properties &= ~FF_CODEC_PROPERTY_FILM_GRAIN;
if (avctx->width != width || avctx->height != height) {
int ret = ff_set_dimensions(avctx, width, height);
if (ret < 0)