Skip to content

Commit

Permalink
[Encode] Fix build issue when setting HEVC_Encode_Supported="no"
Browse files Browse the repository at this point in the history
This commit fix the compilation error when setting HEVC_Encode_Supported="no"
Fix for intel#1540
  • Loading branch information
bai-isaac committed Jan 13, 2023
1 parent c0c4e25 commit 8219a84
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 0 additions & 2 deletions media_driver/agnostic/Xe_M/Xe_HPM/codec/hal/media_srcs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ if ("${AVC_Encode_VDEnc_Supported}" STREQUAL "yes")
)
endif ()

if ("${HEVC_Encode_VDEnc_Supported}" STREQUAL "yes")
set (TMP_ENC_SOURCES_
${TMP_ENC_SOURCES_}
${CMAKE_CURRENT_LIST_DIR}/codechal_hw_xe_hpm.cpp
Expand All @@ -49,7 +48,6 @@ if ("${HEVC_Encode_VDEnc_Supported}" STREQUAL "yes")
${TMP_ENC_HEADERS_}
${CMAKE_CURRENT_LIST_DIR}/codechal_hw_xe_hpm.h
)
endif ()

# mmc
if("${MMC_Supported}" STREQUAL "yes")
Expand Down
2 changes: 0 additions & 2 deletions media_driver/agnostic/Xe_M/Xe_XPM/codec/hal/media_srcs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ set (TMP_DEC_HEADERS_
${CMAKE_CURRENT_LIST_DIR}/codechal_kernel_olp_mdf_xe_xpm.h
)

if ("${HEVC_Encode_VDEnc_Supported}" STREQUAL "yes")
set (TMP_ENC_SOURCES_
${TMP_ENC_SOURCES_}
${CMAKE_CURRENT_LIST_DIR}/codechal_hw_xe_xpm.cpp
Expand All @@ -38,7 +37,6 @@ if ("${HEVC_Encode_VDEnc_Supported}" STREQUAL "yes")
${TMP_ENC_HEADERS_}
${CMAKE_CURRENT_LIST_DIR}/codechal_hw_xe_xpm.h
)
endif ()

set(SOURCES_
${SOURCES_}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@
//!

#include "codechal_encoder_base.h"
#include "codechal_encode_tracked_buffer_hevc.h"
#include "mos_solo_generic.h"
#include "hal_oca_interface.h"
#include "codechal_encode_csc_ds.h"
#include "mos_os_cp_interface_specific.h"
#if defined (_HEVC_ENCODE_VME_SUPPORTED) || defined (_HEVC_ENCODE_VDENC_SUPPORTED)
#include "codechal_encode_tracked_buffer_hevc.h"
#endif

void CodechalEncoderState::PrepareNodes(
MOS_GPU_NODE& videoGpuNode,
Expand Down Expand Up @@ -606,11 +608,13 @@ MOS_STATUS CodechalEncoderState::Allocate(CodechalSetting * codecHalSettings)
CODECHAL_ENCODE_CHK_NULL_RETURN(m_allocator = MOS_New(CodechalEncodeAllocator, this));

// create tracked buffer state
#if defined (_HEVC_ENCODE_VME_SUPPORTED) || defined (_HEVC_ENCODE_VDENC_SUPPORTED)
if (m_standard == CODECHAL_HEVC)
{
CODECHAL_ENCODE_CHK_NULL_RETURN(m_trackedBuf = MOS_New(CodechalEncodeTrackedBufferHevc, this));
}
else
#endif
{
CODECHAL_ENCODE_CHK_NULL_RETURN(m_trackedBuf = MOS_New(CodechalEncodeTrackedBuffer, this));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ class CodechalCmdInitializer
//!
virtual MOS_STATUS CmdInitializerAllocateResources(CodechalHwInterface* m_hwInterface);

#if defined (_HEVC_ENCODE_VME_SUPPORTED) || defined (_HEVC_ENCODE_VDENC_SUPPORTED)
//!
//! \brief Set all the data of the InputCom of command initializer HuC FW
//!
Expand Down Expand Up @@ -326,7 +327,7 @@ class CodechalCmdInitializer
bool brcEnabled,
PMOS_RESOURCE secondlevelBB,
MOS_COMMAND_BUFFER* cmdBuffer = nullptr);

#endif
//!
//! \brief Set Add Commands to BatchBuffer
//!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,6 @@ class CodechalCmdInitializerG11 : public CodechalCmdInitializer
virtual MOS_STATUS CmdInitializerAllocateResources(
CodechalHwInterface* m_hwInterface) override;

virtual MOS_STATUS CmdInitializerSetDmem(bool brcEnabled) override;

//!
//! \brief Free Resources
//!
Expand All @@ -199,6 +197,9 @@ class CodechalCmdInitializerG11 : public CodechalCmdInitializer
PMOS_COMMAND_BUFFER cmdBuffer,
HucCopyParams* params);

#if defined (_HEVC_ENCODE_VME_SUPPORTED) || defined (_HEVC_ENCODE_VDENC_SUPPORTED)
virtual MOS_STATUS CmdInitializerSetDmem(bool brcEnabled) override;

//!
//! \brief Add command of initializer HuC FW
//!
Expand All @@ -220,7 +221,7 @@ class CodechalCmdInitializerG11 : public CodechalCmdInitializer
uint16_t size,
uint32_t startOffset
);

#endif

#ifdef _VP9_ENCODE_VDENC_SUPPORTED
//!
Expand Down

0 comments on commit 8219a84

Please sign in to comment.