• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ------------------------------------------------------------------
2  * Copyright (C) 1998-2009 PacketVideo
3  *
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
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
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
13  * express or implied.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  * -------------------------------------------------------------------
17  */
18 /*
19 
20  Pathname: s_BITS.h
21 
22 ------------------------------------------------------------------------------
23  REVISION HISTORY
24 
25  Description: Remove unused field.
26 
27  Description: Change buffer type from UInt to UInt32, makes API much easier
28               to understand and describe, and getbits is faster on TI C55X
29               if the buffer is 32 bits instead of 16.
30 
31  Description: Change buffer type from UInt32 to UChar.
32 
33  Who:                                   Date:
34  Description:
35 
36 ------------------------------------------------------------------------------
37  INCLUDE DESCRIPTION
38 
39  This include file defines the structure, BITS
40 
41 ------------------------------------------------------------------------------
42 */
43 
44 /*----------------------------------------------------------------------------
45 ; CONTINUE ONLY IF NOT ALREADY DEFINED
46 ----------------------------------------------------------------------------*/
47 #ifndef  S_BITS_H
48 #define  S_BITS_H
49 
50 /*----------------------------------------------------------------------------
51 ; INCLUDES
52 ----------------------------------------------------------------------------*/
53 #include "pv_audio_type_defs.h"
54 
55 /*----------------------------------------------------------------------------
56 ; MACROS
57 ; Define module specific macros here
58 ----------------------------------------------------------------------------*/
59 
60 /*----------------------------------------------------------------------------
61 ; DEFINES
62 ; Include all pre-processor statements here.
63 ----------------------------------------------------------------------------*/
64 
65 /*----------------------------------------------------------------------------
66 ; EXTERNAL VARIABLES REFERENCES
67 ; Declare variables used in this module but defined elsewhere
68 ----------------------------------------------------------------------------*/
69 
70 /*----------------------------------------------------------------------------
71 ; SIMPLE TYPEDEF'S
72 ----------------------------------------------------------------------------*/
73 
74 /*----------------------------------------------------------------------------
75 ; ENUMERATED TYPEDEF'S
76 ----------------------------------------------------------------------------*/
77 
78 /*----------------------------------------------------------------------------
79 ; STRUCTURES TYPEDEF'S
80 ----------------------------------------------------------------------------*/
81 /*
82  * Name: BITS
83  * Description: Holds information for processing the input data buffer
84  *    as a "stream". The data is in packed format.
85  * Fields:
86  *    pBuffer - pointer to the beginning of the buffer. If the data type of
87  *        this changes, make sure to update the constants in ibstream.h
88  *    usedBits - number of bits read thus far from the buffer. Bit 0 is
89  *        the LSB of pBuffer[0].
90  *    availableBits - number of bits available in the buffer.
91  *    byteAlignOffset - used with ADTS in case sync word is not aligned
92                         on a boundary.
93  */
94 typedef struct
95 {
96     UChar    *pBuffer;
97     UInt      usedBits;      /* Keep this unsigned so can go to 65536 */
98     UInt      availableBits; /* Ditto */
99     UInt      inputBufferCurrentLength; /* Ditto */
100     Int      byteAlignOffset; /* Used in ADTS.  See find_adts_syncword() */
101 } BITS;
102 
103 /*----------------------------------------------------------------------------
104 ; GLOBAL FUNCTION DEFINITIONS
105 ; Function Prototype declaration
106 ----------------------------------------------------------------------------*/
107 
108 /*----------------------------------------------------------------------------
109 ; END
110 ----------------------------------------------------------------------------*/
111 #endif
112 
113