Skip to content

Commit

Permalink
[RT Common] fix linux build failure (#6007)
Browse files Browse the repository at this point in the history
Co-authored-by: Liu, Rachel <[email protected]>
  • Loading branch information
gfxVPLsdm and rachel-liu1024 authored Nov 6, 2023
1 parent edeb2a1 commit c1f1c6e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
5 changes: 3 additions & 2 deletions _studio/shared/src/libmfx_allocator_vaapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,12 @@ mfxDefaultAllocatorVAAPI::AllocFramesHW(
self->m_frameHandles.clear();
self->m_frameHandles.reserve(request->NumFrameSuggested);

self->m_allocatedSurfaces = std::move(allocated_surfaces);

// Push new frames
for (mfxU32 i = 0; i < request->NumFrameSuggested; ++i)
{
allocated_mids[i].m_surface = &allocated_surfaces[i];
allocated_mids[i].m_surface = &self->m_allocatedSurfaces[i];
allocated_mids[i].m_fourcc = request->Info.FourCC;

self->m_frameHandles.push_back(&allocated_mids[i]);
Expand All @@ -433,7 +435,6 @@ mfxDefaultAllocatorVAAPI::AllocFramesHW(
self->NumFrames = self->m_frameHandles.size();

// Save new frames in internal state
self->m_allocatedSurfaces = std::move(allocated_surfaces);
self->m_allocatedMids = std::move(allocated_mids);
}
else
Expand Down
6 changes: 3 additions & 3 deletions _studio/shared/src/libmfx_core_vaapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,8 @@ class VACopyWrapper
return true;

// Two planes format
size_t luma_size_in_bytes_aligned = sw_surface.Data.Pitch * mfx::align2_value(sw_surface.Info.Height, 32);
size_t luma_size_in_bytes = sw_surface.Data.Pitch * mfx::align2_value(sw_surface.Info.Height, 1);
size_t luma_size_in_bytes_aligned = (mfxU32)sw_surface.Data.Pitch * mfx::align2_value(sw_surface.Info.Height, 32);
size_t luma_size_in_bytes = (mfxU32)sw_surface.Data.Pitch * mfx::align2_value(sw_surface.Info.Height, 1);
// Assume that frame data is stored in continuous chunk (Chroma right after Luma)
// use relative offset between UV and Y, not pitch * height
// Two cases need to be checked:
Expand Down Expand Up @@ -1102,7 +1102,7 @@ mfxStatus VAAPIVideoCORE_T<Base>::ProcessRenderTargets(
#endif

this->RegisterMids(response, request->Type, !m_bUseExtAllocForHWFrames, pAlloc);
m_pcHWAlloc.release();
m_pcHWAlloc.release(); // pointer is managed by m_AllocatorQueue

return MFX_ERR_NONE;

Expand Down
1 change: 1 addition & 0 deletions _studio/shared/src/mfx_umc_alloc_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2302,6 +2302,7 @@ void SurfaceSource::SetFreeSurfaceAllowedFlag(bool flag)
if (!m_redirect_to_vpl_path != !!m_umc_allocator_adapter)
{
std::ignore = MFX_STS_TRACE(MFX_ERR_NOT_INITIALIZED);
return;
}

if (m_redirect_to_vpl_path)
Expand Down
4 changes: 3 additions & 1 deletion _studio/shared/umc/core/umc/src/umc_frame_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,9 @@ FrameData::FrameData()
: m_locked(false)
, m_FrameMID(FRAME_MID_INVALID)
, m_FrameAlloc(0)
{}
, m_PlaneInfo{}
{
}

FrameData::FrameData(const FrameData & fd)
: m_locked(false)
Expand Down
1 change: 1 addition & 0 deletions _studio/shared/umc/core/vm/src/vm_strings_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ int32_t vm_string_vprintf(const vm_char *format, va_list argptr)
va_copy(copy, argptr);
sts = vprintf(format, copy);
va_end(argptr);
va_end(copy);
return sts;
}

1 change: 1 addition & 0 deletions _studio/shared/umc/io/umc_va/src/umc_va_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ VAProfile get_next_va_profile(uint32_t umc_codec, uint32_t profile)
break;
case UMC::VA_H265 | UMC::VA_PROFILE_SCC | UMC::VA_PROFILE_444:
if (profile < 1) va_profile = VAProfileHEVCSccMain444;
break;
case UMC::VA_H265 | UMC::VA_PROFILE_SCC | UMC::VA_PROFILE_444 | UMC::VA_PROFILE_10:
if (profile < 1) va_profile = VAProfileHEVCSccMain444_10;
break;
Expand Down

0 comments on commit c1f1c6e

Please sign in to comment.