Home | History | Annotate | Download | only in inc
      1 /*
      2  * Copyright (C) 2011 The Android Open Source Project
      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 express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 #ifndef __M4VD_TOOLS_H__
     18 #define __M4VD_TOOLS_H__
     19 
     20 #ifdef __cplusplus
     21 extern "C" {
     22 #endif
     23 
     24 #include "NXPSW_CompilerSwitches.h"
     25 #include "M4OSA_Memory.h"
     26 #include "M4OSA_Types.h"
     27 /* ----- bitstream parser ----- */
     28 
     29 typedef struct
     30 {
     31     M4OSA_UInt32 stream_byte;
     32     M4OSA_UInt32 stream_index;
     33     M4OSA_MemAddr8 in;
     34 
     35 } M4VS_Bitstream_ctxt;
     36 
     37 M4OSA_UInt32 M4VD_Tools_GetBitsFromMemory(M4VS_Bitstream_ctxt* parsingCtxt,
     38                                             M4OSA_UInt32 nb_bits);
     39 M4OSA_ERR M4VD_Tools_WriteBitsToMemory(M4OSA_UInt32 bitsToWrite,
     40                                          M4OSA_MemAddr32 dest_bits,
     41                                          M4OSA_UInt8 offset, M4OSA_UInt8 nb_bits);
     42 
     43 #ifdef __cplusplus
     44 }
     45 #endif /* __cplusplus */
     46 
     47 #endif /* __M4VD_TOOLS_H__ */
     48