diff options
author | James Almer <jamrial@gmail.com> | 2024-03-11 10:59:32 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2024-03-19 09:44:59 -0300 |
commit | 4ca5d451933fd0c2e16378c3566807fd4dd9ec3f (patch) | |
tree | c4ac8ac740870b24ec8a79bd3e355d3715d7d29e /libavcodec/av1dec.c | |
parent | f4e0664fd1bc94ee1a1afbd20c5a32ac33d93a2d (diff) | |
download | ffmpeg-4ca5d451933fd0c2e16378c3566807fd4dd9ec3f.tar.gz |
avcodec/av1dec: use named constants for ITU-T T.35 metadata
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/av1dec.c')
-rw-r--r-- | libavcodec/av1dec.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c index e6346b51db..4d074c3908 100644 --- a/libavcodec/av1dec.c +++ b/libavcodec/av1dec.c @@ -34,6 +34,7 @@ #include "decode.h" #include "hwaccel_internal.h" #include "internal.h" +#include "itut35.h" #include "hwconfig.h" #include "profiles.h" #include "refstruct.h" @@ -951,7 +952,7 @@ static int export_itut_t35(AVCodecContext *avctx, AVFrame *frame, provider_code = bytestream2_get_be16(&gb); switch (provider_code) { - case 0x31: { // atsc_provider_code + case ITU_T_T35_PROVIDER_CODE_ATSC: { uint32_t user_identifier = bytestream2_get_be32(&gb); switch (user_identifier) { case MKBETAG('G', 'A', '9', '4'): { // closed captions @@ -975,12 +976,12 @@ static int export_itut_t35(AVCodecContext *avctx, AVFrame *frame, } break; } - case 0x3C: { // smpte_provider_code + case ITU_T_T35_PROVIDER_CODE_SMTPE: { AVDynamicHDRPlus *hdrplus; int provider_oriented_code = bytestream2_get_be16(&gb); int application_identifier = bytestream2_get_byte(&gb); - if (itut_t35->itu_t_t35_country_code != 0xB5 || + if (itut_t35->itu_t_t35_country_code != ITU_T_T35_COUNTRY_CODE_US || provider_oriented_code != 1 || application_identifier != 4) break; @@ -994,9 +995,10 @@ static int export_itut_t35(AVCodecContext *avctx, AVFrame *frame, return ret; break; } - case 0x3B: { // dolby_provider_code + case ITU_T_T35_PROVIDER_CODE_DOLBY: { int provider_oriented_code = bytestream2_get_be32(&gb); - if (itut_t35->itu_t_t35_country_code != 0xB5 || provider_oriented_code != 0x800) + if (itut_t35->itu_t_t35_country_code != ITU_T_T35_COUNTRY_CODE_US || + provider_oriented_code != 0x800) break; ret = ff_dovi_rpu_parse(&s->dovi, gb.buffer, gb.buffer_end - gb.buffer); |