mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 17:16:50 +08:00
[h264e_rkv]: Implement OSD function
1. add description for OSD cmd in rk_mpi_cmd.h 2. judge if input MppBuffer for OSD is NULL Change-Id: I6d674c81790d9cf57acdfa23f20c929b56f263e9 Signed-off-by: Lin Kesheng <lks@rock-chips.com>
This commit is contained in:
@@ -77,8 +77,8 @@ typedef enum {
|
|||||||
MPP_ENC_GET_RC_CFG,
|
MPP_ENC_GET_RC_CFG,
|
||||||
MPP_ENC_SET_PREP_CFG,
|
MPP_ENC_SET_PREP_CFG,
|
||||||
MPP_ENC_GET_PREP_CFG,
|
MPP_ENC_GET_PREP_CFG,
|
||||||
MPP_ENC_SET_OSD_PLT_CFG,
|
MPP_ENC_SET_OSD_PLT_CFG, /* set OSD palette, parameter should be pointer to MppEncOSDPlt */
|
||||||
MPP_ENC_SET_OSD_DATA_CFG,
|
MPP_ENC_SET_OSD_DATA_CFG, /* set OSD data with at most 8 regions, parameter should be pointer to MppEncOSDData */
|
||||||
MPP_ENC_GET_OSD_CFG,
|
MPP_ENC_GET_OSD_CFG,
|
||||||
MPP_ENC_SET_CFG,
|
MPP_ENC_SET_CFG,
|
||||||
MPP_ENC_GET_CFG,
|
MPP_ENC_GET_CFG,
|
||||||
|
@@ -2882,11 +2882,17 @@ MPP_RET hal_h264e_rkv_set_roi_regs(h264e_rkv_reg_set *regs, h264e_syntax *syn, M
|
|||||||
MPP_RET hal_h264e_rkv_set_osd_regs(h264e_hal_context *ctx, h264e_rkv_reg_set *regs)
|
MPP_RET hal_h264e_rkv_set_osd_regs(h264e_hal_context *ctx, h264e_rkv_reg_set *regs)
|
||||||
{
|
{
|
||||||
#define H264E_DEFAULT_OSD_INV_THR 15 //TODO: open interface later
|
#define H264E_DEFAULT_OSD_INV_THR 15 //TODO: open interface later
|
||||||
RK_U32 k = 0;
|
|
||||||
MppEncOSDData *osd_data = &ctx->osd_data;
|
MppEncOSDData *osd_data = &ctx->osd_data;
|
||||||
|
|
||||||
|
if (osd_data->buf) {
|
||||||
|
|
||||||
|
RK_S32 buf_fd = mpp_buffer_get_fd(osd_data->buf);
|
||||||
|
|
||||||
|
if (buf_fd >= 0) {
|
||||||
|
|
||||||
|
RK_U32 k = 0;
|
||||||
RK_U32 num = osd_data->num_region;
|
RK_U32 num = osd_data->num_region;
|
||||||
MppEncOSDRegion *region = osd_data->region;
|
MppEncOSDRegion *region = osd_data->region;
|
||||||
RK_U32 buf_fd = mpp_buffer_get_fd(osd_data->buf);
|
|
||||||
|
|
||||||
regs->swreg65.osd_clk_sel = 1;
|
regs->swreg65.osd_clk_sel = 1;
|
||||||
regs->swreg65.osd_plt_type = ctx->osd_plt_type;
|
regs->swreg65.osd_plt_type = ctx->osd_plt_type;
|
||||||
@@ -2922,6 +2928,8 @@ MPP_RET hal_h264e_rkv_set_osd_regs(h264e_hal_context *ctx, h264e_rkv_reg_set *re
|
|||||||
regs->swreg66.osd_inv_r6 = H264E_DEFAULT_OSD_INV_THR;
|
regs->swreg66.osd_inv_r6 = H264E_DEFAULT_OSD_INV_THR;
|
||||||
if (region[7].inverse)
|
if (region[7].inverse)
|
||||||
regs->swreg66.osd_inv_r7 = H264E_DEFAULT_OSD_INV_THR;
|
regs->swreg66.osd_inv_r7 = H264E_DEFAULT_OSD_INV_THR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return MPP_OK;
|
return MPP_OK;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user