[vp9d_parser]: fix frame mark errinfo issue

Key Frame or intra only frame do not reference other frame,
so need not check errinfo of ref frame.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I4fbfca7ba7dedfef6d6a721528ba536dba50a8f3
This commit is contained in:
Yandong Lin
2023-04-13 10:57:35 +08:00
committed by Herman Chen
parent d2a3eda478
commit eaa250d1fc

View File

@@ -1703,16 +1703,18 @@ RK_S32 vp9_parser_frame(Vp9CodecContext *ctx, HalDecTask *task)
task->output = s->frames[CUR_FRAME].slot_index;
task->input_packet = ctx->pkt;
for (i = 0; i < 3; i++) {
if (s->refs[s->refidx[i]].slot_index < 0x7f) {
MppFrame mframe = NULL;
mpp_buf_slot_set_flag(s->slots, s->refs[s->refidx[i]].slot_index, SLOT_HAL_INPUT);
task->refer[i] = s->refs[s->refidx[i]].slot_index;
mpp_buf_slot_get_prop(s->slots, task->refer[i], SLOT_FRAME_PTR, &mframe);
if (mframe)
task->flags.ref_err |= mpp_frame_get_errinfo(mframe);
} else {
task->refer[i] = -1;
if (!s->keyframe && !s->intraonly) {
for (i = 0; i < 3; i++) {
if (s->refs[s->refidx[i]].slot_index < 0x7f) {
MppFrame mframe = NULL;
mpp_buf_slot_set_flag(s->slots, s->refs[s->refidx[i]].slot_index, SLOT_HAL_INPUT);
task->refer[i] = s->refs[s->refidx[i]].slot_index;
mpp_buf_slot_get_prop(s->slots, task->refer[i], SLOT_FRAME_PTR, &mframe);
if (mframe)
task->flags.ref_err |= mpp_frame_get_errinfo(mframe);
} else {
task->refer[i] = -1;
}
}
}
vp9d_dbg(VP9D_DBG_REF, "ref_errinfo=%d\n", task->flags.ref_err);