Go to the documentation of this file.
32 #include "libavutil/avconfig.h"
42 #define EXIF_II_LONG 0x49492a00
43 #define EXIF_MM_LONG 0x4d4d002a
45 #define BASE_TAG_SIZE 12
46 #define IFD_EXTRA_SIZE 6
48 #define EXIF_TAG_NAME_LENGTH 32
56 {
"GPSVersionID", 0x00},
57 {
"GPSLatitudeRef", 0x01},
58 {
"GPSLatitude", 0x02},
59 {
"GPSLongitudeRef", 0x03},
60 {
"GPSLongitude", 0x04},
61 {
"GPSAltitudeRef", 0x05},
62 {
"GPSAltitude", 0x06},
63 {
"GPSTimeStamp", 0x07},
64 {
"GPSSatellites", 0x08},
66 {
"GPSMeasureMode", 0x0A},
68 {
"GPSSpeedRef", 0x0C},
70 {
"GPSTrackRef", 0x0E},
72 {
"GPSImgDirectionRef", 0x10},
73 {
"GPSImgDirection", 0x11},
74 {
"GPSMapDatum", 0x12},
75 {
"GPSDestLatitudeRef", 0x13},
76 {
"GPSDestLatitude", 0x14},
77 {
"GPSDestLongitudeRef", 0x15},
78 {
"GPSDestLongitude", 0x16},
79 {
"GPSDestBearingRef", 0x17},
80 {
"GPSDestBearing", 0x18},
81 {
"GPSDestDistanceRef", 0x19},
82 {
"GPSDestDistance", 0x1A},
83 {
"GPSProcessingMethod", 0x1B},
84 {
"GPSAreaInformation", 0x1C},
85 {
"GPSDateStamp", 0x1D},
86 {
"GPSDifferential", 0x1E},
87 {
"ImageWidth", 0x100},
88 {
"ImageLength", 0x101},
89 {
"BitsPerSample", 0x102},
90 {
"Compression", 0x103},
91 {
"PhotometricInterpretation", 0x106},
92 {
"Orientation", 0x112},
93 {
"SamplesPerPixel", 0x115},
94 {
"PlanarConfiguration", 0x11C},
95 {
"YCbCrSubSampling", 0x212},
96 {
"YCbCrPositioning", 0x213},
97 {
"XResolution", 0x11A},
98 {
"YResolution", 0x11B},
99 {
"ResolutionUnit", 0x128},
100 {
"StripOffsets", 0x111},
101 {
"RowsPerStrip", 0x116},
102 {
"StripByteCounts", 0x117},
103 {
"JPEGInterchangeFormat", 0x201},
104 {
"JPEGInterchangeFormatLength",0x202},
105 {
"TransferFunction", 0x12D},
106 {
"WhitePoint", 0x13E},
107 {
"PrimaryChromaticities", 0x13F},
108 {
"YCbCrCoefficients", 0x211},
109 {
"ReferenceBlackWhite", 0x214},
111 {
"ImageDescription", 0x10E},
116 {
"Copyright", 0x8298},
117 {
"ExifVersion", 0x9000},
118 {
"FlashpixVersion", 0xA000},
119 {
"ColorSpace", 0xA001},
120 {
"ComponentsConfiguration", 0x9101},
121 {
"CompressedBitsPerPixel", 0x9102},
122 {
"PixelXDimension", 0xA002},
123 {
"PixelYDimension", 0xA003},
124 {
"MakerNote", 0x927C},
125 {
"UserComment", 0x9286},
126 {
"RelatedSoundFile", 0xA004},
127 {
"DateTimeOriginal", 0x9003},
128 {
"DateTimeDigitized", 0x9004},
129 {
"SubSecTime", 0x9290},
130 {
"SubSecTimeOriginal", 0x9291},
131 {
"SubSecTimeDigitized", 0x9292},
132 {
"ImageUniqueID", 0xA420},
133 {
"ExposureTime", 0x829A},
135 {
"ExposureProgram", 0x8822},
136 {
"SpectralSensitivity", 0x8824},
137 {
"ISOSpeedRatings", 0x8827},
139 {
"ShutterSpeedValue", 0x9201},
140 {
"ApertureValue", 0x9202},
141 {
"BrightnessValue", 0x9203},
142 {
"ExposureBiasValue", 0x9204},
143 {
"MaxApertureValue", 0x9205},
144 {
"SubjectDistance", 0x9206},
145 {
"MeteringMode", 0x9207},
146 {
"LightSource", 0x9208},
148 {
"FocalLength", 0x920A},
149 {
"SubjectArea", 0x9214},
150 {
"FlashEnergy", 0xA20B},
151 {
"SpatialFrequencyResponse", 0xA20C},
152 {
"FocalPlaneXResolution", 0xA20E},
153 {
"FocalPlaneYResolution", 0xA20F},
154 {
"FocalPlaneResolutionUnit", 0xA210},
155 {
"SubjectLocation", 0xA214},
156 {
"ExposureIndex", 0xA215},
157 {
"SensingMethod", 0xA217},
158 {
"FileSource", 0xA300},
159 {
"SceneType", 0xA301},
160 {
"CFAPattern", 0xA302},
161 {
"CustomRendered", 0xA401},
162 {
"ExposureMode", 0xA402},
163 {
"WhiteBalance", 0xA403},
164 {
"DigitalZoomRatio", 0xA404},
165 {
"FocalLengthIn35mmFilm", 0xA405},
166 {
"SceneCaptureType", 0xA406},
167 {
"GainControl", 0xA407},
168 {
"Contrast", 0xA408},
169 {
"Saturation", 0xA409},
170 {
"Sharpness", 0xA40A},
171 {
"DeviceSettingDescription", 0xA40B},
172 {
"SubjectDistanceRange", 0xA40C},
175 {
"RelatedImageFileFormat", 0x1000},
176 {
"RelatedImageWidth", 0x1001},
177 {
"RelatedImageLength", 0x1002},
180 {
"PrintImageMatching", 0xC4A5},
185 {
"InteropIFD", 0xA005},
186 {
"GlobalParametersIFD", 0x0190},
187 {
"ProfileIFD", 0xc6f5},
233 le ? bytestream2_put_le16(pb,
value) : bytestream2_put_be16(pb,
value);
238 le ? bytestream2_put_le32(pb,
value) : bytestream2_put_be32(pb,
value);
243 le ? bytestream2_put_le64(pb,
value) : bytestream2_put_be64(pb,
value);
248 switch (
entry->type) {
279 if (!
entry->value.ptr)
281 switch (
entry->type) {
283 for (
size_t i = 0;
i <
entry->count;
i++)
287 for (
size_t i = 0;
i <
entry->count;
i++)
291 for (
size_t i = 0;
i <
entry->count;
i++)
295 for (
size_t i = 0;
i <
entry->count;
i++)
299 for (
size_t i = 0;
i <
entry->count;
i++)
303 for (
size_t i = 0;
i <
entry->count;
i++) {
310 for (
size_t i = 0;
i <
entry->count;
i++) {
338 switch (
entry->type) {
340 for (
size_t i = 0;
i <
entry->count;
i++)
344 for (
size_t i = 0;
i <
entry->count;
i++)
348 for (
size_t i = 0;
i <
entry->count;
i++)
352 for (
size_t i = 0;
i <
entry->count;
i++)
356 for (
size_t i = 0;
i <
entry->count;
i++) {
357 const av_alias64
a = { .f64 =
entry->value.dbl[
i] };
362 for (
size_t i = 0;
i <
entry->count;
i++) {
363 const av_alias32
a = { .f32 =
entry->value.dbl[
i] };
369 for (
size_t i = 0;
i <
entry->count;
i++) {
389 static const uint8_t
foveon_header[] = {
'F',
'O',
'V',
'E',
'O',
'N', 0, 0, };
393 static const uint8_t
olympus2_header[] = {
'O',
'L',
'Y',
'M',
'P',
'U',
'S', 0,
'I',
'I', };
394 static const uint8_t
panasonic_header[] = {
'P',
'a',
'n',
'a',
's',
'o',
'n',
'i',
'c', 0, 0, 0, };
395 static const uint8_t
sigma_header[] = {
'S',
'I',
'G',
'M',
'A', 0, 0, 0, };
396 static const uint8_t
sony_header[] = {
'S',
'O',
'N',
'Y',
' ',
'D',
'S',
'C',
' ', 0, 0, 0, };
404 #define MAKERNOTE_STRUCT(h, r) { \
406 .header_size = sizeof((h)), \
454 int ret = 0, makernote_offset = -1,
tell, is_ifd, count;
469 av_log(logctx,
AV_LOG_DEBUG,
"TIFF Tag: id: 0x%04x, type: %d, count: %u, offset: %d, "
470 "payload: %" PRIu32
"\n",
entry->id,
type, count,
tell, payload);
486 if (makernote_offset < 0)
493 entry->ifd_offset = makernote_offset > 0 ? makernote_offset : 0;
494 if (
entry->ifd_offset) {
496 if (!
entry->ifd_lead)
516 entry->count = count;
531 size_t required_size;
537 av_log(logctx,
AV_LOG_ERROR,
"not enough bytes remaining in EXIF buffer: 2 required\n");
543 av_log(logctx,
AV_LOG_ERROR,
"not enough bytes remaining in EXIF buffer. entries: %" PRIu32
"\n", entries);
546 if (entries > 4096) {
552 ifd->
count = entries;
570 memset(ifd->
entries, 0, required_size);
572 for (uint32_t
i = 0;
i < entries;
i++) {
611 for (
size_t i = 0;
i < ifd->
count;
i++) {
625 for (
size_t i = 0;
i < ifd->
count;
i++) {
631 total_size +=
BASE_TAG_SIZE + (payload_size > 4 ? payload_size : 0);
644 for (
size_t i = 0;
i < ifd->
count;
i++) {
646 av_log(logctx,
AV_LOG_DEBUG,
"writing TIFF entry: id: 0x%04" PRIx16
", type: %d, count: %"
647 PRIu32
", offset: %d, offset value: %d\n",
663 if (
entry->ifd_offset)
672 if (payload_size > 4) {
699 size_t size, headsize = 8;
709 switch (header_mode) {
765 switch (header_mode) {
817 #define COLUMN_SEP(i, c) ((i) ? ((i) % (c) ? ", " : "\n") : "")
829 for (uint16_t
i = 0;
i < ifd->
count;
i++) {
843 switch (
entry->type) {
851 for (uint32_t j = 0; j <
entry->count; j++)
856 for (uint32_t j = 0; j <
entry->count; j++)
861 for (uint32_t j = 0; j <
entry->count; j++)
866 for (uint32_t j = 0; j <
entry->count; j++)
874 for (uint32_t j = 0; j <
entry->count; j++)
878 for (uint32_t j = 0; j <
entry->count; j++)
929 #define EXIF_COPY(fname, srcname) do { \
931 if (av_size_mult(src->count, sizeof(*(fname)), &sz) < 0) { \
932 ret = AVERROR(ENOMEM); \
935 (fname) = av_memdup((srcname), sz); \
937 ret = AVERROR(ENOMEM); \
950 dst->ifd_offset =
src->ifd_offset;
953 if (!
dst->ifd_lead) {
968 dst->value.ifd = *cloned;
997 if (!
dst->value.str) {
1012 memset(
dst, 0,
sizeof(*
dst));
1024 for (
size_t i = 0;
i < ifd->
count;
i++) {
1048 uint32_t count,
const uint8_t *ifd_lead, uint32_t ifd_offset,
const void *
value)
1056 || ifd_lead && !ifd_offset || !ifd_lead && ifd_offset
1067 size_t required_size;
1081 src.ifd_lead = (uint8_t *) ifd_lead;
1082 src.ifd_offset = ifd_offset;
1104 for (
size_t i = 0;
i < ifd->
count;
i++) {
1144 size_t required_size;
1152 for (
size_t i = 0;
i <
ret->count;
i++) {
1169 {1, 8, 3, 6}, {4, 7, 2, 5},
1180 int rot = (int)(rotation + 0.5);
1181 rot = (((rot % 360) + 360) % 360) / 90;
1187 switch (orientation) {
1232 uint64_t orientation = 1;
1233 uint64_t
w =
frame->width;
1234 uint64_t
h =
frame->height;
1241 if (orientation != 1)
1242 av_log(logctx,
AV_LOG_DEBUG,
"matrix contains nontrivial EXIF orientation: %" PRIu64
"\n", orientation);
1244 for (
size_t i = 0;
i < ifd->
count;
i++) {
1260 for (
size_t j = 0; j < exif->
count; j++) {
1274 if (or && or->
value.
uint[0] != orientation) {
1290 if (
ph &&
ph->value.uint[0] !=
h) {
1292 ph->value.uint[0] =
h;
1294 if (!or && orientation != 1) {
1312 if (!pw &&
w &&
w < 0xFFFFu || !
ph &&
h &&
h < 0xFFFFu) {
1319 if (exif_found > 0) {
1330 if (!pw &&
w &&
w < 0xFFFFu) {
1335 if (!
ph &&
h &&
h < 0xFFFFu) {
1356 if (!buffer_ptr || *buffer_ptr)
int av_size_mult(size_t a, size_t b, size_t *r)
Multiply two size_t values checking for overflow.
@ AV_EXIF_T_OFF
The first four bytes point to the actual start, then it's AV_EXIF_TIFF_HEADER.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_BPRINT_SIZE_UNLIMITED
const char name[EXIF_TAG_NAME_LENGTH]
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
static int av_bprint_is_complete(const AVBPrint *buf)
Test if the print buffer is complete (not truncated).
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
static size_t exif_get_ifd_size(const AVExifMetadata *ifd)
static av_always_inline int bytestream2_get_bytes_left(const GetByteContext *g)
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.
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
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...
static av_always_inline int bytestream2_tell(const GetByteContext *g)
uint8_t * data
The data buffer.
static const size_t exif_sizes[]
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.
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...
static int FUNC() ph(CodedBitstreamContext *ctx, RWContext *rw, H266RawPH *current)
This structure describes decoded (raw) audio or video data.
static av_always_inline int bytestream2_seek(GetByteContext *g, int offset, int whence)
void av_display_matrix_flip(int32_t matrix[9], int hflip, int vflip)
Flip the input matrix horizontally and/or vertically.
static int exif_decode_tag(void *logctx, GetByteContext *gb, int le, int depth, AVExifEntry *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.
static const uint8_t sony_header[]
@ AV_FRAME_DATA_DISPLAYMATRIX
This side data contains a 3x3 transformation matrix describing an affine transformation that needs to...
void av_display_rotation_set(int32_t matrix[9], double angle)
Initialize a transformation matrix describing a pure clockwise rotation by the specified angle (in de...
int avpriv_exif_decode_ifd(void *logctx, const uint8_t *buf, int size, int le, int depth, AVDictionary **metadata)
AVBufferRef * av_buffer_ref(const AVBufferRef *buf)
Create a new reference to an AVBuffer.
static const uint8_t casio_header[]
static int exif_read_values(void *logctx, GetByteContext *gb, int le, AVExifEntry *entry)
void * av_memdup(const void *p, size_t size)
Duplicate a buffer with av_malloc().
static int exif_clone_entry(AVExifEntry *dst, const AVExifEntry *src)
void av_exif_free(AVExifMetadata *ifd)
Frees all resources associated with the given EXIF metadata struct.
static int exif_parse_ifd_list(void *logctx, GetByteContext *gb, int le, int depth, AVExifMetadata *ifd)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() or another memory allocation functio...
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define FF_ARRAY_ELEMS(a)
static av_always_inline void bytestream2_init_writer(PutByteContext *p, uint8_t *buf, int buf_size)
void * av_fast_realloc(void *ptr, unsigned int *size, size_t min_size)
Reallocate the given buffer if it is not large enough, otherwise do nothing.
static av_always_inline int bytestream2_tell_p(const PutByteContext *p)
static av_always_inline unsigned int bytestream2_put_buffer(PutByteContext *p, const uint8_t *src, unsigned int size)
static int exif_ifd_to_dict(void *logctx, const char *prefix, const AVExifMetadata *ifd, AVDictionary **metadata)
#define av_assert0(cond)
assert() equivalent, that is always enabled.
@ AV_EXIF_EXIF00
The first six bytes contain "Exif\0\0", then it's AV_EXIF_TIFF_HEADER.
AVExifMetadata * av_exif_clone_ifd(const AVExifMetadata *ifd)
Allocates a duplicate of the provided EXIF metadata struct.
static void tput64(PutByteContext *pb, const int le, const uint64_t value)
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
@ AV_EXIF_ASSUME_BE
skip the TIFF header, assume big endian
static int exif_remove_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, int depth)
static void exif_write_values(PutByteContext *pb, int le, const AVExifEntry *entry)
int32_t av_exif_get_tag_id(const char *name)
Retrieves the tag ID associated with the provided tag string name.
unsigned ff_tget_short(GetByteContext *gb, int le)
Reads a short from the bytestream using given endianness.
and forward the result(frame or status change) to the corresponding input. If nothing is possible
void av_buffer_unref(AVBufferRef **buf)
Free a given reference and automatically free the buffer if there are no more references to it.
@ AV_EXIF_TIFF_HEADER
The TIFF header starts with 0x49492a00, or 0x4d4d002a.
static const uint8_t fuji_header[]
static int BS_FUNC() tell(const BSCTX *bc)
Return number of bits already read.
static const uint8_t olympus1_header[]
static av_always_inline unsigned int bytestream2_get_buffer(GetByteContext *g, uint8_t *dst, unsigned int size)
#define MAKERNOTE_STRUCT(h, r)
static const uint8_t olympus2_header[]
@ AV_EXIF_ASSUME_LE
skip the TIFF header, assume little endian
int av_exif_remove_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, int flags)
Remove an entry from the provided EXIF metadata struct.
static const uint8_t foveon_header[]
static int exif_write_ifd(void *logctx, PutByteContext *pb, int le, int depth, const AVExifMetadata *ifd)
static const uint8_t panasonic_header[]
union AVExifEntry::@120 value
AVTiffDataType
Data type identifiers for TIFF tags.
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
int ff_tis_ifd(unsigned tag)
Returns a value > 0 if the tag is a known IFD-tag.
#define av_err2str(errnum)
Convenience macro, the return value should be used only directly in function arguments but never stan...
static const uint8_t sigma_header[]
static AVRational av_make_q(int num, int den)
Create an AVRational.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
static const struct exif_makernote_data makernote_data[]
AVBufferRef * av_buffer_alloc(size_t size)
Allocate an AVBuffer of the given size using av_malloc().
#define AV_EXIF_FLAG_RECURSIVE
Also check subdirectories.
static const uint8_t nikon_header[]
size_t size
Size of data in bytes.
static void tput16(PutByteContext *pb, const int le, const uint16_t value)
static void tput32(PutByteContext *pb, const int le, const uint32_t value)
#define i(width, name, range_min, range_max)
unsigned ff_tget_long(GetByteContext *gb, int le)
Reads a long from the bytestream using given endianness.
static int exif_get_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, int depth, AVExifEntry **value)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default value
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
static int exif_get_makernote_offset(GetByteContext *gb)
void * av_calloc(size_t nmemb, size_t size)
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
void av_bprintf(AVBPrint *buf, const char *fmt,...)
static const uint8_t aoc_header[]
double ff_tget_double(GetByteContext *gb, int le)
Reads a double from the bytestream using given endianness.
#define EXIF_TAG_NAME_LENGTH
the frame and frame reference mechanism is intended to as much as expensive copies of that data while still allowing the filters to produce correct results The data is stored in buffers represented by AVFrame structures Several references can point to the same frame buffer
#define EXIF_COPY(fname, srcname)
static av_always_inline int bytestream2_seek_p(PutByteContext *p, int offset, int whence)
int ff_tdecode_header(GetByteContext *gb, int *le, int *ifd_offset)
Decodes a TIFF header from the input bytestream and sets the endianness in *le and the offset to the ...
static const struct exif_tag tag_list[]
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...
static void exif_free_entry(AVExifEntry *entry)
A reference to a data buffer.
Structure to hold side data for an AVFrame.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
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 poi...
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.
@ AV_FRAME_DATA_EXIF
Extensible image file format metadata.
const char * av_exif_get_tag_name(uint16_t id)
Retrieves the tag name associated with the provided tag ID.
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
static const int rotation_lut[2][4]
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define MKTAG(a, b, c, d)
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 EXI...
#define AV_DICT_DONT_STRDUP_KEY
Take ownership of a key that's been allocated with av_malloc() or another memory allocation function.
double av_display_rotation_get(const int32_t matrix[9])
Extract the rotation component of the transformation matrix.