mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-06 01:26:49 +08:00
[h264d_dpb]:Fast play is disabled by default
Flip disable_fast_play to enable_fast_play, Fast play is disabled by default. Change-Id: I168e02a9d84590c3b2b92fe75b2b37c655c8c63e Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
This commit is contained in:
@@ -101,7 +101,7 @@ typedef enum {
|
||||
MPP_DEC_SET_DISABLE_ERROR, /* When set it will disable sw/hw error (H.264 / H.265) */
|
||||
MPP_DEC_SET_IMMEDIATE_OUT,
|
||||
MPP_DEC_SET_ENABLE_DEINTERLACE, /* MPP enable deinterlace by default. Vpuapi can disable it */
|
||||
MPP_DEC_SET_DISABLE_FAST_PLAY, /* disable idr output immediately */
|
||||
MPP_DEC_SET_ENABLE_FAST_PLAY, /* enable idr output immediately */
|
||||
|
||||
MPP_DEC_CMD_QUERY = CMD_MODULE_CODEC | CMD_CTX_ID_DEC | CMD_DEC_QUERY,
|
||||
/* query decoder runtime information for decode stage */
|
||||
|
@@ -162,7 +162,7 @@ static const char *dec_cfg_func_names[] = {
|
||||
ENTRY(base, sort_pts, U32, RK_U32, MPP_DEC_CFG_CHANGE_SORT_PTS, base, sort_pts) \
|
||||
ENTRY(base, disable_error, U32, RK_U32, MPP_DEC_CFG_CHANGE_DISABLE_ERROR, base, disable_error) \
|
||||
ENTRY(base, enable_vproc, U32, RK_U32, MPP_DEC_CFG_CHANGE_ENABLE_VPROC, base, enable_vproc) \
|
||||
ENTRY(base, disable_fast_play, U32, RK_U32, MPP_DEC_CFG_CHANGE_DISABLE_FAST_PLAY, base, disable_fast_play) \
|
||||
ENTRY(base, enable_fast_play, U32, RK_U32, MPP_DEC_CFG_CHANGE_ENABLE_FAST_PLAY, base, enable_fast_play) \
|
||||
ENTRY(cb, pkt_rdy_cb, PTR, MppExtCbFunc, MPP_DEC_CB_CFG_CHANGE_PKT_RDY, cb, pkt_rdy_cb) \
|
||||
ENTRY(cb, pkt_rdy_ctx, PTR, MppExtCbCtx, MPP_DEC_CB_CFG_CHANGE_PKT_RDY, cb, pkt_rdy_ctx) \
|
||||
ENTRY(cb, pkt_rdy_cmd, S32, RK_S32, MPP_DEC_CB_CFG_CHANGE_PKT_RDY, cb, pkt_rdy_cmd) \
|
||||
|
@@ -874,7 +874,7 @@ static void write_picture(H264_StorePic_t *p, H264dVideoCtx_t *p_Vid)
|
||||
}
|
||||
//!< discard less than first i frame poc
|
||||
if ((p_err->i_slice_no < 2) && (p->poc < p_err->first_iframe_poc) &&
|
||||
(!p_Vid->p_Dec->cfg->base.disable_fast_play)) {
|
||||
(p_Vid->p_Dec->cfg->base.enable_fast_play)) {
|
||||
if (p_err->used_ref_flag) {
|
||||
mpp_frame_set_errinfo(mframe, MPP_FRAME_ERR_UNKNOW);
|
||||
} else {
|
||||
@@ -1261,7 +1261,7 @@ static MPP_RET scan_dpb_output(H264_DpbBuf_t *p_Dpb, H264_StorePic_t *p)
|
||||
RK_S32 poc_inc = 0;
|
||||
|
||||
if (p_Dpb->p_Vid->p_Dec->cfg->base.fast_out ||
|
||||
(!p_Dpb->p_Vid->p_Dec->cfg->base.disable_fast_play &&
|
||||
(p_Dpb->p_Vid->p_Dec->cfg->base.enable_fast_play &&
|
||||
p_err->i_slice_no < 2 && p_Dpb->last_output_poc == INT_MIN)) {
|
||||
FUN_CHECK(ret = write_stored_frame(p_Dpb->p_Vid, p_Dpb, fs));
|
||||
} else {
|
||||
|
@@ -439,7 +439,7 @@ MPP_RET mpp_dec_proc_cfg(MppDecImpl *dec, MpiCmd cmd, void *param)
|
||||
case MPP_DEC_SET_OUTPUT_FORMAT :
|
||||
case MPP_DEC_SET_DISABLE_ERROR :
|
||||
case MPP_DEC_SET_ENABLE_DEINTERLACE :
|
||||
case MPP_DEC_SET_DISABLE_FAST_PLAY : {
|
||||
case MPP_DEC_SET_ENABLE_FAST_PLAY : {
|
||||
ret = mpp_dec_set_cfg_by_cmd(&dec->cfg, cmd, param);
|
||||
dec->cfg.base.change = 0;
|
||||
} break;
|
||||
@@ -1615,8 +1615,8 @@ MPP_RET mpp_dec_set_cfg(MppDecCfgSet *dst, MppDecCfgSet *src)
|
||||
if (change & MPP_DEC_CFG_CHANGE_ENABLE_VPROC)
|
||||
dst_base->enable_vproc = src_base->enable_vproc;
|
||||
|
||||
if (change & MPP_DEC_CFG_CHANGE_DISABLE_FAST_PLAY)
|
||||
dst_base->disable_fast_play = src_base->disable_fast_play;
|
||||
if (change & MPP_DEC_CFG_CHANGE_ENABLE_FAST_PLAY)
|
||||
dst_base->enable_fast_play = src_base->enable_fast_play;
|
||||
|
||||
dst_base->change = change;
|
||||
src_base->change = 0;
|
||||
@@ -2102,10 +2102,10 @@ MPP_RET mpp_dec_set_cfg_by_cmd(MppDecCfgSet *set, MpiCmd cmd, void *param)
|
||||
cfg->change |= MPP_DEC_CFG_CHANGE_ENABLE_VPROC;
|
||||
dec_dbg_func("enable dec_vproc %d\n", cfg->enable_vproc);
|
||||
} break;
|
||||
case MPP_DEC_SET_DISABLE_FAST_PLAY : {
|
||||
cfg->disable_fast_play = (param) ? (*((RK_U32 *)param)) : (0);
|
||||
cfg->change |= MPP_DEC_CFG_CHANGE_DISABLE_FAST_PLAY;
|
||||
dec_dbg_func("disable idr immediately output %d\n", cfg->disable_fast_play);
|
||||
case MPP_DEC_SET_ENABLE_FAST_PLAY : {
|
||||
cfg->enable_fast_play = (param) ? (*((RK_U32 *)param)) : (0);
|
||||
cfg->change |= MPP_DEC_CFG_CHANGE_ENABLE_FAST_PLAY;
|
||||
dec_dbg_func("disable idr immediately output %d\n", cfg->enable_fast_play);
|
||||
} break;
|
||||
default : {
|
||||
mpp_err_f("unsupported cfg update cmd %x\n", cmd);
|
||||
|
@@ -34,7 +34,7 @@ typedef enum MppDecCfgChange_e {
|
||||
MPP_DEC_CFG_CHANGE_SORT_PTS = (1 << 13),
|
||||
MPP_DEC_CFG_CHANGE_DISABLE_ERROR = (1 << 14),
|
||||
MPP_DEC_CFG_CHANGE_ENABLE_VPROC = (1 << 15),
|
||||
MPP_DEC_CFG_CHANGE_DISABLE_FAST_PLAY = (1 << 16),
|
||||
MPP_DEC_CFG_CHANGE_ENABLE_FAST_PLAY = (1 << 16),
|
||||
|
||||
MPP_DEC_CFG_CHANGE_ALL = (0xFFFFFFFF),
|
||||
} MppDecCfgChange;
|
||||
@@ -55,7 +55,7 @@ typedef struct MppDecBaseCfg_t {
|
||||
RK_U32 sort_pts;
|
||||
RK_U32 disable_error;
|
||||
RK_U32 enable_vproc;
|
||||
RK_U32 disable_fast_play;
|
||||
RK_U32 enable_fast_play;
|
||||
} MppDecBaseCfg;
|
||||
|
||||
typedef enum MppDecCbCfgChange_e {
|
||||
|
@@ -1064,7 +1064,7 @@ MPP_RET Mpp::control_dec(MpiCmd cmd, MppParam param)
|
||||
case MPP_DEC_SET_IMMEDIATE_OUT :
|
||||
case MPP_DEC_SET_DISABLE_ERROR :
|
||||
case MPP_DEC_SET_ENABLE_DEINTERLACE :
|
||||
case MPP_DEC_SET_DISABLE_FAST_PLAY : {
|
||||
case MPP_DEC_SET_ENABLE_FAST_PLAY : {
|
||||
/*
|
||||
* These control may be set before mpp_init
|
||||
* When this case happen record the config and wait for decoder init
|
||||
|
Reference in New Issue
Block a user