FFmpeg
Data Structures | Macros | Functions | Variables
exif.c File Reference
#include <inttypes.h>
#include "libavutil/avconfig.h"
#include "libavutil/bprint.h"
#include "libavutil/display.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "bytestream.h"
#include "exif_internal.h"
#include "tiff_common.h"

Go to the source code of this file.

Data Structures

struct  exif_tag
 
struct  exif_makernote_data
 

Macros

#define EXIF_II_LONG   0x49492a00
 
#define EXIF_MM_LONG   0x4d4d002a
 
#define BASE_TAG_SIZE   12
 
#define IFD_EXTRA_SIZE   6
 
#define EXIF_TAG_NAME_LENGTH   32
 
#define MAKERNOTE_TAG   0x927c
 
#define ORIENTATION_TAG   0x112
 
#define EXIFIFD_TAG   0x8769
 
#define IMAGE_WIDTH_TAG   0x100
 
#define IMAGE_LENGTH_TAG   0x101
 
#define PIXEL_X_TAG   0xa002
 
#define PIXEL_Y_TAG   0xa003
 
#define MAKERNOTE_STRUCT(h, r)
 
#define COLUMN_SEP(i, c)   ((i) ? ((i) % (c) ? ", " : "\n") : "")
 
#define EXIF_COPY(fname, srcname)
 

Functions

const char * av_exif_get_tag_name (uint16_t id)
 Retrieves the tag name associated with the provided tag ID. More...
 
int32_t av_exif_get_tag_id (const char *name)
 Retrieves the tag ID associated with the provided tag string name. More...
 
static void tput16 (PutByteContext *pb, const int le, const uint16_t value)
 
static void tput32 (PutByteContext *pb, const int le, const uint32_t value)
 
static void tput64 (PutByteContext *pb, const int le, const uint64_t value)
 
static int exif_read_values (void *logctx, GetByteContext *gb, int le, AVExifEntry *entry)
 
static void exif_write_values (PutByteContext *pb, int le, const AVExifEntry *entry)
 
static int exif_get_makernote_offset (GetByteContext *gb)
 
static int exif_parse_ifd_list (void *logctx, GetByteContext *gb, int le, int depth, AVExifMetadata *ifd)
 
static int exif_decode_tag (void *logctx, GetByteContext *gb, int le, int depth, AVExifEntry *entry)
 
static void exif_free_entry (AVExifEntry *entry)
 
void av_exif_free (AVExifMetadata *ifd)
 Frees all resources associated with the given EXIF metadata struct. More...
 
static size_t exif_get_ifd_size (const AVExifMetadata *ifd)
 
static int exif_write_ifd (void *logctx, PutByteContext *pb, int le, int depth, const AVExifMetadata *ifd)
 
int av_exif_write (void *logctx, const AVExifMetadata *ifd, AVBufferRef **buffer, enum AVExifHeaderMode header_mode)
 Allocates a buffer using av_malloc of an appropriate size and writes the EXIF data represented by ifd into that buffer. More...
 
int av_exif_parse_buffer (void *logctx, const uint8_t *buf, size_t size, AVExifMetadata *ifd, enum AVExifHeaderMode header_mode)
 Decodes the EXIF data provided in the buffer and writes it into the struct *ifd. More...
 
static int exif_ifd_to_dict (void *logctx, const char *prefix, const AVExifMetadata *ifd, AVDictionary **metadata)
 
int av_exif_ifd_to_dict (void *logctx, const AVExifMetadata *ifd, AVDictionary **metadata)
 Recursively reads all tags from the IFD and stores them in the provided metadata dictionary. More...
 
int avpriv_exif_decode_ifd (void *logctx, const uint8_t *buf, int size, int le, int depth, AVDictionary **metadata)
 
static int exif_clone_entry (AVExifEntry *dst, const AVExifEntry *src)
 
static int exif_get_entry (void *logctx, AVExifMetadata *ifd, uint16_t id, int depth, AVExifEntry **value)
 
int av_exif_get_entry (void *logctx, AVExifMetadata *ifd, uint16_t id, int flags, AVExifEntry **value)
 Get an entry with the tagged ID from the EXIF metadata struct. More...
 
int av_exif_set_entry (void *logctx, AVExifMetadata *ifd, uint16_t id, enum AVTiffDataType type, uint32_t count, const uint8_t *ifd_lead, uint32_t ifd_offset, const void *value)
 Add an entry to the provided EXIF metadata struct. More...
 
static int exif_remove_entry (void *logctx, AVExifMetadata *ifd, uint16_t id, int depth)
 
int av_exif_remove_entry (void *logctx, AVExifMetadata *ifd, uint16_t id, int flags)
 Remove an entry from the provided EXIF metadata struct. More...
 
AVExifMetadataav_exif_clone_ifd (const AVExifMetadata *ifd)
 Allocates a duplicate of the provided EXIF metadata struct. More...
 
int av_exif_matrix_to_orientation (const int32_t *matrix)
 Convert a display matrix used by AV_FRAME_DATA_DISPLAYMATRIX into an orientation constant used by EXIF's orientation tag. More...
 
int av_exif_orientation_to_matrix (int32_t *matrix, int orientation)
 Convert an orientation constant used by EXIF's orientation tag into a display matrix used by AV_FRAME_DATA_DISPLAYMATRIX. More...
 
int ff_exif_sanitize_ifd (void *logctx, const AVFrame *frame, AVExifMetadata *ifd)
 Compares values in the IFD with data in the provided AVFrame and sets the values in that IFD to match the ones in that AVFrame. More...
 
int ff_exif_get_buffer (void *logctx, const AVFrame *frame, AVBufferRef **buffer_ptr, enum AVExifHeaderMode header_mode)
 Gets all relevant side data, collects it into an IFD, and writes it into the corresponding buffer pointer. More...
 

Variables

static const struct exif_tag tag_list []
 
static const size_t exif_sizes []
 
static const uint8_t aoc_header [] = { 'A', 'O', 'C', 0, }
 
static const uint8_t casio_header [] = { 'Q', 'V', 'C', 0, 0, 0, }
 
static const uint8_t foveon_header [] = { 'F', 'O', 'V', 'E', 'O', 'N', 0, 0, }
 
static const uint8_t fuji_header [] = { 'F', 'U', 'J', 'I', }
 
static const uint8_t nikon_header [] = { 'N', 'i', 'k', 'o', 'n', 0, }
 
static const uint8_t olympus1_header [] = { 'O', 'L', 'Y', 'M', 'P', 0, }
 
static const uint8_t olympus2_header [] = { 'O', 'L', 'Y', 'M', 'P', 'U', 'S', 0, 'I', 'I', }
 
static const uint8_t panasonic_header [] = { 'P', 'a', 'n', 'a', 's', 'o', 'n', 'i', 'c', 0, 0, 0, }
 
static const uint8_t sigma_header [] = { 'S', 'I', 'G', 'M', 'A', 0, 0, 0, }
 
static const uint8_t sony_header [] = { 'S', 'O', 'N', 'Y', ' ', 'D', 'S', 'C', ' ', 0, 0, 0, }
 
static const struct exif_makernote_data makernote_data []
 
static const int rotation_lut [2][4]
 

Detailed Description

EXIF metadata parser

Author
Thilo Borgmann <thilo.borgmann at mail.de>
Leo Izen leo.i.nosp@m.zen@.nosp@m.gmail.nosp@m..com

Definition in file exif.c.

Macro Definition Documentation

◆ EXIF_II_LONG

#define EXIF_II_LONG   0x49492a00

Definition at line 42 of file exif.c.

◆ EXIF_MM_LONG

#define EXIF_MM_LONG   0x4d4d002a

Definition at line 43 of file exif.c.

◆ BASE_TAG_SIZE

#define BASE_TAG_SIZE   12

Definition at line 45 of file exif.c.

◆ IFD_EXTRA_SIZE

#define IFD_EXTRA_SIZE   6

Definition at line 46 of file exif.c.

◆ EXIF_TAG_NAME_LENGTH

#define EXIF_TAG_NAME_LENGTH   32

Definition at line 48 of file exif.c.

◆ MAKERNOTE_TAG

#define MAKERNOTE_TAG   0x927c

Definition at line 49 of file exif.c.

◆ ORIENTATION_TAG

#define ORIENTATION_TAG   0x112

Definition at line 50 of file exif.c.

◆ EXIFIFD_TAG

#define EXIFIFD_TAG   0x8769

Definition at line 51 of file exif.c.

◆ IMAGE_WIDTH_TAG

#define IMAGE_WIDTH_TAG   0x100

Definition at line 52 of file exif.c.

◆ IMAGE_LENGTH_TAG

#define IMAGE_LENGTH_TAG   0x101

Definition at line 53 of file exif.c.

◆ PIXEL_X_TAG

#define PIXEL_X_TAG   0xa002

Definition at line 54 of file exif.c.

◆ PIXEL_Y_TAG

#define PIXEL_Y_TAG   0xa003

Definition at line 55 of file exif.c.

◆ MAKERNOTE_STRUCT

#define MAKERNOTE_STRUCT (   h,
  r 
)
Value:
{ \
.header = (h), \
.header_size = sizeof((h)), \
.result = (r), \
}

Definition at line 411 of file exif.c.

◆ COLUMN_SEP

#define COLUMN_SEP (   i,
  c 
)    ((i) ? ((i) % (c) ? ", " : "\n") : "")

Definition at line 824 of file exif.c.

◆ EXIF_COPY

#define EXIF_COPY (   fname,
  srcname 
)
Value:
do { \
size_t sz; \
if (av_size_mult(src->count, sizeof(*(fname)), &sz) < 0) { \
ret = AVERROR(ENOMEM); \
goto end; \
} \
(fname) = av_memdup((srcname), sz); \
if (!(fname)) { \
ret = AVERROR(ENOMEM); \
goto end; \
} \
} while (0)

Definition at line 936 of file exif.c.

Function Documentation

◆ av_exif_get_tag_name()

const char* av_exif_get_tag_name ( uint16_t  id)

Retrieves the tag name associated with the provided tag ID.

If the tag ID is unknown, NULL is returned.

For example, av_exif_get_tag_name(0x112) returns "Orientation".

Definition at line 215 of file exif.c.

Referenced by exif_ifd_to_dict().

◆ av_exif_get_tag_id()

int32_t av_exif_get_tag_id ( const char *  name)

Retrieves the tag ID associated with the provided tag string name.

If the tag name is unknown, a negative number is returned. Otherwise it always fits inside a uint16_t integer.

For example, av_exif_get_tag_id("Orientation") returns 274 (0x0112).

Definition at line 225 of file exif.c.

Referenced by exif_attach_ifd(), libjxl_preprocess_stream(), libjxl_receive_frame(), mov_parse_exif_item(), and side_data_exif_parse().

◆ tput16()

static void tput16 ( PutByteContext pb,
const int  le,
const uint16_t  value 
)
inlinestatic

Definition at line 238 of file exif.c.

Referenced by exif_write_ifd(), and exif_write_values().

◆ tput32()

static void tput32 ( PutByteContext pb,
const int  le,
const uint32_t  value 
)
inlinestatic

Definition at line 243 of file exif.c.

Referenced by av_exif_write(), exif_write_ifd(), and exif_write_values().

◆ tput64()

static void tput64 ( PutByteContext pb,
const int  le,
const uint64_t  value 
)
inlinestatic

Definition at line 248 of file exif.c.

Referenced by exif_write_values().

◆ exif_read_values()

static int exif_read_values ( void *  logctx,
GetByteContext gb,
int  le,
AVExifEntry entry 
)
static

Definition at line 253 of file exif.c.

Referenced by exif_decode_tag().

◆ exif_write_values()

static void exif_write_values ( PutByteContext pb,
int  le,
const AVExifEntry entry 
)
static

Definition at line 343 of file exif.c.

Referenced by exif_write_ifd().

◆ exif_get_makernote_offset()

static int exif_get_makernote_offset ( GetByteContext gb)
static

Definition at line 434 of file exif.c.

Referenced by exif_decode_tag().

◆ exif_parse_ifd_list()

static int exif_parse_ifd_list ( void *  logctx,
GetByteContext gb,
int  le,
int  depth,
AVExifMetadata ifd 
)
static

Definition at line 534 of file exif.c.

Referenced by av_exif_parse_buffer(), avpriv_exif_decode_ifd(), and exif_decode_tag().

◆ exif_decode_tag()

static int exif_decode_tag ( void *  logctx,
GetByteContext gb,
int  le,
int  depth,
AVExifEntry entry 
)
static

Definition at line 458 of file exif.c.

Referenced by exif_parse_ifd_list().

◆ exif_free_entry()

static void exif_free_entry ( AVExifEntry entry)
static

Definition at line 598 of file exif.c.

Referenced by av_exif_free(), av_exif_set_entry(), and exif_remove_entry().

◆ av_exif_free()

void av_exif_free ( AVExifMetadata ifd)

Frees all resources associated with the given EXIF metadata struct.

Does not free the pointer passed itself, in case it is stack-allocated. The pointer passed to this function must be freed by the caller, if it is heap-allocated. Passing NULL is permitted.

Definition at line 609 of file exif.c.

Referenced by av_exif_clone_ifd(), av_exif_parse_buffer(), avi_extract_stream_metadata(), avpriv_exif_decode_ifd(), decode_frame(), exif_attach_ifd(), exif_clone_entry(), exif_decode_tag(), exif_free_entry(), ff_decode_exif_attach_buffer(), ff_exif_get_buffer(), ff_exif_sanitize_ifd(), ff_mjpeg_decode_end(), ff_mjpeg_decode_frame_from_buf(), libjxl_preprocess_stream(), libjxl_receive_frame(), mov_parse_exif_item(), side_data_exif_parse(), and tiff_end().

◆ exif_get_ifd_size()

static size_t exif_get_ifd_size ( const AVExifMetadata ifd)
static

Definition at line 627 of file exif.c.

Referenced by av_exif_write(), and exif_write_ifd().

◆ exif_write_ifd()

static int exif_write_ifd ( void *  logctx,
PutByteContext pb,
int  le,
int  depth,
const AVExifMetadata ifd 
)
static

Definition at line 644 of file exif.c.

Referenced by av_exif_write().

◆ av_exif_write()

int av_exif_write ( void *  logctx,
const AVExifMetadata ifd,
AVBufferRef **  buffer,
enum AVExifHeaderMode  header_mode 
)

Allocates a buffer using av_malloc of an appropriate size and writes the EXIF data represented by ifd into that buffer.

Upon error, *buffer will be NULL. The buffer becomes owned by the caller upon success. The *buffer argument must be NULL before calling.

Definition at line 703 of file exif.c.

Referenced by exif_attach_ifd(), ff_exif_get_buffer(), libjxl_preprocess_stream(), mov_parse_exif_item(), and side_data_exif_parse().

◆ av_exif_parse_buffer()

int av_exif_parse_buffer ( void *  logctx,
const uint8_t *  data,
size_t  size,
AVExifMetadata ifd,
enum AVExifHeaderMode  header_mode 
)

Decodes the EXIF data provided in the buffer and writes it into the struct *ifd.

If this function succeeds, the IFD is owned by the caller and must be cleared after use by calling av_exif_free(); If this function fails and returns a negative value, it will call av_exif_free(ifd) before returning.

Definition at line 764 of file exif.c.

Referenced by avi_extract_stream_metadata(), decode_frame(), ff_decode_exif_attach_buffer(), ff_exif_get_buffer(), libjxl_preprocess_stream(), libjxl_receive_frame(), mjpeg_decode_app(), mov_parse_exif_item(), and side_data_exif_parse().

◆ exif_ifd_to_dict()

static int exif_ifd_to_dict ( void *  logctx,
const char *  prefix,
const AVExifMetadata ifd,
AVDictionary **  metadata 
)
static

Definition at line 826 of file exif.c.

Referenced by av_exif_ifd_to_dict().

◆ av_exif_ifd_to_dict()

int av_exif_ifd_to_dict ( void *  logctx,
const AVExifMetadata ifd,
AVDictionary **  metadata 
)

Recursively reads all tags from the IFD and stores them in the provided metadata dictionary.

Definition at line 914 of file exif.c.

Referenced by avi_extract_stream_metadata(), avpriv_exif_decode_ifd(), exif_attach_ifd(), and side_data_exif_parse().

◆ avpriv_exif_decode_ifd()

int avpriv_exif_decode_ifd ( void *  logctx,
const uint8_t *  buf,
int  size,
int  le,
int  depth,
AVDictionary **  metadata 
)

Definition at line 920 of file exif.c.

◆ exif_clone_entry()

static int exif_clone_entry ( AVExifEntry dst,
const AVExifEntry src 
)
static

Definition at line 949 of file exif.c.

Referenced by av_exif_clone_ifd(), and av_exif_set_entry().

◆ exif_get_entry()

static int exif_get_entry ( void *  logctx,
AVExifMetadata ifd,
uint16_t  id,
int  depth,
AVExifEntry **  value 
)
static

Definition at line 1024 of file exif.c.

Referenced by av_exif_get_entry().

◆ av_exif_get_entry()

int av_exif_get_entry ( void *  logctx,
AVExifMetadata ifd,
uint16_t  id,
int  flags,
AVExifEntry **  value 
)

Get an entry with the tagged ID from the EXIF metadata struct.

A pointer to the entry will be written into *value.

If the entry was present and returned successfully, a positive number is returned. If the entry was not found, *value is left untouched and zero is returned. If an error occurred, a negative number is returned.

Definition at line 1049 of file exif.c.

Referenced by av_exif_set_entry(), ff_exif_sanitize_ifd(), libjxl_preprocess_stream(), and side_data_exif_parse().

◆ av_exif_set_entry()

int av_exif_set_entry ( void *  logctx,
AVExifMetadata ifd,
uint16_t  id,
enum AVTiffDataType  type,
uint32_t  count,
const uint8_t *  ifd_lead,
uint32_t  ifd_offset,
const void *  value 
)

Add an entry to the provided EXIF metadata struct.

If one already exists with the provided ID, it will set the existing one to have the other information provided. Otherwise, it will allocate a new entry.

This function reallocates ifd->entries using av_realloc and allocates (using av_malloc) a new value member of the entry, then copies the contents of value into that buffer.

Definition at line 1054 of file exif.c.

Referenced by ff_exif_sanitize_ifd().

◆ exif_remove_entry()

static int exif_remove_entry ( void *  logctx,
AVExifMetadata ifd,
uint16_t  id,
int  depth 
)
static

Definition at line 1103 of file exif.c.

Referenced by av_exif_remove_entry().

◆ av_exif_remove_entry()

int av_exif_remove_entry ( void *  logctx,
AVExifMetadata ifd,
uint16_t  id,
int  flags 
)

Remove an entry from the provided EXIF metadata struct.

If the entry was present and removed successfully, a positive number is returned. If the entry was not found, zero is returned. If an error occurred, a negative number is returned.

Definition at line 1138 of file exif.c.

Referenced by exif_attach_ifd(), libjxl_preprocess_stream(), libjxl_receive_frame(), mov_parse_exif_item(), and side_data_exif_parse().

◆ av_exif_clone_ifd()

AVExifMetadata* av_exif_clone_ifd ( const AVExifMetadata ifd)

Allocates a duplicate of the provided EXIF metadata struct.

The caller owns the duplicate and must free it with av_exif_free. Returns NULL if the duplication process failed.

Definition at line 1143 of file exif.c.

Referenced by exif_attach_ifd(), and exif_clone_entry().

◆ av_exif_matrix_to_orientation()

int av_exif_matrix_to_orientation ( const int32_t matrix)

Convert a display matrix used by AV_FRAME_DATA_DISPLAYMATRIX into an orientation constant used by EXIF's orientation tag.

Returns an EXIF orientation between 1 and 8 (inclusive) depending on the rotation and flip factors. Returns 0 if the matrix is singular.

Definition at line 1179 of file exif.c.

Referenced by ff_exif_sanitize_ifd(), and libjxl_preprocess_stream().

◆ av_exif_orientation_to_matrix()

int av_exif_orientation_to_matrix ( int32_t matrix,
int  orientation 
)

Convert an orientation constant used by EXIF's orientation tag into a display matrix used by AV_FRAME_DATA_DISPLAYMATRIX.

Returns 0 on success and negative if the orientation is invalid, i.e. not between 1 and 8 (inclusive).

Definition at line 1192 of file exif.c.

Referenced by attach_displaymatrix(), libjxl_preprocess_stream(), and side_data_exif_parse().

◆ ff_exif_sanitize_ifd()

int ff_exif_sanitize_ifd ( void *  logctx,
const AVFrame frame,
AVExifMetadata ifd 
)

Compares values in the IFD with data in the provided AVFrame and sets the values in that IFD to match the ones in that AVFrame.

This is mostly useful for an encoder that wishes to use ff_exif_get_buffer, but would prefer to modify the IFD after it is sanitized and call av_exif_write afterward.

Definition at line 1230 of file exif.c.

Referenced by ff_exif_get_buffer(), and libjxl_preprocess_stream().

◆ ff_exif_get_buffer()

int ff_exif_get_buffer ( void *  logctx,
const AVFrame frame,
AVBufferRef **  buffer,
enum AVExifHeaderMode  header_mode 
)

Gets all relevant side data, collects it into an IFD, and writes it into the corresponding buffer pointer.

This includes both AV_FRAME_DATA_EXIF and other side data types that are included in the frame data, such as possibly an instance of AV_FRAME_DATA_DISPLAYMATRIX. It also sets width and height tags to match those of the AVFrame if they are different.

Upon error, *buffer will be NULL. The buffer becomes owned by the caller upon success. The *buffer argument must be NULL before calling. If *buffer is NULL upon return then a negative return value indicates an error, and a zero return value indicates that there was no EXIF data to write.

Definition at line 1355 of file exif.c.

Referenced by encode_headers().

Variable Documentation

◆ tag_list

const struct exif_tag tag_list[]
static

Definition at line 62 of file exif.c.

Referenced by amv_write_alist(), amv_write_vlist(), av_exif_get_tag_id(), and av_exif_get_tag_name().

◆ exif_sizes

const size_t exif_sizes[]
static
Initial value:

Definition at line 198 of file exif.c.

Referenced by exif_decode_tag(), exif_get_ifd_size(), and exif_write_ifd().

◆ aoc_header

const uint8_t aoc_header[] = { 'A', 'O', 'C', 0, }
static

Definition at line 394 of file exif.c.

◆ casio_header

const uint8_t casio_header[] = { 'Q', 'V', 'C', 0, 0, 0, }
static

Definition at line 395 of file exif.c.

◆ foveon_header

const uint8_t foveon_header[] = { 'F', 'O', 'V', 'E', 'O', 'N', 0, 0, }
static

Definition at line 396 of file exif.c.

◆ fuji_header

const uint8_t fuji_header[] = { 'F', 'U', 'J', 'I', }
static

Definition at line 397 of file exif.c.

◆ nikon_header

const uint8_t nikon_header[] = { 'N', 'i', 'k', 'o', 'n', 0, }
static

Definition at line 398 of file exif.c.

Referenced by exif_get_makernote_offset().

◆ olympus1_header

const uint8_t olympus1_header[] = { 'O', 'L', 'Y', 'M', 'P', 0, }
static

Definition at line 399 of file exif.c.

◆ olympus2_header

const uint8_t olympus2_header[] = { 'O', 'L', 'Y', 'M', 'P', 'U', 'S', 0, 'I', 'I', }
static

Definition at line 400 of file exif.c.

◆ panasonic_header

const uint8_t panasonic_header[] = { 'P', 'a', 'n', 'a', 's', 'o', 'n', 'i', 'c', 0, 0, 0, }
static

Definition at line 401 of file exif.c.

◆ sigma_header

const uint8_t sigma_header[] = { 'S', 'I', 'G', 'M', 'A', 0, 0, 0, }
static

Definition at line 402 of file exif.c.

◆ sony_header

const uint8_t sony_header[] = { 'S', 'O', 'N', 'Y', ' ', 'D', 'S', 'C', ' ', 0, 0, 0, }
static

Definition at line 403 of file exif.c.

◆ makernote_data

const struct exif_makernote_data makernote_data[]
static

◆ rotation_lut

const int rotation_lut[2][4]
static
Initial value:
= {
{1, 8, 3, 6}, {4, 7, 2, 5},
}

Definition at line 1175 of file exif.c.

Referenced by av_exif_matrix_to_orientation().

av_size_mult
int av_size_mult(size_t a, size_t b, size_t *r)
Multiply two size_t values checking for overflow.
Definition: mem.c:567
r
const char * r
Definition: vf_curves.c:127
AVERROR
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
sony_header
static const uint8_t sony_header[]
Definition: exif.c:403
casio_header
static const uint8_t casio_header[]
Definition: exif.c:395
av_memdup
void * av_memdup(const void *p, size_t size)
Duplicate a buffer with av_malloc().
Definition: mem.c:304
AV_TIFF_SHORT
@ AV_TIFF_SHORT
Definition: exif.h:45
AV_TIFF_UNDEFINED
@ AV_TIFF_UNDEFINED
Definition: exif.h:49
AV_TIFF_IFD
@ AV_TIFF_IFD
Definition: exif.h:55
AV_TIFF_RATIONAL
@ AV_TIFF_RATIONAL
Definition: exif.h:47
result
and forward the result(frame or status change) to the corresponding input. If nothing is possible
fuji_header
static const uint8_t fuji_header[]
Definition: exif.c:397
olympus1_header
static const uint8_t olympus1_header[]
Definition: exif.c:399
MAKERNOTE_STRUCT
#define MAKERNOTE_STRUCT(h, r)
Definition: exif.c:411
olympus2_header
static const uint8_t olympus2_header[]
Definition: exif.c:400
foveon_header
static const uint8_t foveon_header[]
Definition: exif.c:396
panasonic_header
static const uint8_t panasonic_header[]
Definition: exif.c:401
AV_TIFF_BYTE
@ AV_TIFF_BYTE
Definition: exif.h:43
sigma_header
static const uint8_t sigma_header[]
Definition: exif.c:402
AV_TIFF_STRING
@ AV_TIFF_STRING
Definition: exif.h:44
AV_TIFF_SSHORT
@ AV_TIFF_SSHORT
Definition: exif.h:50
AV_TIFF_SRATIONAL
@ AV_TIFF_SRATIONAL
Definition: exif.h:52
AV_TIFF_SLONG
@ AV_TIFF_SLONG
Definition: exif.h:51
AV_TIFF_SBYTE
@ AV_TIFF_SBYTE
Definition: exif.h:48
aoc_header
static const uint8_t aoc_header[]
Definition: exif.c:394
AV_TIFF_DOUBLE
@ AV_TIFF_DOUBLE
Definition: exif.h:54
AV_TIFF_FLOAT
@ AV_TIFF_FLOAT
Definition: exif.h:53
h
h
Definition: vp9dsp_template.c:2070
AV_TIFF_LONG
@ AV_TIFF_LONG
Definition: exif.h:46
src
#define src
Definition: vp8dsp.c:248