|
FFmpeg
|
#include <stdio.h>#include "libavutil/avassert.h"#include "libavutil/common.h"#include "libavutil/error.h"#include "libavutil/gain_map.h"#include "libavutil/mem.h"#include "libavutil/rational.h"#include "bytestream.h"#include "gain_map.h"Go to the source code of this file.
Macros | |
| #define | ISO21496_HEADER_SIZE 5 |
| #define | ISO21496_FLAG_MULTICHANNEL (1 << 7) |
| #define | ISO21496_FLAG_USE_BASE_CG (1 << 6) |
| #define | ISO21496_FLAG_RESERVED 0x3f |
| #define | XMP_GAIN_MAP_TEMPLATE |
Functions | |
| static size_t | iso21496_payload_size (int nb_channels) |
| static int | make_q (int64_t num, uint32_t den, AVRational *out) |
| static int | get_sq (GetByteContext *gb, AVRational *out) |
| static int | get_uq (GetByteContext *gb, AVRational *out) |
| int | ff_gain_map_params_from_iso21496 (AVGainMapParams *restrict p, const uint8_t *data, size_t size) |
| static void | put_q (PutByteContext *pb, AVRational q) |
| int | ff_gain_map_params_to_iso21496 (const AVGainMapParams *p, uint8_t *buf) |
| Serialize an AVGainMapParams as an ISO 21496-1 gain map metadata blob. | |
| 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. | |
| #define ISO21496_HEADER_SIZE 5 |
Definition at line 31 of file gain_map.c.
| #define ISO21496_FLAG_MULTICHANNEL (1 << 7) |
Definition at line 33 of file gain_map.c.
Referenced by ff_gain_map_params_from_iso21496(), and ff_gain_map_params_to_iso21496().
| #define ISO21496_FLAG_USE_BASE_CG (1 << 6) |
Definition at line 34 of file gain_map.c.
Referenced by ff_gain_map_params_from_iso21496(), and ff_gain_map_params_to_iso21496().
| #define ISO21496_FLAG_RESERVED 0x3f |
Definition at line 35 of file gain_map.c.
Referenced by ff_gain_map_params_from_iso21496().
| #define XMP_GAIN_MAP_TEMPLATE |
Definition at line 189 of file gain_map.c.
Referenced by ff_gain_map_params_to_xmp().
|
static |
Definition at line 37 of file gain_map.c.
Referenced by ff_gain_map_params_from_iso21496().
|
static |
Definition at line 42 of file gain_map.c.
|
static |
Definition at line 52 of file gain_map.c.
Referenced by ff_gain_map_params_from_iso21496().
|
static |
Definition at line 59 of file gain_map.c.
Referenced by ff_gain_map_params_from_iso21496().
| int ff_gain_map_params_from_iso21496 | ( | AVGainMapParams *restrict | p, |
| const uint8_t * | data, | ||
| size_t | size ) |
While the spec does not require reserved bits to be 0, older versions of the ISO 21496-1 draft specification had extra flags that got removed from the final publication, so conservatively error out just in case; unless the writer version is >0 in which case these may be genuine additions to later revisions of the published spec, the validity of ignoring which is already guarded by the minimum_version check.
Definition at line 66 of file gain_map.c.
|
static |
Definition at line 126 of file gain_map.c.
Referenced by ff_gain_map_params_to_iso21496().
| int ff_gain_map_params_to_iso21496 | ( | const AVGainMapParams * | p, |
| uint8_t * | buf ) |
Serialize an AVGainMapParams as an ISO 21496-1 gain map metadata blob.
The output starts at the minimum_version field; the caller should prepend whatever identifier its container requires.
| p | parameters to serialize |
| buf | Byte buffer to fill with the serialized data. Must contain at least FF_GAIN_MAP_MAX_PAYLOAD_SIZE bytes. |
Definition at line 132 of file gain_map.c.
Referenced by jpeg_put_comments().
| 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 173 of file gain_map.c.
Referenced by ff_gain_map_params_to_xmp(), ff_mjpeg_add_gain_map_size(), and want_gain_map_xmp().
| int ff_gain_map_params_to_xmp | ( | const AVGainMapParams * | p, |
| char * | buf ) |
Serialize an AVGainMapParams as an Ultra HDR XMP packet.
| p | parameters to serialize |
| buf | Byte buffer to fill with the serialized data. Must contain at least FF_GAIN_MAP_MAX_XMP_LEN bytes. |
Definition at line 209 of file gain_map.c.
Referenced by jpeg_put_comments().