26 #include "libavutil/bswap.h"
70 "Too old or unsupported Theora (%x)\n", thp->
version);
84 if ( width <= st->codec->width && width > st->
codec->
width-16
85 && height <= st->codec->height && height > st->
codec->
height-16)
92 if (!(timebase.
num > 0 && timebase.
den > 0)) {
132 *cdp++ = os->
psize >> 8;
133 *cdp++ = os->
psize & 0xff;
146 uint64_t iframe, pframe;
152 pframe = gp & thp->
gpmask;
161 *dts = iframe + pframe;
163 return iframe + pframe;
181 for (seg = os->
segp; seg < os->
nsegs; seg++) {
203 .
magic =
"\200theora",
struct ogg_codec ff_theora_codec
Copyright (C) 2005 Michael Ahlberg, Måns Rullgård.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
#define AV_LOG_WARNING
Something somehow does not look correct.
static uint64_t theora_gptopts(AVFormatContext *ctx, int idx, uint64_t gp, int64_t *dts)
static void skip_bits_long(GetBitContext *s, int n)
Copyright (C) 2005 Matthieu CASTET, Alex Beregszaszi.
AVCodecContext * codec
Codec context associated with this stream.
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown)
void avcodec_set_dimensions(AVCodecContext *s, int width, int height)
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
enum AVStreamParseType need_parsing
int av_reallocp(void *ptr, size_t size)
Allocate or reallocate a block of memory.
bitstream reader API header.
int ff_vorbis_comment(AVFormatContext *ms, AVDictionary **m, const uint8_t *buf, int size)
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void * priv_data
Format private data.
static int theora_packet(AVFormatContext *s, int idx)
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
int width
picture width / height.
struct ogg_stream * streams
enum AVMediaType codec_type
BYTE int const BYTE int int int height
static void skip_bits(GetBitContext *s, int n)
rational number numerator/denominator
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
static unsigned int get_bits_long(GetBitContext *s, int n)
Read 0-32 bits.
int64_t duration
Decoding: duration of the stream, in stream time base.
static int theora_header(AVFormatContext *s, int idx)
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base...
#define AV_NOPTS_VALUE
Undefined timestamp value.
void * av_mallocz(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...