[FFmpeg-cvslog] avcodec/libdav1d: explicitly set Dav1dSettings.apply_grain
James Almer
git at videolan.org
Mon Jan 10 17:22:11 EET 2022
ffmpeg | branch: release/5.0 | James Almer <jamrial at gmail.com> | Mon Jan 10 12:18:58 2022 -0300| [fa1328babf09006451c0c63079f2b66a58956ec3] | committer: James Almer
avcodec/libdav1d: explicitly set Dav1dSettings.apply_grain
Don't depend on its default value being 1, as that could change anytime.
Signed-off-by: James Almer <jamrial at gmail.com>
(cherry picked from commit 6c4074e4234edacfb3f37184fd68771df3cb2b7f)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fa1328babf09006451c0c63079f2b66a58956ec3
---
libavcodec/libdav1d.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
index 8e45f533cb..29fa4f9c3d 100644
--- a/libavcodec/libdav1d.c
+++ b/libavcodec/libdav1d.c
@@ -230,8 +230,8 @@ static av_cold int libdav1d_init(AVCodecContext *c)
s.frame_size_limit = c->max_pixels;
if (dav1d->apply_grain >= 0)
s.apply_grain = dav1d->apply_grain;
- else if (c->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN)
- s.apply_grain = 0;
+ else
+ s.apply_grain = !(c->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN);
s.all_layers = dav1d->all_layers;
if (dav1d->operating_point >= 0)
More information about the ffmpeg-cvslog
mailing list