X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fcbs_h264_syntax_template.c;h=1671a15d3301656b5eca5e49e15e7a0806a6ff05;hb=8fec9fca69c22fc41d8602d8bdf547f14c70fc06;hp=95fc6d719491012b94c10fc20ce11f7ed68e66cd;hpb=3e076faf3b86bb16f746e7c9b0cf3dac5f9a851a;p=ffmpeg diff --git a/libavcodec/cbs_h264_syntax_template.c b/libavcodec/cbs_h264_syntax_template.c index 95fc6d71949..1671a15d330 100644 --- a/libavcodec/cbs_h264_syntax_template.c +++ b/libavcodec/cbs_h264_syntax_template.c @@ -137,6 +137,10 @@ static int FUNC(vui_parameters)(CodedBitstreamContext *ctx, RWContext *rw, ub(8, colour_primaries); ub(8, transfer_characteristics); ub(8, matrix_coefficients); + } else { + infer(colour_primaries, 2); + infer(transfer_characteristics, 2); + infer(matrix_coefficients, 2); } } else { infer(video_format, 5); @@ -650,7 +654,7 @@ static int FUNC(sei_pic_timing)(CodedBitstreamContext *ctx, RWContext *rw, } if (sps->vui.pic_struct_present_flag) { - static const int num_clock_ts[9] = { + static const uint8_t num_clock_ts[9] = { 1, 1, 1, 2, 2, 3, 3, 2, 3 }; int i; @@ -815,6 +819,19 @@ static int FUNC(sei_mastering_display_colour_volume)(CodedBitstreamContext *ctx, return 0; } +static int FUNC(sei_alternative_transfer_characteristics)(CodedBitstreamContext *ctx, + RWContext *rw, + H264RawSEIAlternativeTransferCharacteristics *current) +{ + int err; + + HEADER("Alternative Transfer Characteristics"); + + ub(8, preferred_transfer_characteristics); + + return 0; +} + static int FUNC(sei_payload)(CodedBitstreamContext *ctx, RWContext *rw, H264RawSEIPayload *current) { @@ -866,6 +883,10 @@ static int FUNC(sei_payload)(CodedBitstreamContext *ctx, RWContext *rw, CHECK(FUNC(sei_mastering_display_colour_volume) (ctx, rw, ¤t->payload.mastering_display_colour_volume)); break; + case H264_SEI_TYPE_ALTERNATIVE_TRANSFER: + CHECK(FUNC(sei_alternative_transfer_characteristics) + (ctx, rw, ¤t->payload.alternative_transfer_characteristics)); + break; default: { #ifdef READ