2
0

mpp_enc_roi_utils.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright 2021 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. #include "rk_venc_cmd.h"
  17. typedef void* MppEncRoiCtx;
  18. /*
  19. * NOTE: this structure is changeful. Do NOT expect binary compatible on it.
  20. */
  21. typedef struct RRegion_t {
  22. RK_U16 x; /**< horizontal position of top left corner */
  23. RK_U16 y; /**< vertical position of top left corner */
  24. RK_U16 w; /**< width of ROI rectangle */
  25. RK_U16 h; /**< height of ROI rectangle */
  26. RK_S32 force_intra; /**< flag of forced intra macroblock */
  27. RK_S32 qp_mode; /**< 0 - relative qp 1 - absolute qp */
  28. RK_S32 qp_val; /**< absolute / relative qp of macroblock */
  29. } RoiRegionCfg;
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33. MPP_RET mpp_enc_roi_init(MppEncRoiCtx *ctx, RK_U32 w, RK_U32 h, MppCodingType type, RK_S32 count);
  34. MPP_RET mpp_enc_roi_deinit(MppEncRoiCtx ctx);
  35. MPP_RET mpp_enc_roi_add_region(MppEncRoiCtx ctx, RoiRegionCfg *region);
  36. MPP_RET mpp_enc_roi_setup_meta(MppEncRoiCtx ctx, MppMeta meta);
  37. #ifdef __cplusplus
  38. }
  39. #endif