[FFmpeg-devel] [PATCH 3/3] avcodec/itut35: rename some provider codes
Maryla Ustarroz-Calonge
maryla at google.com
Tue Aug 5 13:12:41 EEST 2025
In general, a provider code corresponds to a company/organization, and
the name should be that of the company, not of a given feature.
The feature is signalled in the "provider oriented code".
The exception is HDR Vivid, where the code 0x0004 indicates the HDR Vivid
feature itself rather than CUVA (China UHD Video Industry Alliance),
according to the UHD World Associations 'HDR Video Technology Part 2-1
Application Guide to System Integration' document.
ITU_T_T35_PROVIDER_CODE_CUVA -> ITU_T_T35_PROVIDER_CODE_HDR_VIVID
ITU_T_T35_PROVIDER_CODE_LCEVC-> ITU_T_T35_PROVIDER_CODE_VNOVA
ITU_T_T35_PROVIDER_CODE_SMTPE -> ITU_T_T35_PROVIDER_CODE_SAMSUNG
Signed-off-by: Maryla Ustarroz-Calonge <maryla at google.com>
---
libavcodec/av1dec.c | 2 +-
libavcodec/h2645_sei.c | 6 +++---
libavcodec/itut35.h | 6 +++---
libavcodec/libdav1d.c | 2 +-
libavformat/matroskadec.c | 2 +-
libavformat/matroskaenc.c | 2 +-
6 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index 551f79fd7a..be595484d1 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -997,7 +997,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
default: // ignore unsupported identifiers
break;
}
- } else if (country_code == ITU_T_T35_COUNTRY_CODE_US && provider_code == ITU_T_T35_PROVIDER_CODE_SMTPE) {
+ } else if (country_code == ITU_T_T35_COUNTRY_CODE_US && provider_code == ITU_T_T35_PROVIDER_CODE_SAMSUNG) {
AVDynamicHDRPlus *hdrplus;
int provider_oriented_code = bytestream2_get_be16(&gb);
int application_identifier = bytestream2_get_byte(&gb);
diff --git a/libavcodec/h2645_sei.c b/libavcodec/h2645_sei.c
index fe567e1a53..04432b6a8d 100644
--- a/libavcodec/h2645_sei.c
+++ b/libavcodec/h2645_sei.c
@@ -179,7 +179,7 @@ static int decode_registered_user_data(H2645SEI *h, GetByteContext *gb,
user_identifier);
break;
}
- } else if (country_code == ITU_T_T35_COUNTRY_CODE_UK && provider_code == ITU_T_T35_PROVIDER_CODE_LCEVC) {
+ } else if (country_code == ITU_T_T35_COUNTRY_CODE_UK && provider_code == ITU_T_T35_PROVIDER_CODE_VNOVA) {
if (bytestream2_get_bytes_left(gb) < 2)
return AVERROR_INVALIDDATA;
@@ -187,7 +187,7 @@ static int decode_registered_user_data(H2645SEI *h, GetByteContext *gb,
return decode_registered_user_data_lcevc(&h->lcevc, gb);
}
#if CONFIG_HEVC_SEI
- else if (country_code == ITU_T_T35_COUNTRY_CODE_CN && provider_code == ITU_T_T35_PROVIDER_CODE_CUVA) {
+ else if (country_code == ITU_T_T35_COUNTRY_CODE_CN && provider_code == ITU_T_T35_PROVIDER_CODE_HDR_VIVID) {
const uint16_t cuva_provider_oriented_code = 0x0005;
uint16_t provider_oriented_code;
@@ -201,7 +201,7 @@ static int decode_registered_user_data(H2645SEI *h, GetByteContext *gb,
if (provider_oriented_code == cuva_provider_oriented_code) {
return decode_registered_user_data_dynamic_hdr_vivid(&h->dynamic_hdr_vivid, gb);
}
- } else if(country_code == ITU_T_T35_COUNTRY_CODE_US && provider_code == ITU_T_T35_PROVIDER_CODE_SMTPE) {
+ } else if(country_code == ITU_T_T35_COUNTRY_CODE_US && provider_code == ITU_T_T35_PROVIDER_CODE_SAMSUNG) {
// A/341 Amendment - 2094-40
const uint16_t smpte2094_40_provider_oriented_code = 0x0001;
const uint8_t smpte2094_40_application_identifier = 0x04;
diff --git a/libavcodec/itut35.h b/libavcodec/itut35.h
index 414c76a4fa..b8987d0b01 100644
--- a/libavcodec/itut35.h
+++ b/libavcodec/itut35.h
@@ -28,16 +28,16 @@
// national body assigns this code nationally. The manufacturer code is always
// used in conjunction with a country code.
// - CN providers
-#define ITU_T_T35_PROVIDER_CODE_CUVA 0x0004
+#define ITU_T_T35_PROVIDER_CODE_HDR_VIVID 0x0004
// - UK providers
// V-Nova should be 0x5000 according to UK Register of Manufacturer Codes
// https://www.cix.co.uk/~bpechey/H221/h221code.htm
// but FFmpeg has been using 0x0050
-#define ITU_T_T35_PROVIDER_CODE_LCEVC 0x0050
+#define ITU_T_T35_PROVIDER_CODE_VNOVA 0x0050
// - US providers
#define ITU_T_T35_PROVIDER_CODE_ATSC 0x0031
#define ITU_T_T35_PROVIDER_CODE_DOLBY 0x003B
#define ITU_T_T35_PROVIDER_CODE_AOM 0x5890
-#define ITU_T_T35_PROVIDER_CODE_SMTPE 0x003C
+#define ITU_T_T35_PROVIDER_CODE_SAMSUNG 0x003C
#endif /* AVCODEC_ITUT35_H */
diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
index 4ade3701bf..a1158a23c4 100644
--- a/libavcodec/libdav1d.c
+++ b/libavcodec/libdav1d.c
@@ -423,7 +423,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
default: // ignore unsupported identifiers
break;
}
- } else if (country_code == ITU_T_T35_COUNTRY_CODE_US && provider_code == ITU_T_T35_PROVIDER_CODE_SMTPE) {
+ } else if (country_code == ITU_T_T35_COUNTRY_CODE_US && provider_code == ITU_T_T35_PROVIDER_CODE_SAMSUNG) {
AVDynamicHDRPlus *hdrplus;
int provider_oriented_code = bytestream2_get_be16(&gb);
int application_identifier = bytestream2_get_byte(&gb);
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 65271aba21..1e0c75c51b 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -3931,7 +3931,7 @@ static int matroska_parse_block_additional(MatroskaDemuxContext *matroska,
provider_code = bytestream2_get_be16u(&bc);
if (country_code != ITU_T_T35_COUNTRY_CODE_US ||
- provider_code != ITU_T_T35_PROVIDER_CODE_SMTPE)
+ provider_code != ITU_T_T35_PROVIDER_CODE_SAMSUNG)
break; // ignore
provider_oriented_code = bytestream2_get_be16u(&bc);
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 408890fa89..8142d9125e 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -2869,7 +2869,7 @@ static int mkv_write_block(void *logctx, MatroskaMuxContext *mkv,
size_t payload_size = sizeof(t35_buf) - 6;
bytestream_put_byte(&payload, ITU_T_T35_COUNTRY_CODE_US);
- bytestream_put_be16(&payload, ITU_T_T35_PROVIDER_CODE_SMTPE);
+ bytestream_put_be16(&payload, ITU_T_T35_PROVIDER_CODE_SAMSUNG);
bytestream_put_be16(&payload, 0x01); // provider_oriented_code
bytestream_put_byte(&payload, 0x04); // application_identifier
--
2.50.1.565.gc32cd1483b-goog
More information about the ffmpeg-devel
mailing list