Go to the documentation of this file.
38 #define FORM_TAG MKBETAG('F', 'O', 'R', 'M')
39 #define WVQA_TAG MKBETAG('W', 'V', 'Q', 'A')
40 #define VQHD_TAG MKBETAG('V', 'Q', 'H', 'D')
41 #define FINF_TAG MKBETAG('F', 'I', 'N', 'F')
42 #define SND0_TAG MKBETAG('S', 'N', 'D', '0')
43 #define SND1_TAG MKBETAG('S', 'N', 'D', '1')
44 #define SND2_TAG MKBETAG('S', 'N', 'D', '2')
45 #define VQFR_TAG MKBETAG('V', 'Q', 'F', 'R')
46 #define VQFL_TAG MKBETAG('V', 'Q', 'F', 'L')
49 #define CINF_TAG MKBETAG('C', 'I', 'N', 'F')
50 #define CINH_TAG MKBETAG('C', 'I', 'N', 'H')
51 #define CIND_TAG MKBETAG('C', 'I', 'N', 'D')
52 #define LINF_TAG MKBETAG('L', 'I', 'N', 'F')
53 #define PINF_TAG MKBETAG('P', 'I', 'N', 'F')
54 #define PINH_TAG MKBETAG('P', 'I', 'N', 'H')
55 #define PIND_TAG MKBETAG('P', 'I', 'N', 'D')
56 #define CMDS_TAG MKBETAG('C', 'M', 'D', 'S')
57 #define SN2J_TAG MKBETAG('S', 'N', '2', 'J')
58 #define VIEW_TAG MKBETAG('V', 'I', 'E', 'W')
59 #define ZBUF_TAG MKBETAG('Z', 'B', 'U', 'F')
61 #define VQA_HEADER_SIZE 0x2A
62 #define VQA_PREAMBLE_SIZE 8
122 if (fps < 1 || fps > 30) {
143 chunk_tag =
AV_RB32(&scratch[0]);
144 chunk_size =
AV_RB32(&scratch[4]);
185 chunk_type =
AV_RB32(&preamble[0]);
186 chunk_size =
AV_RB32(&preamble[4]);
190 skip_byte = chunk_size & 0x01;
198 if (chunk_size > 3 * (1 << 20))
214 switch (chunk_type) {
237 switch (chunk_type) {
239 if (wsvqa->
bps == 16)
257 switch (chunk_type) {
285 if (
avio_seek(pb, current_pos, SEEK_SET) < 0)
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
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.
AVStream * avformat_new_stream(AVFormatContext *s, const struct AVCodec *c)
Add a new stream to a media file.
static int wsvqa_read_packet(AVFormatContext *s, AVPacket *pkt)
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
int buf_size
Size of buf except extra allocated bytes.
int ff_get_extradata(void *logctx, AVCodecParameters *par, AVIOContext *pb, int size)
Allocate extradata with additional AV_INPUT_BUFFER_PADDING_SIZE at end which is always set to 0 and f...
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
int64_t duration
Decoding: duration of the stream, in stream time base.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
AVCodecParameters * codecpar
Codec parameters associated with this stream.
static int read_header(FFV1Context *f)
@ AV_CODEC_ID_ADPCM_IMA_WS
This structure contains the data a format has to probe a file.
AVChannelLayout ch_layout
Audio only.
int sample_rate
Audio only.
int64_t nb_frames
number of frames in this stream if known or 0
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define VQA_PREAMBLE_SIZE
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
static const uint8_t header[24]
int ffio_ensure_seekback(AVIOContext *s, int64_t buf_size)
Ensures that the requested seekback buffer size will be available.
#define AV_LOG_INFO
Standard information.
void av_channel_layout_default(AVChannelLayout *ch_layout, int nb_channels)
Get the default channel layout for a given number of channels.
static int wsvqa_read_header(AVFormatContext *s)
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
@ AV_CODEC_ID_WESTWOOD_SND1
int index
stream index in AVFormatContext
static int wsvqa_probe(const AVProbeData *p)
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
static int read_probe(const AVProbeData *p)
int bits_per_coded_sample
The number of bits per sample in the codedwords.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
int64_t pos
byte position in stream, -1 if unknown
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base.
const FFInputFormat ff_wsvqa_demuxer
#define av_fourcc2str(fourcc)