[FFmpeg-devel] [PATCH 1/2] lavu: add a gamma field to AVMasteringDisplayMetadata

Vittorio Giovara vittorio.giovara at gmail.com
Wed Sep 20 14:55:45 EEST 2017


diff --git a/libavutil/mastering_display_metadata.h
b/libavutil/mastering_display_metadata.h
index 847b0b62c6..3de58bf468 100644
--- a/libavutil/mastering_display_metadata.h
+++ b/libavutil/mastering_display_metadata.h
@@ -66,6 +66,16 @@ typedef struct AVMasteringDisplayMetadata {
      */
     int has_luminance;

+    /**
+     * The power-law response exponent needed to compensate for nonlinearity.
+     */
+    AVRational gamma;
+
+    /**
+     * Flag indicating whether the gamma has been set.
+     */
+    int has_gamma;
+
 } AVMasteringDisplayMetadata;


In my opinion we should not add new fields to structures that map 1:1 to
something defined elsewhere (with the exception of booleans).
I think this should be a separate side data and type, ie AVGammaResponse,
that can of course reside in the same header.
-- 
Vittorio


More information about the ffmpeg-devel mailing list