Go to the documentation of this file.
47 return le ? bytestream2_get_le16(gb) : bytestream2_get_be16(gb);
53 return le ? bytestream2_get_le32(gb) : bytestream2_get_be32(gb);
59 av_alias64
i = { .u64 = le ? bytestream2_get_le64(gb) : bytestream2_get_be64(gb)};
67 case TIFF_BYTE:
return bytestream2_get_byte(gb);
70 default:
return UINT_MAX;
74 static const char *
auto_sep(
int count,
const char *sep,
int i,
int columns)
81 return columns < count ?
"\n" :
"";
107 if (count >= INT_MAX /
sizeof(
int64_t) || count <= 0)
114 for (
i = 0;
i < count;
i++) {
130 if (count >= INT_MAX /
sizeof(
int32_t) || count <= 0)
137 for (
i = 0;
i < count;
i++) {
151 if (count >= INT_MAX /
sizeof(
int64_t) || count <= 0)
158 for (
i = 0;
i < count;
i++) {
172 if (count >= INT_MAX /
sizeof(int16_t) || count <= 0)
179 for (
i = 0;
i < count;
i++) {
194 if (count >= INT_MAX /
sizeof(int8_t) || count < 0)
201 for (
i = 0;
i < count;
i++) {
202 int v = is_signed ? (int8_t)bytestream2_get_byte(gb) : bytestream2_get_byte(gb);
235 *le = bytestream2_get_le16u(gb);
238 }
else if (*le ==
AV_RB16(
"MM")) {
255 unsigned *count,
int *next)
int ff_tadd_string_metadata(int count, const char *name, GetByteContext *gb, int le, AVDictionary **metadata)
Adds a string of count characters into the metadata dictionary.
#define AV_BPRINT_SIZE_UNLIMITED
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
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
static const char * auto_sep(int count, const char *sep, int i, int columns)
static av_always_inline int bytestream2_seek(GetByteContext *g, int offset, int whence)
int ff_tadd_rational_metadata(int count, const char *name, const char *sep, GetByteContext *gb, int le, AVDictionary **metadata)
Adds count rationals converted to a string into the metadata dictionary.
int ff_tadd_long_metadata(int count, const char *name, const char *sep, GetByteContext *gb, int le, AVDictionary **metadata)
Adds count longs converted to a string into the metadata dictionary.
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 FF_ARRAY_ELEMS(a)
int ff_tadd_shorts_metadata(int count, const char *name, const char *sep, GetByteContext *gb, int le, int is_signed, AVDictionary **metadata)
Adds count shorts converted to a string into the metadata dictionary.
unsigned ff_tget_short(GetByteContext *gb, int le)
Reads a short from the bytestream using given endianness.
static av_always_inline int bytestream2_get_bytes_left(GetByteContext *g)
static av_always_inline int bytestream2_tell(GetByteContext *g)
int ff_tread_tag(GetByteContext *gb, int le, unsigned *tag, unsigned *type, unsigned *count, int *next)
Reads the first 3 fields of a TIFF tag, which are the tag id, the tag type and the count of values fo...
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
int ff_tis_ifd(unsigned tag)
Returns a value > 0 if the tag is a known IFD-tag.
static int bprint_to_avdict(AVBPrint *bp, const char *name, AVDictionary **metadata)
#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.
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_bprintf(AVBPrint *buf, const char *fmt,...)
double ff_tget_double(GetByteContext *gb, int le)
Reads a double from the bytestream using given endianness.
static const uint16_t ifd_tags[]
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 av_always_inline unsigned int bytestream2_get_bufferu(GetByteContext *g, uint8_t *dst, unsigned int size)
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_tadd_doubles_metadata(int count, const char *name, const char *sep, GetByteContext *gb, int le, AVDictionary **metadata)
Adds count doubles converted to a string into the metadata dictionary.
int ff_tadd_bytes_metadata(int count, const char *name, const char *sep, GetByteContext *gb, int le, int is_signed, AVDictionary **metadata)
Adds count bytes converted to a string into the metadata dictionary.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static const uint8_t type_sizes[14]
sizes of various TIFF field types (string size = 100)
unsigned ff_tget(GetByteContext *gb, int type, int le)
Reads a byte from the bytestream using given endianness.
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_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_RB16