1 /*
2 * Copyright (c) 2021-2023, 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_av1_user_setting.cpp
24 //! \brief Initialize user setting of AV1
25 //!
26
27 #include "encode_av1_pipeline.h"
28
29 namespace encode
30 {
InitUserSetting(MediaUserSettingSharedPtr userSettingPtr)31 MOS_STATUS Av1Pipeline::InitUserSetting(MediaUserSettingSharedPtr userSettingPtr)
32 {
33 ENCODE_FUNC_CALL();
34 ENCODE_CHK_STATUS_RETURN(EncodePipeline::InitUserSetting(userSettingPtr));
35
36 #if (_DEBUG || _RELEASE_INTERNAL)
37 DeclareUserSettingKeyForDebug(
38 userSettingPtr,
39 "AV1 Enable SW Back Annotation",
40 MediaUserSetting::Group::Sequence,
41 (int32_t)1,
42 false);
43 DeclareUserSettingKeyForDebug(
44 userSettingPtr,
45 "AV1 Enable SW Stitching",
46 MediaUserSetting::Group::Sequence,
47 (int32_t)0,
48 false);
49 DeclareUserSettingKeyForDebug(
50 userSettingPtr,
51 "AV1 Use Ext Costs",
52 MediaUserSetting::Group::Sequence,
53 uint32_t(0),
54 false);
55 DeclareUserSettingKeyForDebug(
56 userSettingPtr,
57 "AV1 Ext Costs File",
58 MediaUserSetting::Group::Sequence,
59 "",
60 false);
61 DeclareUserSettingKeyForDebug(
62 userSettingPtr,
63 "Encode Enable NonDefault Mapping",
64 MediaUserSetting::Group::Sequence,
65 (int32_t)0,
66 false);
67 DeclareUserSettingKeyForDebug(
68 userSettingPtr,
69 "AV1 Encode RDO Enable",
70 MediaUserSetting::Group::Sequence,
71 (int32_t)0,
72 false);
73 DeclareUserSettingKeyForDebug(
74 userSettingPtr,
75 "AV1 Encode Adaptive Rounding Enable",
76 MediaUserSetting::Group::Sequence,
77 (int32_t)0,
78 false);
79 DeclareUserSettingKeyForDebug(
80 userSettingPtr,
81 "AV1 Rho Domain Enable",
82 MediaUserSetting::Group::Sequence,
83 (int32_t)0,
84 false);
85 DeclareUserSettingKeyForDebug(
86 userSettingPtr,
87 "AV1 Dual Encoder Force Off",
88 MediaUserSetting::Group::Sequence,
89 (int32_t)0,
90 false);
91 #endif
92 DeclareUserSettingKey(
93 userSettingPtr,
94 "AV1 Encode Mode",
95 MediaUserSetting::Group::Sequence,
96 int32_t(0),
97 true);
98 DeclareUserSettingKey(
99 userSettingPtr,
100 "AV1 Post CDEF Recon Compressible",
101 MediaUserSetting::Group::Sequence,
102 (int32_t)0,
103 true);
104 DeclareUserSettingKey(
105 userSettingPtr,
106 "AV1 Post CDEF Recon Compress Mode",
107 MediaUserSetting::Group::Sequence,
108 (int32_t)0,
109 true);
110
111 return MOS_STATUS_SUCCESS;
112 }
113 } // namespace encode