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

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new f8a03cd98d avformat/framecrcenc: add support for Gain Map packet side 
data
f8a03cd98d is described below

commit f8a03cd98daa81d16948308b5b1612aaaa831500
Author:     James Almer <[email protected]>
AuthorDate: Sat Oct 24 22:44:12 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Thu Nov 5 12:07:16 2026 -0300

    avformat/framecrcenc: add support for Gain Map packet side data
    
    Signed-off-by: James Almer <[email protected]>
---
 libavformat/framecrcenc.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/libavformat/framecrcenc.c b/libavformat/framecrcenc.c
index 25c59132e9..e9b4382583 100644
--- a/libavformat/framecrcenc.c
+++ b/libavformat/framecrcenc.c
@@ -24,6 +24,7 @@
 #include "config.h"
 #include "libavutil/adler32.h"
 #include "libavutil/avstring.h"
+#include "libavutil/gain_map.h"
 #include "libavutil/hdr_dynamic_metadata.h"
 #include "libavutil/intreadwrite.h"
 
@@ -158,6 +159,25 @@ static int framecrc_write_packet(struct AVFormatContext 
*s, AVPacket *pkt)
                             BSWAP_RAT(AVDynamicHDRPlus, 
mastering_display_actual_peak_luminance[i][j]);
                         }
                 }
+                goto pod;
+            case AV_PKT_DATA_GAIN_MAP_PARAMS:
+                if (sd->size == sizeof(AVGainMapParams)) {
+                    memcpy(bswap_buf, sd->data, sizeof(AVGainMapParams));
+                    data = bswap_buf;
+                    BSWAP(AVGainMapParams, version);
+                    BSWAP(AVGainMapParams, use_base_color_space);
+                    BSWAP_RAT(AVGainMapParams, base_hdr_headroom);
+                    BSWAP_RAT(AVGainMapParams, alternate_hdr_headroom);
+                    for (int i = 0; i < 
FF_ARRAY_ELEMS(((AVGainMapParams*)0)->channels); i++) {
+                        BSWAP_RAT(AVGainMapParams, channels[i].gain_map_min);
+                        BSWAP_RAT(AVGainMapParams, channels[i].gain_map_max);
+                        BSWAP_RAT(AVGainMapParams, channels[i].gamma);
+                        BSWAP_RAT(AVGainMapParams, channels[i].base_offset);
+                        BSWAP_RAT(AVGainMapParams, 
channels[i].alternate_offset);
+                    }
+                    BSWAP(AVGainMapParams, nb_channels);
+                }
+            av_fallthrough;
             pod:
 #endif
 

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to