Skip to content
This repository was archived by the owner on Jun 1, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ class DXVASupport
MFX_AUTO_LTRACE(MFX_TRACE_LEVEL_HOTSPOTS, "H264 decode DDISubmitTask");
TRACE_EVENT(MFX_TRACE_HOTSPOT_DDI_SUBMIT_TASK, EVENT_TYPE_START, TR_KEY_DDI_API, make_event_data(++FrameIndex, pFrame->GetFrameData()->GetFrameMID()));

sts = m_va->BeginFrame(pFrame->GetFrameData()->GetFrameMID(), field);
int32_t frame_id = pFrame->GetFrameData()->GetFrameMID();
sts = m_va->BeginFrame(frame_id, field);
MFX_LTRACE_I(MFX_TRACE_LEVEL_INTERNAL, sts);
TRACE_EVENT(MFX_TRACE_HOTSPOT_DDI_SUBMIT_TASK, EVENT_TYPE_END, TR_KEY_DDI_API, make_event_data(FrameIndex, pFrame->GetFrameData()->GetFrameMID(), sts));

Expand All @@ -148,7 +149,7 @@ class DXVASupport

TRACE_EVENT(MFX_TRACE_HOTSPOT_DDI_ENDFRAME_TASK, EVENT_TYPE_START, TR_KEY_DDI_API, make_event_data(FrameIndex, m_va));

sts = m_va->EndFrame();
sts = m_va->EndFrame(reinterpret_cast<void*>(&frame_id));
MFX_LTRACE_I(MFX_TRACE_LEVEL_INTERNAL, sts);
TRACE_EVENT(MFX_TRACE_HOTSPOT_DDI_ENDFRAME_TASK, EVENT_TYPE_END, TR_KEY_DDI_API, make_event_data(FrameIndex, sts));

Expand Down
20 changes: 16 additions & 4 deletions _studio/shared/umc/io/umc_va/src/umc_va_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#include "umc_frame_allocator.h"
#include "mfxstructures.h"

#include "linux_skuwa_debug.h"

#define UMC_VA_NUM_OF_COMP_BUFFERS 8
#define UMC_VA_DECODE_STREAM_OUT_ENABLE 2

Expand Down Expand Up @@ -640,6 +642,7 @@ Status LinuxVideoAccelerator::BeginFrame(int32_t FrameBufIndex)
Status sts = m_allocator->GetFrameHandle(FrameBufIndex, &surface);
MFX_CHECK(sts == UMC_OK, sts);

DEVINFO_WARNING("-zcy- %s surf:%d", __func__, *surface);
if (lvaBeforeBegin == m_FrameState)
{
{
Expand Down Expand Up @@ -870,7 +873,7 @@ LinuxVideoAccelerator::Execute()
return umcRes;
}

Status LinuxVideoAccelerator::EndFrame(void*)
Status LinuxVideoAccelerator::EndFrame(void* hdl)
{
MFX_AUTO_LTRACE(MFX_TRACE_LEVEL_INTERNAL, "EndFrame");
VAStatus va_res = VA_STATUS_SUCCESS;
Expand All @@ -886,6 +889,17 @@ Status LinuxVideoAccelerator::EndFrame(void*)
std::ignore = MFX_STS_TRACE(va_res);
Status stsRet = va_to_umc_res(va_res);

{ // for test, call vaSyncSurface/vaQuerySurfaceError to get surface decode error.
uint16_t t_sts = 0, t_err = 0;
int32_t FrameBufIndex = *((int32_t *)hdl);
VASurfaceID *surface;
Status sts = m_allocator->GetFrameHandle(FrameBufIndex, &surface);
MFX_CHECK(sts == UMC_OK, sts);

QueryTaskStatus(FrameBufIndex, &t_sts, &t_err);
DEVINFO_WARNING("-zcy- %s surf:%d status:%d err:%d", __func__, *surface, t_sts, t_err);
}

m_FrameState = lvaBeforeBegin;

for (uint32_t i = 0; i < m_uiCompBuffersUsed; ++i)
Expand Down Expand Up @@ -929,8 +943,6 @@ uint16_t LinuxVideoAccelerator::GetDecodingError(VASurfaceID *surface)
MFX_AUTO_LTRACE(MFX_TRACE_LEVEL_EXTCALL, "GetDecodingError");
uint16_t error = 0;

#ifndef ANDROID
// NOTE: at the moment there is no such support for Android, so no need to execute...
VAStatus va_sts;

VASurfaceDecodeMBErrors* pVaDecErr = NULL;
Expand All @@ -956,7 +968,7 @@ uint16_t LinuxVideoAccelerator::GetDecodingError(VASurfaceID *surface)
error = MFX_CORRUPTION_MAJOR;
}
}
#endif

return error;
}

Expand Down
1 change: 1 addition & 0 deletions android/mfx_defs_internal.mk
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ MFX_INCLUDES_INTERNAL := \

MFX_INCLUDES_INTERNAL_HW := \
$(MFX_INCLUDES_INTERNAL) \
-I system/logging/liblog/include