You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/vvc/sei: add decode_mastering_display_colour_volume
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
This commit is contained in:
@ -158,6 +158,24 @@ static int decode_ambient_viewing_environment(H2645SEIAmbientViewingEnvironment
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int decode_mastering_display_colour_volume(H2645SEIMasteringDisplay *h, const SEIRawMasteringDisplayColourVolume *s)
|
||||||
|
{
|
||||||
|
h->present = 1;
|
||||||
|
|
||||||
|
for (int c = 0; c < 3; c++) {
|
||||||
|
h->display_primaries[c][0] = s->display_primaries_x[c];
|
||||||
|
h->display_primaries[c][1] = s->display_primaries_y[c];
|
||||||
|
}
|
||||||
|
|
||||||
|
h->white_point[0] = s->white_point_x;
|
||||||
|
h->white_point[1] = s->white_point_y;
|
||||||
|
|
||||||
|
h->max_luminance = s->max_display_mastering_luminance;
|
||||||
|
h->min_luminance = s->min_display_mastering_luminance;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int ff_vvc_sei_decode(VVCSEI *s, const H266RawSEI *sei, const struct VVCFrameContext *fc)
|
int ff_vvc_sei_decode(VVCSEI *s, const H266RawSEI *sei, const struct VVCFrameContext *fc)
|
||||||
{
|
{
|
||||||
H2645SEI *c = &s->common;
|
H2645SEI *c = &s->common;
|
||||||
@ -192,6 +210,9 @@ int ff_vvc_sei_decode(VVCSEI *s, const H266RawSEI *sei, const struct VVCFrameCon
|
|||||||
case SEI_TYPE_AMBIENT_VIEWING_ENVIRONMENT:
|
case SEI_TYPE_AMBIENT_VIEWING_ENVIRONMENT:
|
||||||
return decode_ambient_viewing_environment(&s->common.ambient_viewing_environment, payload);
|
return decode_ambient_viewing_environment(&s->common.ambient_viewing_environment, payload);
|
||||||
|
|
||||||
|
case SEI_TYPE_MASTERING_DISPLAY_COLOUR_VOLUME:
|
||||||
|
return decode_mastering_display_colour_volume(&s->common.mastering_display, payload);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
av_log(fc->log_ctx, AV_LOG_DEBUG, "Skipped %s SEI %d\n",
|
av_log(fc->log_ctx, AV_LOG_DEBUG, "Skipped %s SEI %d\n",
|
||||||
sei->nal_unit_header.nal_unit_type == VVC_PREFIX_SEI_NUT ?
|
sei->nal_unit_header.nal_unit_type == VVC_PREFIX_SEI_NUT ?
|
||||||
|
Reference in New Issue
Block a user