mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 09:06:50 +08:00
[vpu_api]: add command VPU_API_SET_IMMEDIATE_OUT
tips: this command is used to set decoded frame immediate out, whehter is in display order or not. Change-Id: I0b6b2c34fde722fe724019118c7af142b4b2e6f1 Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
This commit is contained in:
@@ -97,6 +97,7 @@ typedef enum {
|
||||
MPP_DEC_SET_VC1_EXTRA_DATA,
|
||||
MPP_DEC_SET_OUTPUT_FORMAT,
|
||||
MPP_DEC_SET_DISABLE_ERROR, /* When set it will disable sw/hw error (H.264 / H.265) */
|
||||
MPP_DEC_SET_IMMEDIATE_OUT,
|
||||
MPP_DEC_CMD_END,
|
||||
|
||||
MPP_ENC_CMD_BASE = CMD_MODULE_CODEC | CMD_CTX_ID_ENC,
|
||||
|
@@ -92,6 +92,7 @@ typedef enum VPU_API_CMD {
|
||||
VPU_API_GET_FRAME_INFO,
|
||||
VPU_API_SET_OUTPUT_BLOCK,
|
||||
VPU_API_GET_EOS_STATUS,
|
||||
VPU_API_SET_IMMEDIATE_OUT = 0x1000,
|
||||
} VPU_API_CMD;
|
||||
|
||||
typedef struct {
|
||||
|
@@ -476,7 +476,10 @@ MPP_RET h264d_control(void *decoder, RK_S32 cmd_type, void *param)
|
||||
switch (cmd_type) {
|
||||
case MPP_DEC_SET_DISABLE_ERROR: {
|
||||
dec->disable_error = *((RK_U32 *)param);
|
||||
}
|
||||
} break;
|
||||
case MPP_DEC_SET_IMMEDIATE_OUT: {
|
||||
dec->immediate_out = *((RK_U32 *)param);
|
||||
} break;
|
||||
default : {
|
||||
} break;
|
||||
}
|
||||
|
@@ -1339,7 +1339,9 @@ MPP_RET store_picture_in_dpb(H264_DpbBuf_t *p_Dpb, H264_StorePic_t *p)
|
||||
p_Dpb->poc_interval = 1;
|
||||
|
||||
}
|
||||
if (p->idr_flag || (p->poc == 0) || (p_Dpb->last_output_poc == INT_MIN)) {
|
||||
if (p->idr_flag || (p->poc == 0)
|
||||
|| (p_Dpb->last_output_poc == INT_MIN)
|
||||
|| p_Vid->p_Dec->immediate_out) {
|
||||
FUN_CHECK(ret = write_stored_frame(p_Vid, p_Dpb, fs));
|
||||
}
|
||||
while ((p_Dpb->last_output_poc > INT_MIN)
|
||||
|
@@ -1148,6 +1148,7 @@ typedef struct h264_dec_ctx_t {
|
||||
HalDecTask *in_task;
|
||||
RK_S32 last_frame_slot_idx;
|
||||
RK_U32 disable_error;
|
||||
RK_U32 immediate_out;
|
||||
struct h264_err_ctx_t errctx;
|
||||
} H264_DecCtx_t;
|
||||
|
||||
|
@@ -1428,6 +1428,9 @@ RK_S32 VpuApiLegacy::control(VpuCodecContext *ctx, VPU_API_CMD cmd, void *param)
|
||||
*((VPU_GENERIC *)param) = vpug;
|
||||
mpicmd = MPI_CMD_BUTT;
|
||||
} break;
|
||||
case VPU_API_SET_IMMEDIATE_OUT: {
|
||||
mpicmd = MPP_DEC_SET_IMMEDIATE_OUT;
|
||||
} break;
|
||||
default: {
|
||||
} break;
|
||||
}
|
||||
|
@@ -769,7 +769,8 @@ MPP_RET Mpp::control_dec(MpiCmd cmd, MppParam param)
|
||||
case MPP_DEC_GET_VPUMEM_USED_COUNT:
|
||||
case MPP_DEC_SET_OUTPUT_FORMAT:
|
||||
case MPP_DEC_SET_DISABLE_ERROR:
|
||||
case MPP_DEC_SET_PRESENT_TIME_ORDER: {
|
||||
case MPP_DEC_SET_PRESENT_TIME_ORDER:
|
||||
case MPP_DEC_SET_IMMEDIATE_OUT: {
|
||||
ret = mpp_dec_control(mDec, cmd, param);
|
||||
}
|
||||
default : {
|
||||
|
Reference in New Issue
Block a user