~ubuntu-branches/ubuntu/hardy/avidemux/hardy

« back to all changes in this revision

Viewing changes to avidemux/ADM_vp32/include/Huffman.h

  • Committer: Bazaar Package Importer
  • Author(s): Matvey Kozhev
  • Date: 2007-12-18 13:53:04 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20071218135304-cdqec2lg2bglyz15
Tags: 1:2.4~preview3-0.0ubuntu1
* Upload to Ubuntu. (LP: #163287, LP: #126572)
* debian/changelog: re-added Ubuntu releases.
* debian/control:
  - Require debhelper >= 5.0.51 (for dh_icons) and imagemagick.
  - Build-depend on libsdl1.2-dev instead of libsdl-dev.
  - Build against newer libx264-dev. (LP: #138854)
  - Removed libamrnb-dev, not in Ubuntu yet.
* debian/rules:
  - Install all icon sizes, using convert (upstream installs none).
  - Added missing calls to dh_installmenu, dh_installman, dh_icons and
    dh_desktop.
* debian/menu, debian/avidemux-qt.menu:
  - Corrected package and executable names.
* debian/avidemux-common.install: Install icons.
* debian/avidemux.common.manpages: Install man/avidemux.1.
* debian/links, debian/avidemux-cli.links, debian/avidemux-gtk.links:
  - Link manpages to avidemux.1.gz.
* debian/install, debian/avidemux-qt.install, debian/avidemux-gtk.desktop,
  debian/avidemux-qt.desktop: Install desktop files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//==========================================================================
2
 
//
3
 
//  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
4
 
//  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
5
 
//  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
6
 
//  PURPOSE.
7
 
//
8
 
//  Copyright (c) 1999 - 2001  On2 Technologies Inc. All Rights Reserved.
9
 
//
10
 
//--------------------------------------------------------------------------
11
 
 
12
 
 
13
 
/****************************************************************************
14
 
*
15
 
*   Module Title :     Huffman.h
16
 
*
17
 
*   Description  :     Video CODEC
18
 
*
19
 
*
20
 
*****************************************************************************
21
 
*/
22
 
 
23
 
#ifndef HUFFMAN_H
24
 
#define HUFFMAN_H
25
 
 
26
 
#include "type_aliases.h"
27
 
/****************************************************************************
28
 
*  Constants
29
 
*****************************************************************************
30
 
*/
31
 
#define NUM_HUFF_TABLES         80
32
 
#define DC_HUFF_OFFSET          0
33
 
#define AC_HUFF_OFFSET          16
34
 
#define AC_TABLE_2_THRESH       5
35
 
#define AC_TABLE_3_THRESH       14
36
 
#define AC_TABLE_4_THRESH       27
37
 
 
38
 
#define DC_HUFF_CHOICES         16
39
 
#define DC_HUFF_CHOICE_BITS     4
40
 
 
41
 
#define AC_HUFF_CHOICES         16
42
 
#define AC_HUFF_CHOICE_BITS     4
43
 
 
44
 
// Constants assosciated with entropy tokenisation. 
45
 
#define MAX_SINGLE_TOKEN_VALUE  6
46
 
#define DCT_VAL_CAT2_MIN        3
47
 
#define DCT_VAL_CAT3_MIN        7
48
 
#define DCT_VAL_CAT4_MIN        9
49
 
#define DCT_VAL_CAT5_MIN        13
50
 
#define DCT_VAL_CAT6_MIN        21
51
 
#define DCT_VAL_CAT7_MIN        37
52
 
#define DCT_VAL_CAT8_MIN        69
53
 
 
54
 
#define DCT_EOB_TOKEN           0
55
 
#define DCT_EOB_PAIR_TOKEN      1
56
 
#define DCT_EOB_TRIPLE_TOKEN    2
57
 
#define DCT_REPEAT_RUN_TOKEN    3
58
 
#define DCT_REPEAT_RUN2_TOKEN   4
59
 
#define DCT_REPEAT_RUN3_TOKEN   5
60
 
#define DCT_REPEAT_RUN4_TOKEN   6
61
 
 
62
 
#define DCT_SHORT_ZRL_TOKEN     7
63
 
#define DCT_ZRL_TOKEN           8
64
 
 
65
 
#define ONE_TOKEN               9       // Special tokens for -1,1,-2,2
66
 
#define MINUS_ONE_TOKEN         10 
67
 
#define TWO_TOKEN               11 
68
 
#define MINUS_TWO_TOKEN         12 
69
 
 
70
 
#define LOW_VAL_TOKENS          (MINUS_TWO_TOKEN + 1)
71
 
#define DCT_VAL_CATEGORY3       (LOW_VAL_TOKENS + 4)
72
 
#define DCT_VAL_CATEGORY4       (DCT_VAL_CATEGORY3 + 1)
73
 
#define DCT_VAL_CATEGORY5       (DCT_VAL_CATEGORY4 + 1)
74
 
#define DCT_VAL_CATEGORY6       (DCT_VAL_CATEGORY5 + 1)
75
 
#define DCT_VAL_CATEGORY7       (DCT_VAL_CATEGORY6 + 1)
76
 
#define DCT_VAL_CATEGORY8       (DCT_VAL_CATEGORY7 + 1)
77
 
 
78
 
#define DCT_RUN_CATEGORY1       (DCT_VAL_CATEGORY8 + 1)
79
 
#define DCT_RUN_CATEGORY1B      (DCT_RUN_CATEGORY1 + 5)
80
 
#define DCT_RUN_CATEGORY1C      (DCT_RUN_CATEGORY1B + 1)
81
 
#define DCT_RUN_CATEGORY2       (DCT_RUN_CATEGORY1C + 1)
82
 
 
83
 
// 35
84
 
#define MAX_ENTROPY_TOKENS      (DCT_RUN_CATEGORY2 + 2)  
85
 
 
86
 
/****************************************************************************
87
 
*  Types
88
 
*****************************************************************************
89
 
*/  
90
 
 
91
 
typedef char * HUFF_ENTRY_PTR;
92
 
typedef struct 
93
 
{            
94
 
    HUFF_ENTRY_PTR ZeroChild;
95
 
    HUFF_ENTRY_PTR OneChild;
96
 
    HUFF_ENTRY_PTR Previous;
97
 
    HUFF_ENTRY_PTR Next;
98
 
    INT32          Value;
99
 
    UINT32         Frequency;
100
 
    
101
 
} HUFF_ENTRY; 
102
 
 
103
 
/****************************************************************************
104
 
*   Data structures
105
 
*****************************************************************************
106
 
*/
107
 
 
108
 
extern UINT8    ExtraBitLengths_VP31[MAX_ENTROPY_TOKENS];
109
 
 
110
 
/****************************************************************************
111
 
*  Functions
112
 
*****************************************************************************
113
 
*/
114
 
 
115
 
 
116
 
#endif