mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-20 15:55:13 +08:00
[mpp_enc_v2]: Fix reencode path dead loop
Signed-off-by: Herman Chen <herman.chen@rock-chips.com> Change-Id: I9adc1accfd10361e4901aaeb5abde9e09bb2a7bd
This commit is contained in:
@@ -247,11 +247,6 @@ static MPP_RET h265e_proc_dpb(void *ctx, HalEncTask *task)
|
||||
|
||||
h265e_dbg_func("enter\n");
|
||||
|
||||
if (rc_task->frm.reencode) {
|
||||
|
||||
return MPP_OK;
|
||||
}
|
||||
|
||||
mb_wd64 = (p->cfg->prep.width + 63) / 64;
|
||||
mb_h64 = (p->cfg->prep.height + 63) / 64;
|
||||
|
||||
|
@@ -640,13 +640,18 @@ void *mpp_enc_thread(void *data)
|
||||
|
||||
TASK_REENCODE:
|
||||
// 14. restore and process dpb
|
||||
if (!frm->reencode || frm->re_dpb_proc) {
|
||||
enc_dbg_detail("task %d enc proc dpb\n", frm->seq_idx);
|
||||
RUN_ENC_IMPL_FUNC(enc_impl_proc_dpb, impl, hal_task, mpp, ret);
|
||||
}
|
||||
|
||||
if (!frm->reencode) {
|
||||
enc_dbg_detail("task %d rc frame start\n", frm->seq_idx);
|
||||
RUN_ENC_RC_FUNC(rc_frm_start, enc->rc_ctx, rc_task, mpp, ret);
|
||||
if (frm->re_dpb_proc)
|
||||
goto TASK_REENCODE;
|
||||
}
|
||||
frm->reencode = 0;
|
||||
|
||||
enc_dbg_detail("task %d enc proc hal\n", frm->seq_idx);
|
||||
RUN_ENC_IMPL_FUNC(enc_impl_proc_hal, impl, hal_task, mpp, ret);
|
||||
|
@@ -665,11 +665,8 @@ MPP_RET rc_model_v2_start(void *ctx, EncRcTask *task)
|
||||
|
||||
rc_dbg_func("enter %p\n", ctx);
|
||||
|
||||
|
||||
if (frm->reencode || p->usr_cfg.mode == RC_FIXQP) {
|
||||
frm->reencode = 0;
|
||||
if (p->usr_cfg.mode == RC_FIXQP)
|
||||
return MPP_OK;
|
||||
}
|
||||
|
||||
p->frame_type = (frm->is_intra) ? (INTRA_FRAME) : (INTER_P_FRAME);
|
||||
|
||||
|
Reference in New Issue
Block a user