Go to the documentation of this file.
58 info->pbu_type = bytestream2_get_byte(gbc);
59 info->group_id = bytestream2_get_be16(gbc);
61 zero = bytestream2_get_byte(gbc);
68 info->profile_idc = bytestream2_get_byte(gbc);
69 info->level_idc = bytestream2_get_byte(gbc);
71 byte = bytestream2_get_byte(gbc);
72 info->band_idc =
byte >> 3;
77 info->frame_width = bytestream2_get_be24(gbc);
78 info->frame_height = bytestream2_get_be24(gbc);
79 if (
info->frame_width < 1 ||
info->frame_width > 65536 ||
80 info->frame_height < 1 ||
info->frame_height > 65536)
83 byte = bytestream2_get_byte(gbc);
84 info->chroma_format_idc =
byte >> 4;
85 info->bit_depth_minus8 =
byte & 0xf;
87 if (
info->bit_depth_minus8 > 8) {
90 if (
info->bit_depth_minus8 % 2) {
94 bit_depth_index =
info->bit_depth_minus8 / 2;
96 switch (
info->chroma_format_idc) {
110 zero = bytestream2_get_byte(gbc);
131 au_size = bytestream2_get_be32(&gbc);
141 pbu_size = bytestream2_get_be32(&gbc);
173 au_size = bytestream2_get_be32(&gbc);
183 pbu_size = bytestream2_get_be32(&gbc);
221 if (au_size < 24 || au_size > 1 << 24) {
223 "APV AU has invalid size: %"PRIu32
"\n", au_size);
242 .p.extensions =
"apv",
AVPixelFormat
Pixel format.
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
enum AVMediaType codec_type
General type of the encoded data.
static enum AVPixelFormat apv_format_table[5][5]
AVStream * avformat_new_stream(AVFormatContext *s, const struct AVCodec *c)
Add a new stream to a media file.
#define AVERROR_EOF
End of file.
AVRational avg_frame_rate
Average framerate.
int buf_size
Size of buf except extra allocated bytes.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
static av_always_inline void bytestream2_skip(GetByteContext *g, unsigned int size)
#define AV_PIX_FMT_YUVA444P16
#define AV_PIX_FMT_GRAY16
static const char signature[]
#define AV_PIX_FMT_YUV444P10
unsigned int avio_rb32(AVIOContext *s)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define AV_PIX_FMT_YUV422P16
#define AV_PIX_FMT_YUV444P16
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
#define AV_PIX_FMT_YUVA444P12
#define AV_PIX_FMT_GRAY14
static int apv_read_packet(AVFormatContext *s, AVPacket *pkt)
#define AV_PIX_FMT_GRAY10
#define FF_INFMT_FLAG_INIT_CLEANUP
For an FFInputFormat with this flag set read_close() needs to be called by the caller upon read_heade...
AVCodecParameters * codecpar
Codec parameters associated with this stream.
static int apv_probe(const AVProbeData *p)
Rational number (pair of numerator and denominator).
This structure contains the data a format has to probe a file.
#define AV_PIX_FMT_YUV422P10
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
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_WB16 unsigned int_TMPL byte
#define AV_PIX_FMT_YUV422P12
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
#define AV_PIX_FMT_YUV444P12
int profile
Codec-specific bitstream restrictions that the stream conforms to.
static const uint8_t header[24]
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
int ffio_ensure_seekback(AVIOContext *s, int64_t buf_size)
Ensures that the requested seekback buffer size will be available.
#define AV_PIX_FMT_YUVA444P10
int flags
A combination of AV_PKT_FLAG values.
static int zero(InterplayACMContext *s, unsigned ind, unsigned col)
static int apv_extract_header_info(APVHeaderInfo *info, GetByteContext *gbc)
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
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
const FFInputFormat ff_apv_demuxer
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
static int apv_read_header(AVFormatContext *s)
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_PIX_FMT_GRAY12
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.