Debian Codegraph @

media_softlet/agnostic/common/codec/hal/enc/shared/pipeline/encode_user_setting.cpp

raw
1 /*
2 * Copyright (c) 2021-2022, 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 encode_user_setting.cpp
24 //! \brief Initialize user setting of encode
25 //!
26
27 #include "encode_pipeline.h"
28 namespace encode
29 {
30 MOS_STATUS EncodePipeline::InitUserSetting(MediaUserSettingSharedPtr userSettingPtr)
31 {
32 ENCODE_FUNC_CALL();
33 ENCODE_CHK_STATUS_RETURN(MediaPipeline::InitUserSetting(userSettingPtr));
34
35 DeclareUserSettingKey(
36 userSettingPtr,
37 "Set Media Encode Mode",
38 MediaUserSetting::Group::Sequence,
39 int32_t(0),
40 false);
41 DeclareUserSettingKey(
42 userSettingPtr,
43 "Set Media Encode Downscaled Ratio",
44 MediaUserSetting::Group::Sequence,
45 int32_t(0),
46 false);
47 DeclareUserSettingKey(
48 userSettingPtr,
49 "Disable Media Encode Scalability",
50 MediaUserSetting::Group::Sequence,
51 int32_t(0),
52 true);
53
54 DeclareUserSettingKey(
55 userSettingPtr,
56 "HuC Firmware Load Failed",
57 MediaUserSetting::Group::Sequence,
58 int32_t(0),
59 true);
60
61 DeclareUserSettingKey(
62 userSettingPtr,
63 "HuC Valid Imem Load Failed",
64 MediaUserSetting::Group::Sequence,
65 int32_t(0),
66 true);
67
68 DeclareUserSettingKey(
69 userSettingPtr,
70 "Encode Recon Compressible",
71 MediaUserSetting::Group::Sequence,
72 int32_t(0),
73 true);
74
75 DeclareUserSettingKey(
76 userSettingPtr,
77 "Encode Recon Compress Mode",
78 MediaUserSetting::Group::Sequence,
79 int32_t(0),
80 true);
81
82 DeclareUserSettingKey(
83 userSettingPtr,
84 "RC Panic Mode",
85 MediaUserSetting::Group::Sequence,
86 int32_t(1),
87 false);
88
89 DeclareUserSettingKey(
90 userSettingPtr,
91 "HEVC Encode Enable HW Stitch",
92 MediaUserSetting::Group::Sequence,
93 int32_t(1),
94 false);
95
96 DeclareUserSettingKey(
97 userSettingPtr,
98 "Single Task Phase Enable",
99 MediaUserSetting::Group::Sequence,
100 int32_t(1),
101 false);
102
103 DeclareUserSettingKey(
104 userSettingPtr,
105 "Enable Frame Tracking",
106 MediaUserSetting::Group::Sequence,
107 int32_t(1),
108 false);
109
110 DeclareUserSettingKey(
111 userSettingPtr,
112 "Disable Media Encode Scalability",
113 MediaUserSetting::Group::Sequence,
114 int32_t(0),
115 false);
116
117 #if (_DEBUG || _RELEASE_INTERNAL)
118 DeclareUserSettingKeyForDebug(
119 userSettingPtr,
120 "Enable Media Encode Scalability",
121 MediaUserSetting::Group::Sequence,
122 int32_t(0),
123 true);
124 DeclareUserSettingKeyForDebug(
125 userSettingPtr,
126 "Huc Status2 Value",
127 MediaUserSetting::Group::Sequence,
128 int32_t(0),
129 true);
130 DeclareUserSettingKeyForDebug(
131 userSettingPtr,
132 "Encode RateControl Method",
133 MediaUserSetting::Group::Sequence,
134 (int32_t)0,
135 true);
136 DeclareUserSettingKeyForDebug(
137 userSettingPtr,
138 "Enable Encode VE CtxBasedScheduling",
139 MediaUserSetting::Group::Sequence,
140 false,
141 true);
142 DeclareUserSettingKeyForDebug(
143 userSettingPtr,
144 "VDENC In Use",
145 MediaUserSetting::Group::Sequence,
146 (int32_t)0,
147 true);
148 DeclareUserSettingKeyForDebug(
149 userSettingPtr,
150 "Encode RateControl Method",
151 MediaUserSetting::Group::Sequence,
152 int32_t(0),
153 true);
154 DeclareUserSettingKeyForDebug(
155 userSettingPtr,
156 "Encode BRC In Use",
157 MediaUserSetting::Group::Sequence,
158 int32_t(0),
159 true);
160 DeclareUserSettingKeyForDebug(
161 userSettingPtr,
162 "BRC SW Simulation",
163 MediaUserSetting::Group::Sequence,
164 int32_t(0),
165 false);
166 DeclareUserSettingKeyForDebug(
167 userSettingPtr,
168 "BRC SW Simulation Modules Path",
169 MediaUserSetting::Group::Sequence,
170 "",
171 false);
172 DeclareUserSettingKeyForDebug(
173 userSettingPtr,
174 "SLBB SW Simulation",
175 MediaUserSetting::Group::Sequence,
176 int32_t(0),
177 false);
178 DeclareUserSettingKeyForDebug(
179 userSettingPtr,
180 "SLBB SW Simulation Modules Path",
181 MediaUserSetting::Group::Sequence,
182 "",
183 false);
184 DeclareUserSettingKey(
185 userSettingPtr,
186 "TCBRC Quality Boost Mode",
187 MediaUserSetting::Group::Sequence,
188 int32_t(3),
189 true);
190 DeclareUserSettingKeyForDebug(
191 userSettingPtr,
192 "FAST PAK ENABLE",
193 MediaUserSetting::Group::Sequence,
194 int32_t(1),
195 false);
196 DeclareUserSettingKeyForDebug(
197 userSettingPtr,
198 "Fake Header Size Enable",
199 MediaUserSetting::Group::Sequence,
200 int32_t(0),
201 false);
202 DeclareUserSettingKeyForDebug(
203 userSettingPtr,
204 "Fake IFrame Header Size",
205 MediaUserSetting::Group::Sequence,
206 int32_t(128),
207 false);
208 DeclareUserSettingKeyForDebug(
209 userSettingPtr,
210 "Fake PBFrame Header Size",
211 MediaUserSetting::Group::Sequence,
212 int32_t(16),
213 false);
214 DeclareUserSettingKeyForDebug(
215 userSettingPtr,
216 "Encode Raw Surface Tile",
217 MediaUserSetting::Group::Sequence,
218 int32_t(0),
219 true);
220 DeclareUserSettingKeyForDebug(
221 userSettingPtr,
222 "Media Encode Used VDBOX Number",
223 MediaUserSetting::Group::Sequence,
224 int32_t(1),
225 true);
226 DeclareUserSettingKeyForDebug(
227 userSettingPtr,
228 "Media Encode DDI TargetUsage",
229 MediaUserSetting::Group::Sequence,
230 int32_t(0),
231 true);
232 DeclareUserSettingKeyForDebug(
233 userSettingPtr,
234 "Adaptive TU Enable",
235 MediaUserSetting::Group::Sequence,
236 int32_t(0),
237 false);
238 #endif
239
240 #if _MEDIA_RESERVED
241 #define ENCODE_USER_SETTING_EXT
242 #include "encode_user_setting_ext.h"
243 #undef ENCODE_USER_SETTING_EXT
244 #endif
245
246 return MOS_STATUS_SUCCESS;
247 }
248 } // namespace encode