1 /* ------------------------------------------------------------------
2 * Copyright (C) 1998-2009 PacketVideo
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
14 * See the License for the specific language governing permissions
15 * and limitations under the License.
16 * -------------------------------------------------------------------
19 ------------------------------------------------------------------------------
23 Filename: pvmp3_getbits.h
27 ------------------------------------------------------------------------------
32 ------------------------------------------------------------------------------
36 ------------------------------------------------------------------------------
39 /*----------------------------------------------------------------------------
40 ; CONTINUE ONLY IF NOT ALREADY DEFINED
41 ----------------------------------------------------------------------------*/
42 #ifndef PVMP3_GETBITS_H
43 #define PVMP3_GETBITS_H
45 /*----------------------------------------------------------------------------
47 ----------------------------------------------------------------------------*/
48 #include "pvmp3_dec_defs.h"
49 #include "s_mp3bits.h"
50 #include "pvmp3_audio_type_defs.h"
52 /*----------------------------------------------------------------------------
54 ; Define module specific macros here
55 ----------------------------------------------------------------------------*/
57 /*----------------------------------------------------------------------------
59 ; Include all pre-processor statements here.
60 ----------------------------------------------------------------------------*/
61 #define INBUF_ARRAY_INDEX_SHIFT (3)
62 #define INBUF_BIT_WIDTH (1<<(INBUF_ARRAY_INDEX_SHIFT))
63 #define INBUF_BIT_MODULO_MASK ((INBUF_BIT_WIDTH)-1)
66 /*----------------------------------------------------------------------------
67 ; EXTERNAL VARIABLES REFERENCES
68 ; Declare variables used in this module but defined elsewhere
69 ----------------------------------------------------------------------------*/
71 /*----------------------------------------------------------------------------
73 ----------------------------------------------------------------------------*/
75 /*----------------------------------------------------------------------------
76 ; ENUMERATED TYPEDEF'S
77 ----------------------------------------------------------------------------*/
79 /*----------------------------------------------------------------------------
80 ; STRUCTURES TYPEDEF'S
81 ----------------------------------------------------------------------------*/
87 uint32 getNbits(tmp3Bits *pMainData,
90 uint16 getUpTo9bits(tmp3Bits *pMainData,
93 uint32 getUpTo17bits(tmp3Bits *pMainData,
96 uint8 get1bit(tmp3Bits *pMainData);
102 /*----------------------------------------------------------------------------
103 ; GLOBAL FUNCTION DEFINITIONS
104 ; Function Prototype declaration
105 ----------------------------------------------------------------------------*/
107 /*----------------------------------------------------------------------------
109 ----------------------------------------------------------------------------*/