00001 /******************************************************************** 00002 * * 00003 * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 00004 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 00005 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 00006 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 00007 * * 00008 * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2003 * 00009 * by the Xiph.Org Foundation http://www.xiph.org/ * 00010 * * 00011 ******************************************************************** 00012 00013 function: 00014 last mod: $Id: theora.h,v 1.8 2004/03/15 22:17:32 derf Exp $ 00015 00016 ********************************************************************/ 00017 00021 #if !defined(_O_THEORA_THEORAENC_H_) 00022 # define _O_THEORA_THEORAENC_H_ (1) 00023 # include <stddef.h> 00024 # include <ogg/ogg.h> 00025 # include "codec.h" 00026 00027 #if defined(__cplusplus) 00028 extern "C" { 00029 #endif 00030 00031 00032 00053 #define TH_ENCCTL_SET_HUFFMAN_CODES (0) 00054 00072 #define TH_ENCCTL_SET_QUANT_PARAMS (2) 00073 00085 #define TH_ENCCTL_SET_KEYFRAME_FREQUENCY_FORCE (4) 00086 00113 #define TH_ENCCTL_SET_VP3_COMPATIBLE (10) 00114 00127 #define TH_ENCCTL_GET_SPLEVEL_MAX (12) 00128 00141 #define TH_ENCCTL_SET_SPLEVEL (14) 00142 00167 #define TH_ENCCTL_SET_DUP_COUNT (18) 00168 00187 #define TH_ENCCTL_SET_RATE_FLAGS (20) 00188 00213 #define TH_ENCCTL_SET_RATE_BUFFER (22) 00214 00243 #define TH_ENCCTL_2PASS_OUT (24) 00244 00289 #define TH_ENCCTL_2PASS_IN (26) 00290 00305 #define TH_ENCCTL_SET_QUALITY (28) 00306 00326 #define TH_ENCCTL_SET_BITRATE (30) 00327 00338 #define TH_RATECTL_DROP_FRAMES (0x1) 00339 00346 #define TH_RATECTL_CAP_OVERFLOW (0x2) 00347 00353 #define TH_RATECTL_CAP_UNDERFLOW (0x4) 00354 00359 extern const th_quant_info TH_VP31_QUANT_INFO; 00360 00362 extern const th_huff_code 00363 TH_VP31_HUFF_CODES[TH_NHUFFMAN_TABLES][TH_NDCT_TOKENS]; 00364 00365 00366 00374 typedef struct th_enc_ctx th_enc_ctx; 00404 extern th_enc_ctx *th_encode_alloc(const th_info *_info); 00413 extern int th_encode_ctl(th_enc_ctx *_enc,int _req,void *_buf,size_t _buf_sz); 00431 extern int th_encode_flushheader(th_enc_ctx *_enc, 00432 th_comment *_comments,ogg_packet *_op); 00441 extern int th_encode_ycbcr_in(th_enc_ctx *_enc,th_ycbcr_buffer _ycbcr); 00465 extern int th_encode_packetout(th_enc_ctx *_enc,int _last,ogg_packet *_op); 00468 extern void th_encode_free(th_enc_ctx *_enc); 00471 00472 00473 00474 #if defined(__cplusplus) 00475 } 00476 #endif 00477 00478 #endif