libtheora 1.1.1
theoradec.h
Go to the documentation of this file.
1/********************************************************************
2 * *
3 * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. *
4 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
5 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
6 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
7 * *
8 * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
9 * by the Xiph.Org Foundation http://www.xiph.org/ *
10 * *
11 ********************************************************************
12
13 function:
14 last mod: $Id: theora.h,v 1.8 2004/03/15 22:17:32 derf Exp $
15
16 ********************************************************************/
17
21#if !defined(_O_THEORA_THEORADEC_H_)
22# define _O_THEORA_THEORADEC_H_ (1)
23# include <stddef.h>
24# include <ogg/ogg.h>
25# include "codec.h"
26
27#if defined(__cplusplus)
28extern "C" {
29#endif
30
31
32
50#define TH_DECCTL_GET_PPLEVEL_MAX (1)
67#define TH_DECCTL_SET_PPLEVEL (3)
79#define TH_DECCTL_SET_GRANPOS (5)
93#define TH_DECCTL_SET_STRIPE_CB (7)
94
96#define TH_DECCTL_SET_TELEMETRY_MBMODE (9)
98#define TH_DECCTL_SET_TELEMETRY_MV (11)
100#define TH_DECCTL_SET_TELEMETRY_QI (13)
102#define TH_DECCTL_SET_TELEMETRY_BITS (15)
138typedef void (*th_stripe_decoded_func)(void *_ctx,th_ycbcr_buffer _buf,
139 int _yfrag0,int _yfrag_end);
140
142typedef struct{
145 void *ctx;
149
150
151
159typedef struct th_dec_ctx th_dec_ctx;
231extern int th_decode_headerin(th_info *_info,th_comment *_tc,
232 th_setup_info **_setup,ogg_packet *_op);
255extern th_dec_ctx *th_decode_alloc(const th_info *_info,
256 const th_setup_info *_setup);
262extern void th_setup_free(th_setup_info *_setup);
271extern int th_decode_ctl(th_dec_ctx *_dec,int _req,void *_buf,
272 size_t _buf_sz);
294extern int th_decode_packetin(th_dec_ctx *_dec,const ogg_packet *_op,
295 ogg_int64_t *_granpos);
312 th_ycbcr_buffer _ycbcr);
315extern void th_decode_free(th_dec_ctx *_dec);
318
319
320
321#if defined(__cplusplus)
322}
323#endif
324
325#endif
The shared libtheoradec and libtheoraenc C API.
th_img_plane th_ycbcr_buffer[3]
A complete image buffer for an uncompressed frame.
Definition codec.h:168
The comment information.
Definition codec.h:323
Theora bitstream information.
Definition codec.h:204
The striped decode callback data to pass to TH_DECCTL_SET_STRIPE_CB.
Definition theoradec.h:142
th_stripe_decoded_func stripe_decoded
The callback function pointer.
Definition theoradec.h:147
void * ctx
An application-provided context pointer.
Definition theoradec.h:145
int th_decode_headerin(th_info *_info, th_comment *_tc, th_setup_info **_setup, ogg_packet *_op)
Decodes the header packets of a Theora stream.
int th_decode_ctl(th_dec_ctx *_dec, int _req, void *_buf, size_t _buf_sz)
Decoder control function.
int th_decode_packetin(th_dec_ctx *_dec, const ogg_packet *_op, ogg_int64_t *_granpos)
Submits a packet containing encoded video data to the decoder.
th_dec_ctx * th_decode_alloc(const th_info *_info, const th_setup_info *_setup)
Allocates a decoder instance.
struct th_dec_ctx th_dec_ctx
The decoder context.
Definition theoradec.h:159
int th_decode_ycbcr_out(th_dec_ctx *_dec, th_ycbcr_buffer _ycbcr)
Outputs the next available frame of decoded Y'CbCr data.
void(* th_stripe_decoded_func)(void *_ctx, th_ycbcr_buffer _buf, int _yfrag0, int _yfrag_end)
A callback function for striped decode.
Definition theoradec.h:138
struct th_setup_info th_setup_info
Setup information.
Definition theoradec.h:166
void th_setup_free(th_setup_info *_setup)
Releases all storage used for the decoder setup information.
void th_decode_free(th_dec_ctx *_dec)
Frees an allocated decoder instance.