rk_vdec_cmd.h 2.5 KB

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