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 PacketVideo Corp. 21 MP3 Decoder Library 22 23 Filename: pvmp3_crc.h 24 25 Date: 09/21/2007 26 27 ------------------------------------------------------------------------------ 28 REVISION HISTORY 29 30 Description: 31 32 ------------------------------------------------------------------------------ 33 INCLUDE DESCRIPTION 34 35 36 ------------------------------------------------------------------------------ 37 */ 38 39 /*---------------------------------------------------------------------------- 40 ; CONTINUE ONLY IF NOT ALREADY DEFINED 41 ----------------------------------------------------------------------------*/ 42 #ifndef PVMP3_CRC_H 43 #define PVMP3_CRC_H 44 45 /*---------------------------------------------------------------------------- 46 ; INCLUDES 47 ----------------------------------------------------------------------------*/ 48 #include "pvmp3_audio_type_defs.h" 49 #include "s_mp3bits.h" 50 #include "pvmp3decoder_api.h" 51 52 /*---------------------------------------------------------------------------- 53 ; MACROS 54 ; Define module specific macros here 55 ----------------------------------------------------------------------------*/ 56 57 /*---------------------------------------------------------------------------- 58 ; DEFINES 59 ; Include all pre-processor statements here. 60 ----------------------------------------------------------------------------*/ 61 #define CRC16_POLYNOMIAL 0x8005 62 63 /*---------------------------------------------------------------------------- 64 ; EXTERNAL VARIABLES REFERENCES 65 ; Declare variables used in this module but defined elsewhere 66 ----------------------------------------------------------------------------*/ 67 68 /*---------------------------------------------------------------------------- 69 ; SIMPLE TYPEDEF'S 70 ----------------------------------------------------------------------------*/ 71 72 /*---------------------------------------------------------------------------- 73 ; ENUMERATED TYPEDEF'S 74 ----------------------------------------------------------------------------*/ 75 76 /*---------------------------------------------------------------------------- 77 ; STRUCTURES TYPEDEF'S 78 ----------------------------------------------------------------------------*/ 79 #ifdef __cplusplus 80 extern "C" 81 { 82 #endif 83 84 uint32 getbits_crc(tmp3Bits *inputStream, 85 int32 neededBits, 86 uint32 *crc, 87 uint32 crc_enabled); 88 89 90 void calculate_crc(uint32 data, 91 uint32 length, 92 uint32 *crc); 93 94 #ifdef __cplusplus 95 } 96 #endif 97 98 /*---------------------------------------------------------------------------- 99 ; GLOBAL FUNCTION DEFINITIONS 100 ; Function Prototype declaration 101 ----------------------------------------------------------------------------*/ 102 103 /*---------------------------------------------------------------------------- 104 ; END 105 ----------------------------------------------------------------------------*/ 106 107 #endif 108 109 110 111