Home | History | Annotate | Download | only in aacdec
      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  Filename: sbr_crc_check.h
     21  Funtions:
     22 
     23 ------------------------------------------------------------------------------
     24  REVISION HISTORY
     25 
     26 
     27  Who:                                   Date: MM/DD/YYYY
     28  Description:
     29 ------------------------------------------------------------------------------
     30 
     31 
     32 ----------------------------------------------------------------------------
     33 ; CONTINUE ONLY IF NOT ALREADY DEFINED
     34 ----------------------------------------------------------------------------*/
     35 #ifndef SBR_CRC_CHECK_H
     36 #define SBR_CRC_CHECK_H
     37 
     38 /*----------------------------------------------------------------------------
     39 ; INCLUDES
     40 ----------------------------------------------------------------------------*/
     41 #include "pv_audio_type_defs.h"
     42 #include "s_bit_buffer.h"
     43 
     44 
     45 /*----------------------------------------------------------------------------
     46 ; MACROS
     47 ; Define module specific macros here
     48 ----------------------------------------------------------------------------*/
     49 
     50 /*----------------------------------------------------------------------------
     51 ; DEFINES
     52 ; Include all pre-processor statements here.
     53 ----------------------------------------------------------------------------*/
     54 #define CRCPOLY  0x0233
     55 #define CRCMASK  0x0200
     56 #define CRCSTART 0x0000
     57 #define CRCRANGE 0x03FF
     58 
     59 #define SBR_EXTENSION      13 /* 1101 */
     60 #define SBR_EXTENSION_CRC  14 /* 1110 */
     61 
     62 
     63 
     64 #ifndef min
     65 #define min(a, b) ((a) < (b) ? (a) : (b))
     66 #endif
     67 
     68 /*----------------------------------------------------------------------------
     69 ; EXTERNAL VARIABLES REFERENCES
     70 ; Declare variables used in this module but defined elsewhere
     71 ----------------------------------------------------------------------------*/
     72 
     73 /*----------------------------------------------------------------------------
     74 ; SIMPLE TYPEDEF'S
     75 ----------------------------------------------------------------------------*/
     76 
     77 /*----------------------------------------------------------------------------
     78 ; ENUMERATED TYPEDEF'S
     79 ----------------------------------------------------------------------------*/
     80 
     81 /*----------------------------------------------------------------------------
     82 ; STRUCTURES TYPEDEF'S
     83 ----------------------------------------------------------------------------*/
     84 
     85 /*----------------------------------------------------------------------------
     86 ; GLOBAL FUNCTION DEFINITIONS
     87 ; Function Prototype declaration
     88 ----------------------------------------------------------------------------*/
     89 Int32 sbr_crc_check(BIT_BUFFER * hBitBuf,
     90                     UInt32 NrBits);
     91 
     92 
     93 /*----------------------------------------------------------------------------
     94 ; END
     95 ----------------------------------------------------------------------------*/
     96 #endif
     97 
     98 
     99