1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/libtheora/lib/huffman.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,70 @@ 1.4 +/******************************************************************** 1.5 + * * 1.6 + * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 1.7 + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 1.8 + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 1.9 + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 1.10 + * * 1.11 + * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 1.12 + * by the Xiph.Org Foundation and contributors http://www.xiph.org/ * 1.13 + * * 1.14 + ******************************************************************** 1.15 + 1.16 + function: 1.17 + last mod: $Id: huffman.h 16503 2009-08-22 18:14:02Z giles $ 1.18 + 1.19 + ********************************************************************/ 1.20 + 1.21 +#if !defined(_huffman_H) 1.22 +# define _hufffman_H (1) 1.23 +# include "theora/codec.h" 1.24 +# include "ocintrin.h" 1.25 + 1.26 +/*The range of valid quantized DCT coefficient values. 1.27 + VP3 used 511 in the encoder, but the bitstream is capable of 580.*/ 1.28 +#define OC_DCT_VAL_RANGE (580) 1.29 + 1.30 +#define OC_NDCT_TOKEN_BITS (5) 1.31 + 1.32 +#define OC_DCT_EOB1_TOKEN (0) 1.33 +#define OC_DCT_EOB2_TOKEN (1) 1.34 +#define OC_DCT_EOB3_TOKEN (2) 1.35 +#define OC_DCT_REPEAT_RUN0_TOKEN (3) 1.36 +#define OC_DCT_REPEAT_RUN1_TOKEN (4) 1.37 +#define OC_DCT_REPEAT_RUN2_TOKEN (5) 1.38 +#define OC_DCT_REPEAT_RUN3_TOKEN (6) 1.39 + 1.40 +#define OC_DCT_SHORT_ZRL_TOKEN (7) 1.41 +#define OC_DCT_ZRL_TOKEN (8) 1.42 + 1.43 +#define OC_ONE_TOKEN (9) 1.44 +#define OC_MINUS_ONE_TOKEN (10) 1.45 +#define OC_TWO_TOKEN (11) 1.46 +#define OC_MINUS_TWO_TOKEN (12) 1.47 + 1.48 +#define OC_DCT_VAL_CAT2 (13) 1.49 +#define OC_DCT_VAL_CAT3 (17) 1.50 +#define OC_DCT_VAL_CAT4 (18) 1.51 +#define OC_DCT_VAL_CAT5 (19) 1.52 +#define OC_DCT_VAL_CAT6 (20) 1.53 +#define OC_DCT_VAL_CAT7 (21) 1.54 +#define OC_DCT_VAL_CAT8 (22) 1.55 + 1.56 +#define OC_DCT_RUN_CAT1A (23) 1.57 +#define OC_DCT_RUN_CAT1B (28) 1.58 +#define OC_DCT_RUN_CAT1C (29) 1.59 +#define OC_DCT_RUN_CAT2A (30) 1.60 +#define OC_DCT_RUN_CAT2B (31) 1.61 + 1.62 +#define OC_NDCT_EOB_TOKEN_MAX (7) 1.63 +#define OC_NDCT_ZRL_TOKEN_MAX (9) 1.64 +#define OC_NDCT_VAL_MAX (23) 1.65 +#define OC_NDCT_VAL_CAT1_MAX (13) 1.66 +#define OC_NDCT_VAL_CAT2_MAX (17) 1.67 +#define OC_NDCT_VAL_CAT2_SIZE (OC_NDCT_VAL_CAT2_MAX-OC_DCT_VAL_CAT2) 1.68 +#define OC_NDCT_RUN_MAX (32) 1.69 +#define OC_NDCT_RUN_CAT1A_MAX (28) 1.70 + 1.71 +extern const unsigned char OC_DCT_TOKEN_EXTRA_BITS[TH_NDCT_TOKENS]; 1.72 + 1.73 +#endif