75 #define HUFFMAN_TABLE_SIZE (64 * 1024)
114 if ((number == 0) || (number > 1024))
119 if ((number == 0) || (number > 1024))
124 if ((number != 0) && ((number < 8000) | (number > 48000)))
147 unsigned int sample_rate, bytes_per_sample, channels;
187 st->
codec->
bit_rate = sample_rate * bytes_per_sample * 8 * channels;
189 if (bytes_per_sample == 1)
194 if (sample_rate % 14 != 0) {
196 bytes_per_sample * channels;
198 bytes_per_sample * channels;
201 (sample_rate / 14) * bytes_per_sample * channels;
217 unsigned int command;
218 unsigned int chunk_size;
223 unsigned char r,
g,
b;
224 unsigned char palette_buffer[768];
225 uint32_t palette[256];
234 }
else if (command == 1) {
236 if (
avio_read(pb, palette_buffer, 768) != 768)
240 for (i = 0; i < 768; i++)
241 if (palette_buffer[i] > 63) {
246 for (i = 0; i < 256; i++) {
247 r = palette_buffer[i * 3 ] << palette_scale;
248 g = palette_buffer[i * 3 + 1] << palette_scale;
249 b = palette_buffer[i * 3 + 2] << palette_scale;
250 palette[i] = (r << 16) | (g << 8) | (
b);
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
#define HUFFMAN_TABLE_SIZE
int index
stream index in AVFormatContext
int block_align
number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs...
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
unsigned int avio_rl32(AVIOContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
AVStream * avformat_new_stream(AVFormatContext *s, AVCodec *c)
Add a new stream to a media file.
static int idcin_read_packet(AVFormatContext *s, AVPacket *pkt)
AVCodecContext * codec
Codec context associated with this stream.
int buf_size
Size of buf except extra allocated bytes.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
static int idcin_probe(AVProbeData *p)
int bit_rate
the average bitrate
int width
picture width / height.
static av_always_inline int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
static int read_header(FFV1Context *f)
struct IdcinDemuxContext IdcinDemuxContext
enum AVMediaType codec_type
int sample_rate
samples per second
AVIOContext * pb
I/O context.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
This structure contains the data a format has to probe a file.
#define AVPROBE_SCORE_MAX
int eof_reached
true if eof reached
int channels
number of audio channels
void * priv_data
Format private data.
static int idcin_read_header(AVFormatContext *s)
AVInputFormat ff_idcin_demuxer
uint8_t * av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int size)
Allocate new information of a packet.
This structure stores compressed data.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...