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