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 __RK_VDEC_CMD_H__ 18 #define __RK_VDEC_CMD_H__ 19 20 #include "rk_type.h" 21 #include "mpp_err.h" 22 23 /* 24 * decoder query interface is only for debug usage 25 */ 26 #define MPP_DEC_QUERY_STATUS (0x00000001) 27 #define MPP_DEC_QUERY_WAIT (0x00000002) 28 #define MPP_DEC_QUERY_FPS (0x00000004) 29 #define MPP_DEC_QUERY_BPS (0x00000008) 30 #define MPP_DEC_QUERY_DEC_IN_PKT (0x00000010) 31 #define MPP_DEC_QUERY_DEC_WORK (0x00000020) 32 #define MPP_DEC_QUERY_DEC_OUT_FRM (0x00000040) 33 34 #define MPP_DEC_QUERY_ALL (MPP_DEC_QUERY_STATUS | \ 35 MPP_DEC_QUERY_WAIT | \ 36 MPP_DEC_QUERY_FPS | \ 37 MPP_DEC_QUERY_BPS | \ 38 MPP_DEC_QUERY_DEC_IN_PKT | \ 39 MPP_DEC_QUERY_DEC_WORK | \ 40 MPP_DEC_QUERY_DEC_OUT_FRM) 41 42 typedef struct MppDecQueryCfg_t { 43 /* 44 * 32 bit query flag for query data check 45 * Each bit represent a query data switch. 46 * bit 0 - for querying decoder runtime status 47 * bit 1 - for querying decoder runtime waiting status 48 * bit 2 - for querying decoder realtime decode fps 49 * bit 3 - for querying decoder realtime input bps 50 * bit 4 - for querying decoder input packet count 51 * bit 5 - for querying decoder start hardware times 52 * bit 6 - for querying decoder output frame count 53 */ 54 RK_U32 query_flag; 55 56 /* 64 bit query data output */ 57 RK_U32 rt_status; 58 RK_U32 rt_wait; 59 RK_U32 rt_fps; 60 RK_U32 rt_bps; 61 RK_U32 dec_in_pkt_cnt; 62 RK_U32 dec_hw_run_cnt; 63 RK_U32 dec_out_frm_cnt; 64 } MppDecQueryCfg; 65 66 typedef void* MppExtCbCtx; 67 typedef MPP_RET (*MppExtCbFunc)(MppExtCbCtx cb_ctx, MppCtx mpp, RK_S32 cmd, void *arg); 68 69 #endif /*__RK_VDEC_CMD_H__*/ 70