FFmpeg
Loading...
Searching...
No Matches
gain_map.h File Reference

Serialization of AVGainMapParams into the metadata blobs that image formats carry it in, and back. More...

Go to the source code of this file.

Macros

#define FF_GAIN_MAP_VERSION   0
 
#define FF_GAIN_MAP_XMP_IDENT   "http://ns.adobe.com/xap/1.0/"
 
#define FF_GAIN_MAP_XMP_NAMESPACE   "http://ns.adobe.com/hdr-gain-map/1.0/"
 
#define FF_GAIN_MAP_XMP_MAX_LEN   1024
 

Functions

int ff_gain_map_params_check_xmp (const AVGainMapParams *p)
 Returns 1 if the gain map parameters are compatible with the XMP-based encoding, or 0 otherwise.
 
int ff_gain_map_params_to_xmp (const AVGainMapParams *p, char *buf)
 Serialize an AVGainMapParams as an Ultra HDR XMP packet.
 

Detailed Description

Serialization of AVGainMapParams into the metadata blobs that image formats carry it in, and back.

Kept separate from the codecs so that an encoder writing the blob and a bitstream filter splicing it into an existing bitstream can share the same code.

Definition in file gain_map.h.

Macro Definition Documentation

◆ FF_GAIN_MAP_VERSION

#define FF_GAIN_MAP_VERSION   0

Definition at line 33 of file gain_map.h.

Referenced by ff_gain_map_params_check_xmp().

◆ FF_GAIN_MAP_XMP_IDENT

#define FF_GAIN_MAP_XMP_IDENT   "http://ns.adobe.com/xap/1.0/"

◆ FF_GAIN_MAP_XMP_NAMESPACE

#define FF_GAIN_MAP_XMP_NAMESPACE   "http://ns.adobe.com/hdr-gain-map/1.0/"

Definition at line 37 of file gain_map.h.

Referenced by parse_app1().

◆ FF_GAIN_MAP_XMP_MAX_LEN

#define FF_GAIN_MAP_XMP_MAX_LEN   1024

Definition at line 38 of file gain_map.h.

Referenced by ff_gain_map_params_to_xmp(), and ff_mjpeg_add_gain_map_size().

Function Documentation

◆ ff_gain_map_params_check_xmp()

int ff_gain_map_params_check_xmp ( const AVGainMapParams * p)

Returns 1 if the gain map parameters are compatible with the XMP-based encoding, or 0 otherwise.

Definition at line 31 of file gain_map.c.

Referenced by ff_gain_map_params_to_xmp(), ff_mjpeg_add_gain_map_size(), and want_gain_map_xmp().

◆ ff_gain_map_params_to_xmp()

int ff_gain_map_params_to_xmp ( const AVGainMapParams * p,
char * buf )

Serialize an AVGainMapParams as an Ultra HDR XMP packet.

Parameters
pparameters to serialize
bufByte buffer to fill with the serialized data. Must contain at least FF_GAIN_MAP_MAX_XMP_LEN bytes.
Returns
Number of bytes written on success, or a negative AVERROR on failure
Note
Always succeeds if ff_gain_map_params_check_xmp() returns 1.

Definition at line 67 of file gain_map.c.

Referenced by jpeg_put_comments().