xref: /OK3568_Linux_fs/external/mpp/mpp/codec/rc/rc_debug.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * Copyright 2016 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 __RC_DEBUG_H__
18 #define __RC_DEBUG_H__
19 
20 #include "mpp_debug.h"
21 
22 #define RC_DBG_FUNCTION             (0x00000001)
23 #define RC_DBG_API_IMPL             (0x00000002)
24 #define RC_DBG_FPS                  (0x00000010)
25 #define RC_DBG_BPS                  (0x00000020)
26 #define RC_DBG_RC                   (0x00000040)
27 #define RC_DBG_QP                   (0x00000080)
28 #define RC_DBG_CFG                  (0x00000100)
29 #define RC_DBG_DROP                 (0x00000200)
30 #define RC_DBG_RECORD               (0x00001000)
31 #define RC_DBG_VBV                  (0x00002000)
32 
33 #define rc_dbg(flag, fmt, ...)      _mpp_dbg(rc_debug, flag, fmt, ## __VA_ARGS__)
34 #define rc_dbg_f(flag, fmt, ...)    _mpp_dbg_f(rc_debug, flag, fmt, ## __VA_ARGS__)
35 
36 #define rc_dbg_func(fmt, ...)       rc_dbg_f(RC_DBG_FUNCTION, fmt, ## __VA_ARGS__)
37 #define rc_dbg_impl(fmt, ...)       rc_dbg_f(RC_DBG_API_IMPL, fmt, ## __VA_ARGS__)
38 #define rc_dbg_fps(fmt, ...)        rc_dbg_f(RC_DBG_FPS, fmt, ## __VA_ARGS__)
39 #define rc_dbg_bps(fmt, ...)        rc_dbg_f(RC_DBG_BPS, fmt, ## __VA_ARGS__)
40 #define rc_dbg_rc(fmt, ...)         rc_dbg_f(RC_DBG_RC, fmt, ## __VA_ARGS__)
41 #define rc_dbg_qp(fmt, ...)         rc_dbg_f(RC_DBG_QP, fmt, ## __VA_ARGS__)
42 
43 #define rc_dbg_cfg(fmt, ...)        rc_dbg(RC_DBG_CFG, fmt, ## __VA_ARGS__)
44 #define rc_dbg_drop(fmt, ...)       rc_dbg(RC_DBG_DROP, fmt, ## __VA_ARGS__)
45 #define rc_dbg_vbv(fmt, ...)        rc_dbg(RC_DBG_VBV, fmt, ## __VA_ARGS__)
46 
47 extern RK_U32 rc_debug;
48 
49 #endif /* __RC_DEBUG_H__ */
50