Skip to content

Commit 02a2da1

Browse files
LhGuintel-mediadev
authored andcommitted
[Media Common] HUC Kernel Bin Upstream for NVL-S
Xe3p_lpm HUC Kernel Bin Upstream.
1 parent e7aacda commit 02a2da1

26 files changed

+38485
-4
lines changed
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
/*
2+
* Copyright (c) 2024-2026, Intel Corporation
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a
5+
* copy of this software and associated documentation files (the "Software"),
6+
* to deal in the Software without restriction, including without limitation
7+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
* and/or sell copies of the Software, and to permit persons to whom the
9+
* Software is furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included
12+
* in all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17+
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
18+
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19+
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20+
* OTHER DEALINGS IN THE SOFTWARE.
21+
*/
22+
//!
23+
//! \file huc_kernel_source_xe3p_lpm_base.cpp
24+
//! \brief Implementation of the huc kernel source management
25+
//!
26+
#include "huc_kernel_source_xe3p_lpm_base.h"
27+
28+
#include "nvlMediaKernels.h"
29+
30+
#ifndef MEDIA_BIN_SUPPORT
31+
HUC_KERNEL_BIN_LOCAL(__MediaKernels_s2l_nvl)
32+
HUC_KERNEL_BIN_LOCAL(__MediaKernels_copykrn_nvl)
33+
HUC_KERNEL_BIN_LOCAL(__MediaKernels_avcbrc_init_nvl)
34+
HUC_KERNEL_BIN_LOCAL(__MediaKernels_avcbrc_update_nvl)
35+
HUC_KERNEL_BIN_LOCAL(__MediaKernels_vp9dec_nvl)
36+
HUC_KERNEL_BIN_LOCAL(__MediaKernels_vp9hpu_nvl)
37+
HUC_KERNEL_BIN_LOCAL(__MediaKernels_hevcbrc_init_nvl)
38+
HUC_KERNEL_BIN_LOCAL(__MediaKernels_hevcbrc_update_nvl)
39+
HUC_KERNEL_BIN_LOCAL(__MediaKernels_vp9brc_init_nvl)
40+
HUC_KERNEL_BIN_LOCAL(__MediaKernels_vp9brc_update_nvl)
41+
HUC_KERNEL_BIN_LOCAL(__MediaKernels_pakint_nvl)
42+
HUC_KERNEL_BIN_LOCAL(__MediaKernels_lookahead_nvl)
43+
HUC_KERNEL_BIN_LOCAL(__MediaKernels_av1ba_nvl)
44+
HUC_KERNEL_BIN_LOCAL(__MediaKernels_av1brc_init_nvl)
45+
HUC_KERNEL_BIN_LOCAL(__MediaKernels_av1brc_update_nvl)
46+
HUC_KERNEL_BIN_LOCAL(__MediaKernels_vvcs2l_nvl)
47+
#ifdef _MEDIA_RESERVED
48+
HUC_KERNEL_BIN_LOCAL(__MediaKernels_drm_nvl)
49+
HUC_KERNEL_BIN_LOCAL(__MediaKernels_avcbrc_pxp_init_nvl)
50+
HUC_KERNEL_BIN_LOCAL(__MediaKernels_avcbrc_pxp_update_nvl)
51+
#endif
52+
HUC_KERNEL_BIN_LOCAL(__MediaKernels_av1slbb_update_nvl)
53+
HUC_KERNEL_BIN_LOCAL(__MediaKernels_avcslbb_update_nvl)
54+
HUC_KERNEL_BIN_LOCAL(__MediaKernels_hevcslbb_update_nvl)
55+
#endif
56+
57+
const HucKernelSource::BinaryTable HucKernelSourceXe3P_Lpm_Base::m_binTable =
58+
{
59+
{HucKernelSource::hevcS2lKernelId, HUC_KERNEL_BIN_ELEMENT(__MediaKernels_s2l_nvl)},
60+
#ifdef _MEDIA_RESERVED
61+
{HucKernelSource::drmKernelId, HUC_KERNEL_BIN_ELEMENT(__MediaKernels_drm_nvl)},
62+
#endif
63+
{HucKernelSource::copyKernelId, HUC_KERNEL_BIN_ELEMENT(__MediaKernels_copykrn_nvl)},
64+
{HucKernelSource::vdencBrcInitKernelId, HUC_KERNEL_BIN_ELEMENT(__MediaKernels_avcbrc_init_nvl)},
65+
{HucKernelSource::vdencBrcUpdateKernelId, HUC_KERNEL_BIN_ELEMENT(__MediaKernels_avcbrc_update_nvl)},
66+
{HucKernelSource::vp9ProbUpdateKernelId, HUC_KERNEL_BIN_ELEMENT(__MediaKernels_vp9dec_nvl)},
67+
{HucKernelSource::vp9EncKernelId, HUC_KERNEL_BIN_ELEMENT(__MediaKernels_vp9hpu_nvl)},
68+
{HucKernelSource::hevcBrcInitKernelId, HUC_KERNEL_BIN_ELEMENT(__MediaKernels_hevcbrc_init_nvl)},
69+
{HucKernelSource::hevcBrcUpdateKernelId, HUC_KERNEL_BIN_ELEMENT(__MediaKernels_hevcbrc_update_nvl)},
70+
{HucKernelSource::hevcBrcLowdelayKernelId, HucKernelSource::m_invalidKernelBin},
71+
{HucKernelSource::vp9VdencBrcInitKernelId, HUC_KERNEL_BIN_ELEMENT(__MediaKernels_vp9brc_init_nvl)},
72+
{HucKernelSource::vp9VdencBrcUpdateKernelId, HUC_KERNEL_BIN_ELEMENT(__MediaKernels_vp9brc_update_nvl)},
73+
{HucKernelSource::vp9VdencProbKernelId, HucKernelSource::m_invalidKernelBin},
74+
{HucKernelSource::pakIntegrationKernelId, HUC_KERNEL_BIN_ELEMENT(__MediaKernels_pakint_nvl)},
75+
{HucKernelSource::hevcLaAnalysisKernelId, HUC_KERNEL_BIN_ELEMENT(__MediaKernels_lookahead_nvl)},
76+
{HucKernelSource::backAnnonationKernelId, HUC_KERNEL_BIN_ELEMENT(__MediaKernels_av1ba_nvl)},
77+
{HucKernelSource::av1BrcInitKernelId, HUC_KERNEL_BIN_ELEMENT(__MediaKernels_av1brc_init_nvl)},
78+
{HucKernelSource::av1BrcUpdateKernelId, HUC_KERNEL_BIN_ELEMENT(__MediaKernels_av1brc_update_nvl)},
79+
{HucKernelSource::vvcS2lKernelId, HUC_KERNEL_BIN_ELEMENT(__MediaKernels_vvcs2l_nvl)},
80+
#ifdef _MEDIA_RESERVED
81+
{HucKernelSource::avcPxpBrcInitKernelId, HUC_KERNEL_BIN_ELEMENT(__MediaKernels_avcbrc_pxp_init_nvl)},
82+
{HucKernelSource::avcPxpBrcUpdateKernelId, HUC_KERNEL_BIN_ELEMENT(__MediaKernels_avcbrc_pxp_update_nvl)},
83+
#endif
84+
{HucKernelSource::av1SlbbUpdateKernelId, HUC_KERNEL_BIN_ELEMENT(__MediaKernels_av1slbb_update_nvl)},
85+
{HucKernelSource::avcSlbbUpdateKernelId, HUC_KERNEL_BIN_ELEMENT(__MediaKernels_avcslbb_update_nvl)},
86+
{HucKernelSource::hevcSlbbUpdateKernelId, HUC_KERNEL_BIN_ELEMENT(__MediaKernels_hevcslbb_update_nvl)},
87+
};
88+
89+
// Hash index table (kernel id, hash index)
90+
const HucKernelSource::HashIdxTable HucKernelSourceXe3P_Lpm_Base::m_hashIdxTable =
91+
{
92+
{HucKernelSource::hevcS2lKernelId, 1},
93+
{HucKernelSource::drmKernelId, 2},
94+
{HucKernelSource::copyKernelId, 3},
95+
{HucKernelSource::avcPxpBrcInitKernelId, 4},
96+
{HucKernelSource::avcPxpBrcUpdateKernelId, 5},
97+
{HucKernelSource::vp9ProbUpdateKernelId, 6},
98+
{HucKernelSource::vdencBrcInitKernelId, HucKernelSource::m_invalidHashIndex},
99+
{HucKernelSource::vdencBrcUpdateKernelId, HucKernelSource::m_invalidHashIndex},
100+
{HucKernelSource::vp9EncKernelId, HucKernelSource::m_invalidHashIndex},
101+
{HucKernelSource::hevcBrcInitKernelId, HucKernelSource::m_invalidHashIndex},
102+
{HucKernelSource::hevcBrcUpdateKernelId, HucKernelSource::m_invalidHashIndex},
103+
{HucKernelSource::hevcBrcLowdelayKernelId, HucKernelSource::m_invalidHashIndex},
104+
{HucKernelSource::vp9VdencBrcInitKernelId, HucKernelSource::m_invalidHashIndex},
105+
{HucKernelSource::vp9VdencBrcUpdateKernelId, HucKernelSource::m_invalidHashIndex},
106+
{HucKernelSource::vp9VdencProbKernelId, HucKernelSource::m_invalidHashIndex},
107+
{HucKernelSource::cmdInitializerKernelId, HucKernelSource::m_invalidHashIndex},
108+
{HucKernelSource::pakIntegrationKernelId, HucKernelSource::m_invalidHashIndex},
109+
{HucKernelSource::hevcLaAnalysisKernelId, HucKernelSource::m_invalidHashIndex},
110+
{HucKernelSource::backAnnonationKernelId, HucKernelSource::m_invalidHashIndex},
111+
{HucKernelSource::av1BrcInitKernelId, HucKernelSource::m_invalidHashIndex},
112+
{HucKernelSource::av1BrcUpdateKernelId, HucKernelSource::m_invalidHashIndex},
113+
{HucKernelSource::vvcS2lKernelId, 7},
114+
{HucKernelSource::av1SlbbUpdateKernelId, HucKernelSource::m_invalidHashIndex},
115+
{HucKernelSource::avcSlbbUpdateKernelId, HucKernelSource::m_invalidHashIndex},
116+
{HucKernelSource::hevcSlbbUpdateKernelId, HucKernelSource::m_invalidHashIndex},
117+
};
118+
119+
MOS_STATUS HucKernelSourceXe3P_Lpm_Base::GetManifest(HucManifest &manifest)
120+
{
121+
#ifdef _MEDIA_RESERVED
122+
manifest.m_data = reinterpret_cast<const uint8_t *>(__MediaKernels_manifest_nvl);
123+
manifest.m_size = __MediaKernels_manifest_nvl_size;
124+
#endif
125+
return MOS_STATUS_SUCCESS;
126+
}
127+
128+
HucKernelSourceXe3P_Lpm_Base &HucKernelSourceXe3P_Lpm_Base::GetInstance()
129+
{
130+
static HucKernelSourceXe3P_Lpm_Base instance;
131+
return instance;
132+
}
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
/*
2+
* Copyright (c) 2024, Intel Corporation
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a
5+
* copy of this software and associated documentation files (the "Software"),
6+
* to deal in the Software without restriction, including without limitation
7+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
* and/or sell copies of the Software, and to permit persons to whom the
9+
* Software is furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included
12+
* in all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17+
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
18+
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19+
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20+
* OTHER DEALINGS IN THE SOFTWARE.
21+
*/
22+
//!
23+
//! \file huc_kernel_source_xe3p_lpm_base.h
24+
//! \brief Header file of the Xe3P_LPM_Base Huc kernel source management.
25+
//!
26+
#ifndef __HUC_KERNEL_SOURCE_XE3P_LPM_BASE_H__
27+
#define __HUC_KERNEL_SOURCE_XE3P_LPM_BASE_H__
28+
29+
#include "huc_kernel_source.h"
30+
31+
class HucKernelSourceXe3P_Lpm_Base : public HucKernelSource
32+
{
33+
public:
34+
35+
//!
36+
//! \brief Copy constructor
37+
//!
38+
HucKernelSourceXe3P_Lpm_Base(const HucKernelSourceXe3P_Lpm_Base &) = delete;
39+
40+
//!
41+
//! \brief Copy assignment operator
42+
//!
43+
HucKernelSourceXe3P_Lpm_Base &operator=(const HucKernelSourceXe3P_Lpm_Base &) = delete;
44+
45+
//!
46+
//! \brief Destructor
47+
//!
48+
virtual ~HucKernelSourceXe3P_Lpm_Base() {}
49+
50+
//!
51+
//! \brief Return manifest for Huc kernels
52+
//! \param [out] manifest
53+
//! Manifest for Huc kernels in order
54+
//! \return MOS_STATUS
55+
//! MOS_STATUS_SUCCESS if success, else fail reason
56+
//!
57+
virtual MOS_STATUS GetManifest(HucManifest &manifest) override;
58+
59+
static HucKernelSourceXe3P_Lpm_Base &GetInstance();
60+
61+
private:
62+
//!
63+
//! \brief Constructor
64+
//!
65+
HucKernelSourceXe3P_Lpm_Base(): HucKernelSource() {}
66+
67+
virtual const BinaryTable &GetBinTable() override { return m_binTable; }
68+
virtual const HashIdxTable &GetHashIdxTable() override { return m_hashIdxTable; }
69+
70+
private:
71+
// Binary map table (kernel id, binay data point)
72+
static const BinaryTable m_binTable;
73+
74+
// Hash index table (kernel id, hash index)
75+
static const HashIdxTable m_hashIdxTable;
76+
77+
MEDIA_CLASS_DEFINE_END(HucKernelSourceXe3P_Lpm_Base)
78+
};
79+
80+
#endif // __HUC_KERNEL_SOURCE_XE3P_LPM_BASE_H__
81+
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Copyright (c) 2026, Intel Corporation
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a
4+
# copy of this software and associated documentation files (the "Software"),
5+
# to deal in the Software without restriction, including without limitation
6+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
7+
# and/or sell copies of the Software, and to permit persons to whom the
8+
# Software is furnished to do so, subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included
11+
# in all copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
14+
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16+
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
17+
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
18+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
19+
# OTHER DEALINGS IN THE SOFTWARE.
20+
21+
set(TMP_HUC_SOURCES_
22+
${CMAKE_CURRENT_LIST_DIR}/nvlMediaKernels.cpp
23+
)
24+
25+
set(TMP_HUC_HEADERS_
26+
${CMAKE_CURRENT_LIST_DIR}/nvlMediaKernels.h
27+
)
28+
29+
set(TMP_HUC_BIN_HEADERS_
30+
${CMAKE_CURRENT_LIST_DIR}/nvlMediaKernel_av1ba.h
31+
${CMAKE_CURRENT_LIST_DIR}/nvlMediaKernel_av1brc_init.h
32+
${CMAKE_CURRENT_LIST_DIR}/nvlMediaKernel_av1brc_update.h
33+
${CMAKE_CURRENT_LIST_DIR}/nvlMediaKernel_av1slbb_update.h
34+
${CMAKE_CURRENT_LIST_DIR}/nvlMediaKernel_avcslbb_update.h
35+
${CMAKE_CURRENT_LIST_DIR}/nvlMediaKernel_hevcslbb_update.h
36+
${CMAKE_CURRENT_LIST_DIR}/nvlMediaKernel_avcbrc_init.h
37+
${CMAKE_CURRENT_LIST_DIR}/nvlMediaKernel_avcbrc_update.h
38+
${CMAKE_CURRENT_LIST_DIR}/nvlMediaKernel_copykrn.h
39+
${CMAKE_CURRENT_LIST_DIR}/nvlMediaKernel_hevcbrc_init.h
40+
${CMAKE_CURRENT_LIST_DIR}/nvlMediaKernel_s2l.h
41+
${CMAKE_CURRENT_LIST_DIR}/nvlMediaKernel_hevcbrc_update.h
42+
${CMAKE_CURRENT_LIST_DIR}/nvlMediaKernel_lookahead.h
43+
${CMAKE_CURRENT_LIST_DIR}/nvlMediaKernel_pakint.h
44+
${CMAKE_CURRENT_LIST_DIR}/nvlMediaKernel_vp9brc_init.h
45+
${CMAKE_CURRENT_LIST_DIR}/nvlMediaKernel_vp9brc_update.h
46+
${CMAKE_CURRENT_LIST_DIR}/nvlMediaKernel_vp9dec.h
47+
${CMAKE_CURRENT_LIST_DIR}/nvlMediaKernel_vp9hpu.h
48+
${CMAKE_CURRENT_LIST_DIR}/nvlMediaKernel_vvcs2l.h
49+
)
50+
51+
set(SOFTLET_CODEC_COMMON_SOURCES_
52+
${SOFTLET_CODEC_COMMON_SOURCES_}
53+
${TMP_HUC_SOURCES_}
54+
)
55+
56+
set(SOFTLET_CODEC_COMMON_HEADERS_
57+
${SOFTLET_CODEC_COMMON_HEADERS_}
58+
${TMP_HUC_HEADERS_}
59+
)
60+
61+
set(MEDIA_BIN_SOURCES_
62+
${MEDIA_BIN_SOURCES_}
63+
${TMP_HUC_SOURCES_}
64+
)
65+
66+
set(MEDIA_BIN_HEADERS_
67+
${MEDIA_BIN_HEADERS_}
68+
${TMP_HUC_HEADERS_}
69+
${TMP_HUC_BIN_HEADERS_}
70+
)
71+
72+
source_group( "Kernel\\CodecKernel" FILES ${TMP_HUC_SOURCES_} ${TMP_HUC_HEADERS_} ${TMP_HUC_BIN_HEADERS_} )
73+
set(TMP_HUC_SOURCES_ "")
74+
set(TMP_HUC_HEADERS_ "")
75+
set(TMP_HUC_BIN_HEADERS_ "")
76+
77+
set(SOFTLET_CODEC_COMMON_PRIVATE_INCLUDE_DIRS_
78+
${SOFTLET_CODEC_COMMON_PRIVATE_INCLUDE_DIRS_}
79+
${CMAKE_CURRENT_LIST_DIR}
80+
)
81+
82+
set(MEDIA_BIN_INCLUDE_DIR
83+
${MEDIA_BIN_INCLUDE_DIR}
84+
${CMAKE_CURRENT_LIST_DIR}
85+
)

0 commit comments

Comments
 (0)