M4VD_Tools.h revision 7c9d8018755adf1857571125ba1b3598c96ea506
1/* 2 * Copyright (C) 2004-2011 NXP Software 3 * Copyright (C) 2011 The Android Open Source Project 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18#ifndef __M4VD_TOOLS_H__ 19#define __M4VD_TOOLS_H__ 20 21#ifdef __cplusplus 22extern "C" { 23#endif 24 25#include "NXPSW_CompilerSwitches.h" 26#include "M4OSA_Memory.h" 27#include "M4OSA_Types.h" 28/* ----- bitstream parser ----- */ 29 30typedef struct 31{ 32 M4OSA_UInt32 stream_byte; 33 M4OSA_UInt32 stream_index; 34 M4OSA_MemAddr8 in; 35 36} M4VS_Bitstream_ctxt; 37 38M4OSA_UInt32 M4VD_Tools_GetBitsFromMemory(M4VS_Bitstream_ctxt* parsingCtxt, 39 M4OSA_UInt32 nb_bits); 40M4OSA_ERR M4VD_Tools_WriteBitsToMemory(M4OSA_UInt32 bitsToWrite, 41 M4OSA_MemAddr32 dest_bits, 42 M4OSA_UInt8 offset, M4OSA_UInt8 nb_bits); 43 44#ifdef __cplusplus 45} 46#endif /* __cplusplus */ 47 48#endif /* __M4VD_TOOLS_H__ */ 49