1 /* 2 * Copyright 2015 Rockchip Electronics Co. LTD 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 __HAL_VP8D_BASE_H__ 18 #define __HAL_VP8D_BASE_H__ 19 20 #include <stdio.h> 21 22 #include "mpp_hal.h" 23 #include "mpp_buf_slot.h" 24 #include "mpp_device.h" 25 26 #include "hal_dec_task.h" 27 28 #include "vp8d_syntax.h" 29 30 #define VP8H_DBG_FUNCTION (0x00000001) 31 #define VP8H_DBG_REG (0x00000002) 32 #define VP8H_DBG_DUMP_REG (0x00000004) 33 #define VP8H_DBG_IRQ (0x00000008) 34 35 #define vp8h_dbg(flag, fmt, ...) \ 36 _mpp_dbg_f(vp8h_debug, flag, fmt, ## __VA_ARGS__) 37 38 #define FUN_T(tag) \ 39 do {\ 40 if (VP8H_DBG_FUNCTION & vp8h_debug)\ 41 { mpp_log("%s: line(%d), func(%s)", tag, __LINE__, __FUNCTION__); }\ 42 } while (0) 43 44 typedef struct VP8DHalContext { 45 MppBufSlots packet_slots; 46 MppBufSlots frame_slots; 47 MppDev dev; 48 void *regs; 49 RK_U8 reg_size; 50 MppBufferGroup group; 51 MppBuffer probe_table; 52 MppBuffer seg_map; 53 RK_U32 dec_frame_cnt; 54 FILE *fp_reg_in; 55 FILE *fp_reg_out; 56 MppHalApi hal_api; 57 } VP8DHalContext_t; 58 59 #endif 60