[vlc-commits] codec: dav1d: apply HDR CLL
Francois Cartegnie
git at videolan.org
Thu Feb 13 22:41:39 CET 2020
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Feb 13 14:19:59 2020 +0100| [c1973ce55e426b793054d8ad22cd0b473af0aff2] | committer: Francois Cartegnie
codec: dav1d: apply HDR CLL
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c1973ce55e426b793054d8ad22cd0b473af0aff2
---
modules/codec/dav1d.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/modules/codec/dav1d.c b/modules/codec/dav1d.c
index 208558c8cc..ce1a94dbc0 100644
--- a/modules/codec/dav1d.c
+++ b/modules/codec/dav1d.c
@@ -147,6 +147,13 @@ static int NewPicture(Dav1dPicture *img, void *cookie)
v->mastering.white_point[1] = md->white_point[1];
}
+ const Dav1dContentLightLevel *cll = img->content_light;
+ if( dec->fmt_in.video.lighting.MaxCLL == 0 && cll )
+ {
+ v->lighting.MaxCLL = cll->max_content_light_level;
+ v->lighting.MaxFALL = cll->max_frame_average_light_level;
+ }
+
v->projection_mode = dec->fmt_in.video.projection_mode;
v->multiview_mode = dec->fmt_in.video.multiview_mode;
v->pose = dec->fmt_in.video.pose;
@@ -257,7 +264,6 @@ static int Decode(decoder_t *dec, block_t *block)
}
pic->b_progressive = true; /* codec does not support interlacing */
pic->date = img.m.timestamp;
- /* TODO udpate the color primaries and such */
decoder_QueueVideo(dec, pic);
dav1d_picture_unref(&img);
}
@@ -332,6 +338,7 @@ static int OpenDecoder(vlc_object_t *p_this)
dec->fmt_out.video.space = dec->fmt_in.video.space;
dec->fmt_out.video.color_range = dec->fmt_in.video.color_range;
dec->fmt_out.video.mastering = dec->fmt_in.video.mastering;
+ dec->fmt_out.video.lighting = dec->fmt_in.video.lighting;
return VLC_SUCCESS;
}
More information about the vlc-commits
mailing list