This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit f1929d75a2298d215ebb423e047c35e99cbdbbfc
Author:     James Almer <[email protected]>
AuthorDate: Fri May 29 23:16:00 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Tue Jun 2 19:50:39 2026 -0300

    avcodec/itut35: add support for AOM film graim
    
    Signed-off-by: James Almer <[email protected]>
---
 libavcodec/Makefile |  2 +-
 libavcodec/itut35.c | 20 ++++++++++++++++++++
 libavcodec/itut35.h |  2 ++
 3 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 120722dc40..2920adee5b 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -126,7 +126,7 @@ OBJS-$(CONFIG_HUFFYUVENCDSP)           += huffyuvencdsp.o
 OBJS-$(CONFIG_IDCTDSP)                 += idctdsp.o simple_idct.o jrevdct.o
 OBJS-$(CONFIG_INFLATE_WRAPPER)         += zlib_wrapper.o
 OBJS-$(CONFIG_INTRAX8)                 += intrax8.o intrax8dsp.o 
msmpeg4_vc1_data.o
-OBJS-$(CONFIG_ITUT_T35)                += itut35.o
+OBJS-$(CONFIG_ITUT_T35)                += itut35.o aom_film_grain.o
 OBJS-$(CONFIG_IVIDSP)                  += ivi_dsp.o
 OBJS-$(CONFIG_JNI)                     += ffjni.o jni.o
 OBJS-$(CONFIG_JPEGTABLES)              += jpegtables.o
diff --git a/libavcodec/itut35.c b/libavcodec/itut35.c
index 99dd63457e..c811d7590a 100644
--- a/libavcodec/itut35.c
+++ b/libavcodec/itut35.c
@@ -68,6 +68,14 @@ int ff_itut_t35_parse_buffer(FFITUTT35 *const itut_t35, 
const uint8_t *buf,
                 return 0;
             }
             break;
+        case ITU_T_T35_PROVIDER_CODE_AOM:
+            if (bytestream2_get_bytes_left(&gb) < 1)
+                return AVERROR_INVALIDDATA;
+
+            provider_oriented_code = bytestream2_get_byteu(&gb);
+            if (provider_oriented_code != 0x0001)
+                return 0; // ignore
+            break;
         case ITU_T_T35_PROVIDER_CODE_SAMSUNG:
             if (bytestream2_get_bytes_left(&gb) < 3)
                 return AVERROR_INVALIDDATA;
@@ -135,6 +143,12 @@ int ff_itut_t35_parse_payload_to_struct(FFITUTT35 *const 
itut_t35, FFITUTT35Aux
     switch (itut_t35->country_code) {
     case ITU_T_T35_COUNTRY_CODE_US:
         switch (itut_t35->provider_code) {
+        case ITU_T_T35_PROVIDER_CODE_AOM:
+            ret = ff_aom_parse_film_grain_sets(&metadata->aom_film_grain,
+                                               itut_t35->payload, 
itut_t35->payload_size);
+            if (ret < 0)
+                return ret;
+            break;
         case ITU_T_T35_PROVIDER_CODE_ATSC:
             switch (itut_t35->provider_oriented_code) {
             case MKBETAG('G', 'A', '9', '4'): // closed captions
@@ -257,6 +271,12 @@ FF_ENABLE_DEPRECATION_WARNINGS
 #endif
     }
 
+    if (metadata.aom_film_grain.enable) {
+        ret = ff_aom_attach_film_grain_sets(&metadata.aom_film_grain, frame);
+        if (ret < 0)
+            return ret;
+    }
+
     if (metadata.hdr_plus) {
         ret = ff_frame_new_side_data_from_buf(avctx, frame, 
AV_FRAME_DATA_DYNAMIC_HDR_PLUS,
                                               &metadata.hdr_plus);
diff --git a/libavcodec/itut35.h b/libavcodec/itut35.h
index e92e086e9c..72cadc13ea 100644
--- a/libavcodec/itut35.h
+++ b/libavcodec/itut35.h
@@ -24,6 +24,7 @@
 
 #include "libavutil/frame.h"
 #include "avcodec.h"
+#include "aom_film_grain.h"
 #include "dovi_rpu.h"
 
 #define ITU_T_T35_COUNTRY_CODE_CN 0x26
@@ -62,6 +63,7 @@ typedef struct FFITUTT35Meta {
     AVBufferRef *hdr_plus;
     AVBufferRef *hdr_smpte2094_app5;
     AVBufferRef *dovi;
+    AVFilmGrainAFGS1Params aom_film_grain;
 } FFITUTT35Meta;
 
 typedef struct FFITUTT35Aux {

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to