Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanAizek authored Nov 3, 2024
2 parents b712806 + dcbbaf4 commit f2e2438
Show file tree
Hide file tree
Showing 26 changed files with 939 additions and 398 deletions.
7 changes: 5 additions & 2 deletions media_common/agnostic/common/vp/hal/vp_common_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ enum VpKernelIDNext
{
vpKernelIDNextBase = 0x200,
kernelHdr3DLutCalc = vpKernelIDNextBase,
kernelHdr3DLutCalcL0,
kernelHdr3DLutCalcOcl,
kernelHVSCalc,
vpKernelIDNextMax
};
Expand Down Expand Up @@ -1074,6 +1074,8 @@ struct VPHAL_RENDER_PARAMS

bool bForceToRender = false; // Force to render to perform scaling.

HANDLE gpuAppTaskEvent; //!< GPU App task event

VPHAL_RENDER_PARAMS() : uSrcCount(0),
pSrc(),
uDstCount(0),
Expand All @@ -1096,7 +1098,8 @@ struct VPHAL_RENDER_PARAMS
pExtensionData(nullptr),
bPathKernel(false),
bUseVEHdrSfc(false),
bNonFirstFrame(false)
bNonFirstFrame(false),
gpuAppTaskEvent(nullptr)
{
}
};
Expand Down
302 changes: 302 additions & 0 deletions media_softlet/agnostic/Xe_R/Xe2_HPG/vp/kernel/igvp3dlut_xe2.cpp

Large diffs are not rendered by default.

53 changes: 53 additions & 0 deletions media_softlet/agnostic/Xe_R/Xe2_HPG/vp/kernel/igvp3dlut_xe2.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright (c) 2024, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* 'Software'), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

////////////////////////////////////////////////////////////////////////////////
// !!! WARNING - AUTO GENERATED FILE. DO NOT EDIT DIRECTLY. !!!
// Generated by KernelBinToSource.exe tool
////////////////////////////////////////////////////////////////////////////////

#ifndef __IGVP3DLUT_XE2_H__
#define __IGVP3DLUT_XE2_H__

#include "media_bin_mgr.h"
DECLARE_SHARED_ARRAY_SIZE_UINT32(IGVP3DLUT_GENERATION_XE2_SIZE);
DECLARE_SHARED_ARRAY_UINT32(IGVP3DLUT_GENERATION_XE2);

#if defined(MEDIA_BIN_SUPPORT)

#define IGVP3DLUT_GENERATION_XE2_NAME "IGVP3DLUT_XE2"

#if defined(MEDIA_BIN_DLL)
static bool registerIGVP3DLUT_XE2 = RegisterMediaBin(IGVP3DLUT_GENERATION_XE2_NAME, IGVP3DLUT_GENERATION_XE2_SIZE, IGVP3DLUT_GENERATION_XE2);

#endif // defined(MEDIA_BIN_DLL)

#endif // defined(MEDIA_BIN_SUPPORT)

#if !defined(MEDIA_BIN_DLL)
#include "igvp3dlut_args.h"
// Following functions are always needed in media driver dll no matter media_bin_supported or not
extern void AddVpNativeKernelEntryToList3dlutXe2(vp::VpPlatformInterface &vpPlatformInterface);
#endif // !defined(MEDIA_BIN_DLL)

#endif // __IGVP3DLUT_XE2_H__
589 changes: 298 additions & 291 deletions media_softlet/agnostic/Xe_R/Xe2_HPG/vp/kernel/igvpfc_fp_xe2.cpp

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ set(TMP_SOURCES_
${CMAKE_CURRENT_LIST_DIR}/igvpfc_420PL3_output_xe2.cpp
${CMAKE_CURRENT_LIST_DIR}/igvpfc_444PL3_input_xe2.cpp
${CMAKE_CURRENT_LIST_DIR}/igvpfc_444PL3_output_xe2.cpp
${CMAKE_CURRENT_LIST_DIR}/igvp3dlut_xe2.cpp
)


Expand All @@ -42,6 +43,7 @@ set(TMP_HEADERS_
${CMAKE_CURRENT_LIST_DIR}/igvpfc_420PL3_output_xe2.h
${CMAKE_CURRENT_LIST_DIR}/igvpfc_444PL3_input_xe2.h
${CMAKE_CURRENT_LIST_DIR}/igvpfc_444PL3_output_xe2.h
${CMAKE_CURRENT_LIST_DIR}/igvp3dlut_xe2.h
)

set(SOFTLET_VP_SOURCES_
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1318,9 +1318,9 @@ MOS_STATUS SwFilterHdr::Configure(VP_PIPELINE_PARAMS &params, bool isInputSurf,
auto userFeatureControl = m_vpInterface.GetHwInterface()->m_userFeatureControl;
auto vpPlatformInterface = m_vpInterface.GetHwInterface()->m_vpPlatformInterface;
VpFeatureReport *vpFeatureReport = dynamic_cast<VpFeatureReport *>(m_vpInterface.GetHwInterface()->m_reporting);
m_Params.isOclKernelEnabled = userFeatureControl->EnableOcl3DLut();
#if (_DEBUG || _RELEASE_INTERNAL)
m_Params.isL0KernelEnabled = (vpPlatformInterface->IsAdvanceNativeKernelSupported() && userFeatureControl->EnableL03DLut());
vpFeatureReport->GetFeatures().isL03DLut = m_Params.isL0KernelEnabled;
vpFeatureReport->GetFeatures().isOcl3DLut = m_Params.isOclKernelEnabled;
#endif

VP_PUBLIC_CHK_NULL_RETURN(surfInput);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ struct FeatureParamHdr : public FeatureParam
uint32_t uiSplitFramePortions = 1; //!< Split Frame flag
bool bForceSplitFrame = false;
bool bNeed3DSampler = false; //!< indicate whether 3D should neede by force considering AVS removal etc.
bool isL0KernelEnabled = false;
bool isOclKernelEnabled = false;

HDR_PARAMS srcHDRParams = {};
HDR_PARAMS targetHDRParams = {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "vp_render_vebox_hdr_3dlut_kernel.h"
#include "vp_render_vebox_hvs_kernel.h"
#include "vp_render_hdr_kernel.h"
#include "vp_render_vebox_hdr_3dlut_l0_kernel.h"
#include "vp_render_vebox_hdr_3dlut_ocl_kernel.h"

using namespace vp;

Expand Down Expand Up @@ -149,9 +149,9 @@ MOS_STATUS VpKernelSet::CreateSingleKernelObject(
}
VP_RENDER_CHK_NULL_RETURN(kernel);
break;
case kernelHdr3DLutCalcL0:
VP_RENDER_NORMALMESSAGE("HDR 3dlut kernel use l0 fillLutTable_3dlut kernel");
kernel = (VpRenderKernelObj *)MOS_New(VpRenderHdr3DLutL0Kernel, m_hwInterface, m_allocator);
case kernelHdr3DLutCalcOcl:
VP_RENDER_NORMALMESSAGE("HDR 3dlut kernel use ocl fillLutTable_3dlut kernel");
kernel = (VpRenderKernelObj *)MOS_New(VpRenderHdr3DLutOclKernel, m_hwInterface, m_allocator);
VP_RENDER_CHK_NULL_RETURN(kernel);
break;
case kernelHVSCalc:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ enum ARGS_FC_FP_FASTEXPRESS
FC_FP_FASTEXPRESS_INPUTPL1,
FC_FP_FASTEXPRESS_OUTPUTPL0,
FC_FP_FASTEXPRESS_OUTPUTPL1,
FC_FP_FASTEXPRESS_IMAGEPARAM,
FC_FP_FASTEXPRESS_LAYERNUMBER,
FC_FP_FASTEXPRESS_INLINE_SAMPLER_LINEAR_CLAMP_EDGE,
FC_FP_FASTEXPRESS_INLINE_SAMPLER_NEAREST_CLAMP_EDGE,
FC_FP_FASTEXPRESS_IMAGEPARAM,
FC_FP_FASTEXPRESS_OUTPUTPARAM,
FC_FP_FASTEXPRESS_PRIVATE_BASE_STATELESS,
FC_FP_FASTEXPRESS_GLOBAL_SIZE,
Expand Down
12 changes: 6 additions & 6 deletions media_softlet/agnostic/common/vp/hal/features/vp_hdr_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ MOS_STATUS VpHdrFilter::Prepare()
MOS_STATUS VpHdrFilter::Destroy()
{
VP_FUNC_CALL();
for (auto &handle : m_renderHdr3DLutL0Params)
for (auto &handle : m_renderHdr3DLutOclParams)
{
KRN_ARG &krnArg = handle.second;
MOS_FreeMemAndSetNull(krnArg.pData);
Expand Down Expand Up @@ -116,7 +116,7 @@ MOS_STATUS VpHdrFilter::CalculateEngineParams(
m_renderHdr3DLutParams.threadWidth = hdrParams.lutSize;
m_renderHdr3DLutParams.threadHeight = hdrParams.lutSize;

if (hdrParams.isL0KernelEnabled == false)
if (hdrParams.isOclKernelEnabled == false)
{
KRN_ARG krnArg = {};
krnArg.uIndex = 0;
Expand Down Expand Up @@ -157,17 +157,17 @@ MOS_STATUS VpHdrFilter::CalculateEngineParams(
uint32_t localDepth = 1;
m_renderHdr3DLutParams.localWidth = localWidth;
m_renderHdr3DLutParams.localHeight = localHeight;
m_renderHdr3DLutParams.kernelId = (VpKernelID)kernelHdr3DLutCalcL0;
m_renderHdr3DLutParams.kernelId = (VpKernelID)kernelHdr3DLutCalcOcl;

//step 1: setting curbe arguments
for (auto const &kernelArg : kernelArgs)
{
uint32_t uIndex = kernelArg.uIndex;
auto argHandle = m_renderHdr3DLutL0Params.find(uIndex);
if (argHandle == m_renderHdr3DLutL0Params.end())
auto argHandle = m_renderHdr3DLutOclParams.find(uIndex);
if (argHandle == m_renderHdr3DLutOclParams.end())
{
KRN_ARG krnArg = {};
argHandle = m_renderHdr3DLutL0Params.emplace(uIndex, krnArg).first;
argHandle = m_renderHdr3DLutOclParams.emplace(uIndex, krnArg).first;
VP_PUBLIC_CHK_NOT_FOUND_RETURN(argHandle, &m_renderHdr3DLutL0Params);
}
KRN_ARG &krnArg = argHandle->second;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class VpHdrFilter : public VpFilter
VEBOX_HDR_PARAMS m_veboxHdrParams = {};
RENDER_HDR_3DLUT_CAL_PARAMS m_renderHdr3DLutParams = {};
RENDER_HDR_PARAMS m_renderHdrParams = {};
KERNEL_INDEX_ARG_MAP m_renderHdr3DLutL0Params = {};
KERNEL_INDEX_ARG_MAP m_renderHdr3DLutOclParams = {};
SwFilterPipe *m_executedPipe = nullptr;

SurfaceType m_surfType3DLut = SurfaceType3DLut;
Expand Down
Loading

0 comments on commit f2e2438

Please sign in to comment.