[mpp_buf_slot]: fix field source display err on fast mode

In fast mode, there is a situation:
The current frame is output, when the top field decoding is completed
and the bot field decoding is not completed, because of the top and bot
field share one MppFrame.

Solution: modify the hal_output of SlotStatus frome ont bit to two bits
counter. Using hal_output indicates whether a whole frame completed.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I18429399e9188c848385c40f847333f1b46fd6bb
This commit is contained in:
Yandong Lin
2022-06-07 18:16:36 +08:00
committed by Herman Chen
parent d583888955
commit a33f11fbfd

View File

@@ -159,7 +159,7 @@ typedef union SlotStatus_u {
RK_U32 on_used : 1;
RK_U32 not_ready : 1; // buffer slot is filled or not
RK_U32 codec_use : 1; // buffer slot is used by codec ( dpb reference )
RK_U32 hal_output : 1; // buffer slot is set to hw output will ready when hw done
RK_U32 hal_output : 2; // buffer slot is set to hw output will ready when hw done
RK_U32 hal_use : 8; // buffer slot is used by hardware
RK_U32 queue_use : 5; // buffer slot is used in different queue
@@ -501,13 +501,14 @@ static void slot_ops_with_log(MppBufSlotsImpl *impl, MppBufSlotEntry *slot, MppB
}
} break;
case SLOT_SET_HAL_OUTPUT : {
status.hal_output = 1;
status.hal_output++;
status.not_ready = 1;
} break;
case SLOT_CLR_HAL_OUTPUT : {
status.hal_output = 0;
status.hal_output--;
// NOTE: set output index ready here
status.not_ready = 0;
if (!status.hal_output)
status.not_ready = 0;
} break;
case SLOT_SET_QUEUE_USE :
case SLOT_ENQUEUE_OUTPUT :