theoraenc.h
Go to the documentation of this file.
/********************************************************************
* *
* THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function:
last mod: $Id: theora.h,v 1.8 2004/03/15 22:17:32 derf Exp $
********************************************************************/
#if !defined(_O_THEORA_THEORAENC_H_)
# define _O_THEORA_THEORAENC_H_ (1)
# include <stddef.h>
# include <ogg/ogg.h>
# include "codec.h"
#if defined(__cplusplus)
extern "C" {
#endif
#define TH_ENCCTL_SET_HUFFMAN_CODES (0)
#define TH_ENCCTL_SET_QUANT_PARAMS (2)
#define TH_ENCCTL_SET_KEYFRAME_FREQUENCY_FORCE (4)
#define TH_ENCCTL_SET_VP3_COMPATIBLE (10)
#define TH_ENCCTL_GET_SPLEVEL_MAX (12)
#define TH_ENCCTL_SET_SPLEVEL (14)
#define TH_ENCCTL_GET_SPLEVEL (16)
#define TH_ENCCTL_SET_DUP_COUNT (18)
#define TH_ENCCTL_SET_RATE_FLAGS (20)
#define TH_ENCCTL_SET_RATE_BUFFER (22)
#define TH_ENCCTL_2PASS_OUT (24)
#define TH_ENCCTL_2PASS_IN (26)
#define TH_ENCCTL_SET_QUALITY (28)
#define TH_ENCCTL_SET_BITRATE (30)
#define TH_RATECTL_DROP_FRAMES (0x1)
#define TH_RATECTL_CAP_OVERFLOW (0x2)
#define TH_RATECTL_CAP_UNDERFLOW (0x4)
extern const th_quant_info TH_VP31_QUANT_INFO;
extern const th_huff_code
TH_VP31_HUFF_CODES[TH_NHUFFMAN_TABLES][TH_NDCT_TOKENS];
typedef struct th_enc_ctx th_enc_ctx;
extern th_enc_ctx *th_encode_alloc(const th_info *_info);
extern int th_encode_ctl(th_enc_ctx *_enc,int _req,void *_buf,size_t _buf_sz);
extern int th_encode_flushheader(th_enc_ctx *_enc,
th_comment *_comments,ogg_packet *_op);
extern int th_encode_ycbcr_in(th_enc_ctx *_enc,th_ycbcr_buffer _ycbcr);
extern int th_encode_packetout(th_enc_ctx *_enc,int _last,ogg_packet *_op);
extern void th_encode_free(th_enc_ctx *_enc);
#if defined(__cplusplus)
}
#endif
#endif
th_encode_ctl
int th_encode_ctl(th_enc_ctx *_enc, int _req, void *_buf, size_t _buf_sz)
Encoder control function.
th_quant_info
A complete set of quantization parameters.
Definition: codec.h:409
th_info
Theora bitstream information.
Definition: codec.h:204
th_huff_code
A Huffman code for a Theora DCT token.
Definition: codec.h:438
th_comment
The comment information.
Definition: codec.h:323
TH_VP31_HUFF_CODES
const th_huff_code TH_VP31_HUFF_CODES[TH_NHUFFMAN_TABLES][TH_NDCT_TOKENS]
The Huffman tables used by VP3.
codec.h
The shared libtheoradec and libtheoraenc C API.
th_encode_packetout
int th_encode_packetout(th_enc_ctx *_enc, int _last, ogg_packet *_op)
Retrieves encoded video data packets.
th_encode_free
void th_encode_free(th_enc_ctx *_enc)
Frees an allocated encoder instance.
TH_NHUFFMAN_TABLES
#define TH_NHUFFMAN_TABLES
The number of Huffman tables used by Theora.
Definition: codec.h:423
TH_VP31_QUANT_INFO
const th_quant_info TH_VP31_QUANT_INFO
The quantization parameters used by VP3.
TH_NDCT_TOKENS
#define TH_NDCT_TOKENS
The number of DCT token values in each table.
Definition: codec.h:425
th_enc_ctx
struct th_enc_ctx th_enc_ctx
The encoder context.
Definition: theoraenc.h:382
th_ycbcr_buffer
th_img_plane th_ycbcr_buffer[3]
A complete image buffer for an uncompressed frame.
Definition: codec.h:168
th_encode_ycbcr_in
int th_encode_ycbcr_in(th_enc_ctx *_enc, th_ycbcr_buffer _ycbcr)
Submits an uncompressed frame to the encoder.
th_encode_alloc
th_enc_ctx * th_encode_alloc(const th_info *_info)
Allocates an encoder instance.
th_encode_flushheader
int th_encode_flushheader(th_enc_ctx *_enc, th_comment *_comments, ogg_packet *_op)
Outputs the next header packet.