Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /******************************************************************** |
michael@0 | 2 | * * |
michael@0 | 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * |
michael@0 | 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
michael@0 | 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
michael@0 | 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
michael@0 | 7 | * * |
michael@0 | 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * |
michael@0 | 9 | * by the Xiph.Org Foundation and contributors http://www.xiph.org/ * |
michael@0 | 10 | * * |
michael@0 | 11 | ******************************************************************** |
michael@0 | 12 | |
michael@0 | 13 | function: |
michael@0 | 14 | last mod: $Id: huffman.h 16503 2009-08-22 18:14:02Z giles $ |
michael@0 | 15 | |
michael@0 | 16 | ********************************************************************/ |
michael@0 | 17 | |
michael@0 | 18 | #if !defined(_huffman_H) |
michael@0 | 19 | # define _hufffman_H (1) |
michael@0 | 20 | # include "theora/codec.h" |
michael@0 | 21 | # include "ocintrin.h" |
michael@0 | 22 | |
michael@0 | 23 | /*The range of valid quantized DCT coefficient values. |
michael@0 | 24 | VP3 used 511 in the encoder, but the bitstream is capable of 580.*/ |
michael@0 | 25 | #define OC_DCT_VAL_RANGE (580) |
michael@0 | 26 | |
michael@0 | 27 | #define OC_NDCT_TOKEN_BITS (5) |
michael@0 | 28 | |
michael@0 | 29 | #define OC_DCT_EOB1_TOKEN (0) |
michael@0 | 30 | #define OC_DCT_EOB2_TOKEN (1) |
michael@0 | 31 | #define OC_DCT_EOB3_TOKEN (2) |
michael@0 | 32 | #define OC_DCT_REPEAT_RUN0_TOKEN (3) |
michael@0 | 33 | #define OC_DCT_REPEAT_RUN1_TOKEN (4) |
michael@0 | 34 | #define OC_DCT_REPEAT_RUN2_TOKEN (5) |
michael@0 | 35 | #define OC_DCT_REPEAT_RUN3_TOKEN (6) |
michael@0 | 36 | |
michael@0 | 37 | #define OC_DCT_SHORT_ZRL_TOKEN (7) |
michael@0 | 38 | #define OC_DCT_ZRL_TOKEN (8) |
michael@0 | 39 | |
michael@0 | 40 | #define OC_ONE_TOKEN (9) |
michael@0 | 41 | #define OC_MINUS_ONE_TOKEN (10) |
michael@0 | 42 | #define OC_TWO_TOKEN (11) |
michael@0 | 43 | #define OC_MINUS_TWO_TOKEN (12) |
michael@0 | 44 | |
michael@0 | 45 | #define OC_DCT_VAL_CAT2 (13) |
michael@0 | 46 | #define OC_DCT_VAL_CAT3 (17) |
michael@0 | 47 | #define OC_DCT_VAL_CAT4 (18) |
michael@0 | 48 | #define OC_DCT_VAL_CAT5 (19) |
michael@0 | 49 | #define OC_DCT_VAL_CAT6 (20) |
michael@0 | 50 | #define OC_DCT_VAL_CAT7 (21) |
michael@0 | 51 | #define OC_DCT_VAL_CAT8 (22) |
michael@0 | 52 | |
michael@0 | 53 | #define OC_DCT_RUN_CAT1A (23) |
michael@0 | 54 | #define OC_DCT_RUN_CAT1B (28) |
michael@0 | 55 | #define OC_DCT_RUN_CAT1C (29) |
michael@0 | 56 | #define OC_DCT_RUN_CAT2A (30) |
michael@0 | 57 | #define OC_DCT_RUN_CAT2B (31) |
michael@0 | 58 | |
michael@0 | 59 | #define OC_NDCT_EOB_TOKEN_MAX (7) |
michael@0 | 60 | #define OC_NDCT_ZRL_TOKEN_MAX (9) |
michael@0 | 61 | #define OC_NDCT_VAL_MAX (23) |
michael@0 | 62 | #define OC_NDCT_VAL_CAT1_MAX (13) |
michael@0 | 63 | #define OC_NDCT_VAL_CAT2_MAX (17) |
michael@0 | 64 | #define OC_NDCT_VAL_CAT2_SIZE (OC_NDCT_VAL_CAT2_MAX-OC_DCT_VAL_CAT2) |
michael@0 | 65 | #define OC_NDCT_RUN_MAX (32) |
michael@0 | 66 | #define OC_NDCT_RUN_CAT1A_MAX (28) |
michael@0 | 67 | |
michael@0 | 68 | extern const unsigned char OC_DCT_TOKEN_EXTRA_BITS[TH_NDCT_TOKENS]; |
michael@0 | 69 | |
michael@0 | 70 | #endif |