Skip to content

Commit

Permalink
[VP] VP FC 444 3 plane read kernel integrate
Browse files Browse the repository at this point in the history
VP FC 444 3 plane read kernel integrate.
  • Loading branch information
VickyZengg authored and intel-mediadev committed Sep 12, 2024
1 parent c8c3b96 commit d4e9742
Show file tree
Hide file tree
Showing 15 changed files with 586 additions and 20 deletions.
1 change: 1 addition & 0 deletions media_common/agnostic/common/vp/hal/vp_common_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ enum VpKernelID

kernelL0FcCommon,
kernelL0FcFP,
kernelL0Fc444PL3Input,

baseKernelMaxNumID
};
Expand Down

Large diffs are not rendered by default.

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 __IGVPFC_444PL3_INPUT_XE2_H__
#define __IGVPFC_444PL3_INPUT_XE2_H__

#include "media_bin_mgr.h"
DECLARE_SHARED_ARRAY_SIZE_UINT32(IGVPFC_444PL3_INPUT_GENERATION_XE2_SIZE);
DECLARE_SHARED_ARRAY_UINT32(IGVPFC_444PL3_INPUT_GENERATION_XE2);

#if defined(MEDIA_BIN_SUPPORT)

#define IGVPFC_444PL3_INPUT_GENERATION_XE2_NAME "IGVPFC_444PL3_INPUT_XE2"

#if defined(MEDIA_BIN_DLL)
static bool registerIGVPFC_444PL3_INPUT_XE2 = RegisterMediaBin(IGVPFC_444PL3_INPUT_GENERATION_XE2_NAME, IGVPFC_444PL3_INPUT_GENERATION_XE2_SIZE, IGVPFC_444PL3_INPUT_GENERATION_XE2);

#endif // defined(MEDIA_BIN_DLL)

#endif // defined(MEDIA_BIN_SUPPORT)

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

#endif // __IGVPFC_444PL3_INPUT_XE2_H__
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ set(TMP_SOURCES_
${CMAKE_CURRENT_LIST_DIR}/igvpkrn_l0_xe2_hpg.c
${CMAKE_CURRENT_LIST_DIR}/igvpfc_common_xe2.cpp
${CMAKE_CURRENT_LIST_DIR}/igvpfc_fp_xe2.cpp
${CMAKE_CURRENT_LIST_DIR}/igvpfc_444PL3_input_xe2.cpp
)


Expand All @@ -34,6 +35,7 @@ set(TMP_HEADERS_
${CMAKE_CURRENT_LIST_DIR}/igvpkrn_l0_xe2_hpg.h
${CMAKE_CURRENT_LIST_DIR}/igvpfc_common_xe2.h
${CMAKE_CURRENT_LIST_DIR}/igvpfc_fp_xe2.h
${CMAKE_CURRENT_LIST_DIR}/igvpfc_444PL3_input_xe2.h
)

set(SOFTLET_VP_SOURCES_
Expand Down
3 changes: 3 additions & 0 deletions media_softlet/agnostic/common/renderhal/renderhal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4294,6 +4294,9 @@ MOS_STATUS RenderHal_GetPlaneDefinitionForCommonMessage(
case Format_P216:
case Format_R5G6B5:
case Format_R8G8B8:
case Format_RGBP:
case Format_BGRP:
case Format_444P:
//already handled rightly in normal non-adv GetPlaneDefinition
break;
case Format_NV12:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,13 @@ VpResourceManager::~VpResourceManager()

m_allocator.DestroyVpSurface(m_cmfcCoeff);
m_allocator.DestroyVpSurface(m_decompressionSyncSurface);
for (int i = 0; i < 8; ++i)
{
if (m_fcIntermediaSurfaceInput[i])
{
m_allocator.DestroyVpSurface(m_fcIntermediaSurfaceInput[i]);
}
}

m_allocator.CleanRecycler();
}
Expand Down Expand Up @@ -1081,7 +1088,50 @@ MOS_STATUS VpResourceManager::AssignFcResources(VP_EXECUTE_CAPS &caps, std::vect
MOS_MMC_DISABLED,
allocated));
surfSetting.surfGroup.insert(std::make_pair(SurfaceTypeDecompressionSync, m_decompressionSyncSurface));

// Allocate L0 fc inter media Surface Input
for (uint32_t i = 0; i < inputSurfaces.size(); ++i)
{
if (inputSurfaces[i]->osSurface->Format == Format_RGBP ||
inputSurfaces[i]->osSurface->Format == Format_BGRP)
{
VP_PUBLIC_CHK_STATUS_RETURN(m_allocator.ReAllocateSurface(
m_fcIntermediaSurfaceInput[i],
"fcIntermediaSurfaceInput",
Format_A8R8G8B8,
MOS_GFXRES_2D,
MOS_TILE_Y,
inputSurfaces[i]->osSurface->dwWidth,
inputSurfaces[i]->osSurface->dwHeight,
false,
MOS_MMC_DISABLED,
allocated,
false,
IsDeferredResourceDestroyNeeded(),
MOS_HW_RESOURCE_USAGE_VP_INTERNAL_READ_WRITE_RENDER));
m_fcIntermediaSurfaceInput[i]->osSurface->Format = Format_A8R8G8B8;
}
else if (inputSurfaces[i]->osSurface->Format == Format_444P)
{
VP_PUBLIC_CHK_STATUS_RETURN(m_allocator.ReAllocateSurface(
m_fcIntermediaSurfaceInput[i],
"fcIntermediaSurfaceInput",
Format_AYUV,
MOS_GFXRES_2D,
MOS_TILE_Y,
inputSurfaces[i]->osSurface->dwWidth,
inputSurfaces[i]->osSurface->dwHeight,
false,
MOS_MMC_DISABLED,
allocated,
false,
IsDeferredResourceDestroyNeeded(),
MOS_HW_RESOURCE_USAGE_VP_INTERNAL_READ_WRITE_RENDER));
m_fcIntermediaSurfaceInput[i]->osSurface->Format = Format_AYUV;
}

surfSetting.surfGroup.insert(std::make_pair((SurfaceType)(SurfaceTypeFcIntermediaInput + i), m_fcIntermediaSurfaceInput[i]));
}
return MOS_STATUS_SUCCESS;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@ class VpResourceManager

// Fc Resource
VP_SURFACE *m_cmfcCoeff = nullptr;
VP_SURFACE *m_fcIntermediaSurfaceInput[8] = {};
//for decompreesion sync on interlace input of FC
VP_SURFACE *m_decompressionSyncSurface = nullptr;
// Hdr Resource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ enum SurfaceType
SurfaceTypeFcTarget1 = 0x2300,
SurfaceTypeFcCscCoeff = 0x2400,
SurfaceTypeDecompressionSync = 0x2500,
SurfaceTypeFcIntermediaInput = 0x2510,

// 3DLut Kernel
SurfaceType3DLut2D = 0x2600,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ MOS_STATUS VpKernelSet::CreateSingleKernelObject(
break;
case kernelL0FcCommon:
case kernelL0FcFP:
case kernelL0Fc444PL3Input:
kernel = (VpRenderKernelObj *)MOS_New(VpRenderL0FcKernel, m_hwInterface, kernelId, kernelIndex, m_allocator);
VP_RENDER_CHK_NULL_RETURN(kernel);
break;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* 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 __IGVPFC_444PL3_INPUT_ENUM_H__
#define __IGVPFC_444PL3_INPUT_ENUM_H__

enum ARGS_FC_444PL3_INPUT_IMAGEREAD
{
FC_444PL3_INPUT_IMAGEREAD_INPUTPLANE0,
FC_444PL3_INPUT_IMAGEREAD_INPUTPLANE1,
FC_444PL3_INPUT_IMAGEREAD_INPUTPLANE2,
FC_444PL3_INPUT_IMAGEREAD_OUTPUTPLANE,
FC_444PL3_INPUT_IMAGEREAD_INPUTINDEX,
FC_444PL3_INPUT_IMAGEREAD_OUTPUTINDEX,
FC_444PL3_INPUT_IMAGEREAD_PLANEINDEX,
FC_444PL3_INPUT_IMAGEREAD_ENQUEUED_LOCAL_SIZE,
FC_444PL3_INPUT_IMAGEREAD_GLOBAL_ID_OFFSET,
FC_444PL3_INPUT_IMAGEREAD_LOCAL_SIZE,
FC_444PL3_INPUT_IMAGEREAD_MAX
};

#endif // __IGVPFC_444PL3_INPUT_ENUM_H__
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ set(TMP_HEADERS_
${CMAKE_CURRENT_LIST_DIR}/igvp3dlut_args.h
${CMAKE_CURRENT_LIST_DIR}/igvpfc_common_args.h
${CMAKE_CURRENT_LIST_DIR}/igvpfc_fp_args.h
${CMAKE_CURRENT_LIST_DIR}/igvpfc_444PL3_input_args.h
)

set(SOFTLET_VP_SOURCES_
Expand Down
Loading

0 comments on commit d4e9742

Please sign in to comment.