1 /*
2 * Copyright (c) 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     decode_user_setting.cpp
24 //! \brief    Initialize user setting of decode
25 //!
26 
27 #include "decode_pipeline.h"
28 
29 namespace decode
30 {
InitUserSetting(MediaUserSettingSharedPtr userSettingPtr)31 MOS_STATUS DecodePipeline::InitUserSetting(MediaUserSettingSharedPtr userSettingPtr)
32 {
33     DECODE_FUNC_CALL();
34     DECODE_CHK_STATUS(MediaPipeline::InitUserSetting(userSettingPtr));
35     DeclareUserSettingKey(
36         userSettingPtr,
37         "Enable Decode MMC",
38         MediaUserSetting::Group::Sequence,
39         int32_t(0),
40         false);
41     DeclareUserSettingKey(
42         userSettingPtr,
43         "DisableAv1BtdlRowstoreCache",
44         MediaUserSetting::Group::Sequence,
45         int32_t(1),
46         false);
47     DeclareUserSettingKey(
48         userSettingPtr,
49         "DisableAv1SmvlRowstoreCache",
50         MediaUserSetting::Group::Sequence,
51         int32_t(0),
52         false);
53     DeclareUserSettingKey(
54         userSettingPtr,
55         "DisableAv1IpdlRowstoreCache",
56         MediaUserSetting::Group::Sequence,
57         int32_t(0),
58         false);
59     DeclareUserSettingKey(
60         userSettingPtr,
61         "DisableAv1DflyRowstoreCache",
62         MediaUserSetting::Group::Sequence,
63         int32_t(0),
64         false);
65     DeclareUserSettingKey(
66         userSettingPtr,
67         "DisableAv1DfluRowstoreCache",
68         MediaUserSetting::Group::Sequence,
69         int32_t(0),
70         false);
71     DeclareUserSettingKey(
72         userSettingPtr,
73         "DisableAv1DflvRowstoreCache",
74         MediaUserSetting::Group::Sequence,
75         int32_t(0),
76         false);
77     DeclareUserSettingKey(
78         userSettingPtr,
79         "DisableAv1CdefRowstoreCache",
80         MediaUserSetting::Group::Sequence,
81         int32_t(0),
82         false);
83     DeclareUserSettingKey(
84         userSettingPtr,
85         "Decode Histogram Debug",
86         MediaUserSetting::Group::Sequence,
87         int32_t(0),
88         false);
89     DeclareUserSettingKey(
90         userSettingPtr,
91         "Decode MMC In Use",
92         MediaUserSetting::Group::Sequence,
93         int32_t(0),
94         true);
95     DeclareUserSettingKey(
96         userSettingPtr,
97         "Decode Extended MMC In Use",
98         MediaUserSetting::Group::Sequence,
99         int32_t(0),
100         true);
101     DeclareUserSettingKey(
102         userSettingPtr,
103         "Decode RT Compressible",
104         MediaUserSetting::Group::Sequence,
105         int32_t(0),
106         true);
107     DeclareUserSettingKey(
108         userSettingPtr,
109         "Decode RT Compress Mode",
110         MediaUserSetting::Group::Sequence,
111         int32_t(0),
112         true);
113     DeclareUserSettingKey(
114         userSettingPtr,
115         "Num of Codec Devices on VDBOX1",
116         MediaUserSetting::Group::Sequence,
117         int32_t(0),
118         true);
119     DeclareUserSettingKey(
120         userSettingPtr,
121         "Num of Codec Devices on VDBOX2",
122         MediaUserSetting::Group::Sequence,
123         int32_t(0),
124         true);
125     DeclareUserSettingKey(
126         userSettingPtr,
127         "Media Reset Count",
128         MediaUserSetting::Group::Sequence,
129         int32_t(0),
130         true);
131     DeclareUserSettingKey(
132         userSettingPtr,
133         "VC1 Decode Mode",
134         MediaUserSetting::Group::Sequence,
135         int32_t(0),
136         true);
137     DeclareUserSettingKey(
138         userSettingPtr,
139         "AV1 Decode Mode",
140         MediaUserSetting::Group::Sequence,
141         int32_t(0),
142         true);
143     DeclareUserSettingKey(
144         userSettingPtr,
145         "Decode Single Task Phase Enable",
146         MediaUserSetting::Group::Sequence,
147         int32_t(1),
148         false);
149     DeclareUserSettingKey(
150         userSettingPtr,
151         "Decode RT Compressible",
152         MediaUserSetting::Group::Sequence,
153         int32_t(0),
154         false);
155     DeclareUserSettingKey(
156         userSettingPtr,
157         "Decode RT Compress Mode",
158         MediaUserSetting::Group::Sequence,
159         int32_t(0),
160         false);
161     DeclareUserSettingKey(
162         userSettingPtr,
163         "VT Decoded Count",
164         MediaUserSetting::Group::Sequence,
165         int32_t(0),
166         true);
167     DeclareUserSettingKey(
168         userSettingPtr,
169         "Av1 Error Status Addr Value",
170         MediaUserSetting::Group::Sequence,
171         uint32_t(0),
172         true);
173 #if (_DEBUG || _RELEASE_INTERNAL)
174     DeclareUserSettingKeyForDebug(
175         userSettingPtr,
176         "Disable Decode Lock",
177         MediaUserSetting::Group::Sequence,
178         int32_t(0),
179         false);
180 
181     DeclareUserSettingKeyForDebug(
182         userSettingPtr,
183         "DisableMprRowStoreCache",
184         MediaUserSetting::Group::Sequence,
185         int32_t(0),
186         false);
187     DeclareUserSettingKeyForDebug(
188         userSettingPtr,
189         "Stream Out",
190         MediaUserSetting::Group::Sequence,
191         int32_t(0),
192         false);
193     DeclareUserSettingKeyForDebug(
194         userSettingPtr,
195         "Decompress Decode Output",
196         MediaUserSetting::Group::Sequence,
197         int32_t(0),
198         false);
199     DeclareUserSettingKeyForDebug(
200         userSettingPtr,
201         "Decompress Decode Sfc Output",
202         MediaUserSetting::Group::Sequence,
203         int32_t(0),
204         false);
205     DeclareUserSettingKeyForDebug(
206         userSettingPtr,
207         "Status Reporting",
208         MediaUserSetting::Group::Sequence,
209         int32_t(1),
210         false);
211     DeclareUserSettingKeyForDebug(
212         userSettingPtr,
213         "Watchdog Timer Threshold",
214         MediaUserSetting::Group::Sequence,
215         int32_t(120),
216         false);
217     DeclareUserSettingKeyForDebug(
218         userSettingPtr,
219         "Used VDBOX ID",
220         MediaUserSetting::Group::Sequence,
221         int32_t(0),
222         true);
223     DeclareUserSettingKeyForDebug(
224         userSettingPtr,
225         "Delay Miliseconds",
226         MediaUserSetting::Group::Sequence,
227         int32_t(0),
228         true);
229     DeclareUserSettingKeyForDebug(
230         userSettingPtr,
231         "Decode SFC RGB Format Output",
232         MediaUserSetting::Group::Sequence,
233         int32_t(0),
234         false);
235     DeclareUserSettingKeyForDebug(
236         userSettingPtr,
237         "Decode SFC Linear Output Debug",
238         MediaUserSetting::Group::Sequence,
239         int32_t(0),
240         false);
241     DeclareUserSettingKeyForDebug(
242         userSettingPtr,
243         "Force Av1 Tile Based Decode",
244         MediaUserSetting::Group::Sequence,
245         int32_t(0),
246         false);
247     DeclareUserSettingKeyForDebug(
248         userSettingPtr,
249         "Enable AVP Scalability Decode",
250         MediaUserSetting::Group::Sequence,
251         int32_t(120),
252         false);
253     DeclareUserSettingKeyForDebug(
254         userSettingPtr,
255         "ApogeiosAv1dEnable",
256         MediaUserSetting::Group::Sequence,
257         int32_t(1),
258         true);
259     DeclareUserSettingKeyForDebug(
260         userSettingPtr,
261         "CRCDebugModeEnable",
262         MediaUserSetting::Group::Sequence,
263         int32_t(0),
264         true);
265 #endif
266     return MOS_STATUS_SUCCESS;
267 }
268 
269 }  // namespace decode