1 /*
2 * Copyright (c) 2021, 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_avc_user_setting.cpp
24 //! \brief Initialize user setting of AVC
25 //!
26
27 #include "encode_avc_vdenc_pipeline.h"
28
29 namespace encode
30 {
InitUserSetting(MediaUserSettingSharedPtr userSettingPtr)31 MOS_STATUS AvcVdencPipeline::InitUserSetting(MediaUserSettingSharedPtr userSettingPtr)
32 {
33 ENCODE_FUNC_CALL();
34
35 ENCODE_CHK_STATUS_RETURN(EncodePipeline::InitUserSetting(userSettingPtr));
36
37 DeclareUserSettingKey(
38 userSettingPtr,
39 "Encode Suppress Recon Pic",
40 MediaUserSetting::Group::Sequence,
41 int32_t(1),
42 false);
43
44 DeclareUserSettingKey(
45 userSettingPtr,
46 "AVC Encode Adaptive Rounding Inter Enable",
47 MediaUserSetting::Group::Sequence,
48 int32_t(1),
49 false);
50
51 DeclareUserSettingKey(
52 userSettingPtr,
53 "AVC Encode MB BRC",
54 MediaUserSetting::Group::Sequence,
55 int32_t(255),
56 false);
57
58 DeclareUserSettingKey(
59 userSettingPtr,
60 "VDEnc Single Pass Enable",
61 MediaUserSetting::Group::Sequence,
62 uint32_t(0),
63 false);
64
65 DeclareUserSettingKey(
66 userSettingPtr,
67 "Codec MMC In Use",
68 MediaUserSetting::Group::Frame,
69 int32_t(0),
70 true);
71
72 DeclareUserSettingKey(
73 userSettingPtr,
74 "AVC Encode Mode",
75 MediaUserSetting::Group::Sequence,
76 int32_t(0),
77 true);
78
79 #if (_DEBUG || _RELEASE_INTERNAL)
80 DeclareUserSettingKeyForDebug(
81 userSettingPtr,
82 "Encode TU Override",
83 MediaUserSetting::Group::Sequence,
84 uint32_t(0),
85 false);
86
87 DeclareUserSettingKeyForDebug(
88 userSettingPtr,
89 "AVC VDEnc PerMB StreamOut Enable",
90 MediaUserSetting::Group::Sequence,
91 int32_t(0),
92 false);
93
94 DeclareUserSettingKeyForDebug(
95 userSettingPtr,
96 "AVC VDEnc TCBRC ARB Disable",
97 MediaUserSetting::Group::Sequence,
98 int32_t(0),
99 false);
100
101 DeclareUserSettingKeyForDebug(
102 userSettingPtr,
103 "VDENC In Use",
104 MediaUserSetting::Group::Frame,
105 int32_t(0),
106 true);
107
108 DeclareUserSettingKeyForDebug(
109 userSettingPtr,
110 "Enable Encode VE CtxBasedScheduling",
111 MediaUserSetting::Group::Frame,
112 false,
113 true);
114
115 DeclareUserSettingKeyForDebug(
116 userSettingPtr,
117 "Lpla TargetBufferFulness Data Address",
118 MediaUserSetting::Group::Sequence,
119 "",
120 false);
121
122 DeclareUserSettingKeyForDebug(
123 userSettingPtr,
124 "DisableInputSurfaceCopy",
125 MediaUserSetting::Group::Sequence,
126 false,
127 false);
128 #endif
129 return MOS_STATUS_SUCCESS;
130 }
131
132 } // namespace encode
133