1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * Copyright 2021 Rockchip Electronics Co. LTD 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * Licensed under the Apache License, Version 2.0 (the "License"); 5*4882a593Smuzhiyun * you may not use this file except in compliance with the License. 6*4882a593Smuzhiyun * You may obtain a copy of the License at 7*4882a593Smuzhiyun * 8*4882a593Smuzhiyun * http://www.apache.org/licenses/LICENSE-2.0 9*4882a593Smuzhiyun * 10*4882a593Smuzhiyun * Unless required by applicable law or agreed to in writing, software 11*4882a593Smuzhiyun * distributed under the License is distributed on an "AS IS" BASIS, 12*4882a593Smuzhiyun * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*4882a593Smuzhiyun * See the License for the specific language governing permissions and 14*4882a593Smuzhiyun * limitations under the License. 15*4882a593Smuzhiyun */ 16*4882a593Smuzhiyun 17*4882a593Smuzhiyun #include "rk_venc_cmd.h" 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun typedef void* MppEncRoiCtx; 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun /* 22*4882a593Smuzhiyun * NOTE: this structure is changeful. Do NOT expect binary compatible on it. 23*4882a593Smuzhiyun */ 24*4882a593Smuzhiyun typedef struct RRegion_t { 25*4882a593Smuzhiyun RK_U16 x; /**< horizontal position of top left corner */ 26*4882a593Smuzhiyun RK_U16 y; /**< vertical position of top left corner */ 27*4882a593Smuzhiyun RK_U16 w; /**< width of ROI rectangle */ 28*4882a593Smuzhiyun RK_U16 h; /**< height of ROI rectangle */ 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun RK_S32 force_intra; /**< flag of forced intra macroblock */ 31*4882a593Smuzhiyun RK_S32 qp_mode; /**< 0 - relative qp 1 - absolute qp */ 32*4882a593Smuzhiyun RK_S32 qp_val; /**< absolute / relative qp of macroblock */ 33*4882a593Smuzhiyun } RoiRegionCfg; 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun #ifdef __cplusplus 36*4882a593Smuzhiyun extern "C" { 37*4882a593Smuzhiyun #endif 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun MPP_RET mpp_enc_roi_init(MppEncRoiCtx *ctx, RK_U32 w, RK_U32 h, MppCodingType type, RK_S32 count); 40*4882a593Smuzhiyun MPP_RET mpp_enc_roi_deinit(MppEncRoiCtx ctx); 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun MPP_RET mpp_enc_roi_add_region(MppEncRoiCtx ctx, RoiRegionCfg *region); 43*4882a593Smuzhiyun MPP_RET mpp_enc_roi_setup_meta(MppEncRoiCtx ctx, MppMeta meta); 44*4882a593Smuzhiyun 45*4882a593Smuzhiyun #ifdef __cplusplus 46*4882a593Smuzhiyun } 47*4882a593Smuzhiyun #endif 48