34 #define SMACKER_PAL 0x01 35 #define SMACKER_FLAG_RING_FRAME 0x01 84 0x00, 0x04, 0x08, 0x0C, 0x10, 0x14, 0x18, 0x1C,
85 0x20, 0x24, 0x28, 0x2C, 0x30, 0x34, 0x38, 0x3C,
86 0x41, 0x45, 0x49, 0x4D, 0x51, 0x55, 0x59, 0x5D,
87 0x61, 0x65, 0x69, 0x6D, 0x71, 0x75, 0x79, 0x7D,
88 0x82, 0x86, 0x8A, 0x8E, 0x92, 0x96, 0x9A, 0x9E,
89 0xA2, 0xA6, 0xAA, 0xAE, 0xB2, 0xB6, 0xBA, 0xBE,
90 0xC3, 0xC7, 0xCB, 0xCF, 0xD3, 0xD7, 0xDB, 0xDF,
91 0xE3, 0xE7, 0xEB, 0xEF, 0xF3, 0xF7, 0xFB, 0xFF
97 if(p->
buf[0] ==
'S' && p->
buf[1] ==
'M' && p->
buf[2] ==
'K' 98 && (p->
buf[3] ==
'2' || p->
buf[3] ==
'4'))
120 if (smk->
pts_inc > INT_MAX / 100) {
128 for(i = 0; i < 7; i++)
142 for(i = 0; i < 7; i++) {
148 if(smk->
frames > 0xFFFFFF) {
158 for(i = 0; i < smk->
frames; i++) {
161 for(i = 0; i < smk->
frames; i++) {
186 for(i = 0; i < 7; i++) {
225 "Cannot allocate %"PRIu32
" bytes of extradata\n",
268 int size, sz, t, off, j, pos;
272 memcpy(oldpal, pal, 768);
282 sz += (t & 0x7F) + 1;
283 pal += ((t & 0x7F) + 1) * 3;
287 if (off + j > 0x100) {
289 "Invalid palette update, offset=%d length=%d extends beyond palette size\n",
294 while(j-- && sz < 256) {
295 *pal++ = oldpal[off + 0];
296 *pal++ = oldpal[off + 1];
297 *pal++ = oldpal[off + 2];
314 for(i = 0; i < 7; i++) {
320 if (!size || size > frame_size) {
339 if (frame_size < 0 || frame_size >= INT_MAX/2)
345 pkt->
data[0] = palchange;
346 memcpy(pkt->
data + 1, smk->
pal, 768);
348 if(ret != frame_size)
352 pkt->
size = ret + 769;
376 for(i = 0; i < 7; i++)
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static const uint8_t frame_size[4]
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int index
stream index in AVFormatContext
av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (%s)\, len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic ? ac->func_descr_generic :ac->func_descr)
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
#define AV_CH_LAYOUT_STEREO
8 bits with AV_PIX_FMT_RGB32 palette
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
int av_reallocp(void *ptr, size_t size)
Allocate or reallocate a block of memory.
#define AVERROR_EOF
End of file.
static av_cold int read_close(AVFormatContext *ctx)
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
uint64_t channel_layout
Audio only.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
unsigned int avio_rl32(AVIOContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
enum AVMediaType codec_type
General type of the encoded data.
int extradata_size
Size of the extradata content in bytes.
int avio_r8(AVIOContext *s)
int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max)
Reduce a fraction.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
audio channel layout utility functions
static int read_header(FFV1Context *f)
AVIOContext * pb
I/O context.
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
This structure contains the data a format has to probe a file.
int64_t duration
Decoding: duration of the stream, in stream time base.
int sample_rate
Audio only.
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
int eof_reached
true if eof reached
void * priv_data
Format private data.
int bits_per_coded_sample
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
AVCodecParameters * codecpar
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
unsigned int avio_rl24(AVIOContext *s)
#define AV_CH_LAYOUT_MONO
#define MKTAG(a, b, c, d)
This structure stores compressed data.
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...