1 /********************************************************************
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. *
8 * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2007 *
9 * by the Xiph.Org Foundation http://www.xiph.org/ *
11 ********************************************************************
14 last mod: $Id: decint.h 14369 2008-01-05 23:15:32Z tterribe $
16 ********************************************************************/
19 #if !defined(_decint_H)
20 # define _decint_H (1)
21 # include "theora/theoradec.h"
22 # include "../internal.h"
25 typedef struct th_setup_info oc_setup_info
;
26 typedef struct th_dec_ctx oc_dec_ctx
;
32 /*Constants for the packet-in state machine specific to the decoder.*/
34 /*Next packet to read: Data packet.*/
35 #define OC_PACKET_DATA (0)
40 /*The Huffman codes.*/
41 oc_huff_node
*huff_tables
[TH_NHUFFMAN_TABLES
];
42 /*The quantization parameters.*/
49 /*Shared encoder/decoder state.*/
50 oc_theora_state state
;
51 /*Whether or not packets are ready to be emitted.
52 This takes on negative values while there are remaining header packets to
53 be emitted, reaches 0 when the codec is ready for input, and goes to 1
54 when a frame has been processed and a data packet is ready.*/
56 /*Buffer in which to assemble packets.*/
58 /*Huffman decode trees.*/
59 oc_huff_node
*huff_tables
[TH_NHUFFMAN_TABLES
];
60 /*The index of one past the last token in each plane for each coefficient.
61 The final entries are the total number of tokens for each coefficient.*/
63 /*The index of one past the last extra bits entry in each plane for each
65 The final entries are the total number of extra bits entries for each
68 /*The number of outstanding EOB runs at the start of each coefficient in each
71 /*The DCT token lists.*/
72 unsigned char **dct_tokens
;
73 /*The extra bits associated with DCT tokens.*/
74 ogg_uint16_t
**extra_bits
;
75 /*The out-of-loop post-processing level.*/
77 /*The DC scale used for out-of-loop deblocking.*/
79 /*The sharpen modifier used for out-of-loop deringing.*/
81 /*The DC quantization index of each block.*/
82 unsigned char *dc_qis
;
83 /*The variance of each block.*/
85 /*The storage for the post-processed frame buffer.*/
86 unsigned char *pp_frame_data
;
87 /*Whether or not the post-processsed frame buffer has space for chroma.*/
88 int pp_frame_has_chroma
;
89 /*The buffer used for the post-processed frame.*/
90 th_ycbcr_buffer pp_frame_buf
;
91 /*The striped decode callback function.*/
92 th_stripe_callback stripe_cb
;