| 1 | /* |
| 2 | * Copyright (c) 2017, 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 mhw_sfc_hwcmd_g9_X.cpp |
| 24 | //! \brief Auto-generated definitions for MHW commands and states. |
| 25 | //! |
| 26 | |
| 27 | #include "mhw_sfc_hwcmd_g9_X.h" |
| 28 | #include "mos_utilities.h" |
| 29 | |
| 30 | mhw_sfc_g9_X::SFC_AVS_STATE_CMD::SFC_AVS_STATE_CMD() |
| 31 | { |
| 32 | DW0.Value = 0; |
| 33 | DW0.DwordLength = GetOpLength(dwSize); |
| 34 | DW0.Subopcodeb = SUBOPCODEB_SFCAVSSTATE; |
| 35 | DW0.Subopcodea = SUBOPCODEA_COMMON; |
| 36 | DW0.MediaCommandOpcode = MEDIA_COMMAND_OPCODE_MEDIAMISC; |
| 37 | DW0.Pipeline = PIPELINE_MEDIA; |
| 38 | DW0.CommandType = COMMAND_TYPE_PARALLELVIDEOPIPE; |
| 39 | |
| 40 | DW1.Value = 0; |
| 41 | DW1.SharpnessLevel = SHARPNESS_LEVEL_UNNAMED0; |
| 42 | |
| 43 | DW2.Value = 0; |
| 44 | |
| 45 | } |
| 46 | |
| 47 | mhw_sfc_g9_X::SFC_IEF_STATE_CMD::SFC_IEF_STATE_CMD() |
| 48 | { |
| 49 | DW0.Value = 0; |
| 50 | DW0.DwordLength = GetOpLength(dwSize); |
| 51 | DW0.Subopcodeb = SUBOPCODEB_SFCIEFSTATE; |
| 52 | DW0.Subopcodea = SUBOPCODEA_COMMON; |
| 53 | DW0.MediaCommandOpcode = MEDIA_COMMAND_OPCODE_MEDIAMISC; |
| 54 | DW0.Pipeline = PIPELINE_MEDIA; |
| 55 | DW0.CommandType = COMMAND_TYPE_PARALLELVIDEOPIPE; |
| 56 | |
| 57 | DW1.Value = 0; |
| 58 | DW1.GainFactor = GAIN_FACTOR_UNNAMED_4_4; |
| 59 | DW1.WeakEdgeThreshold = WEAK_EDGE_THRESHOLD_UNNAMED1; |
| 60 | DW1.StrongEdgeThreshold = STRONG_EDGE_THRESHOLD_UNNAMED8; |
| 61 | DW1.R3XCoefficient = R3X_COEFFICIENT_UNNAMED5; |
| 62 | DW1.R3CCoefficient = R3C_COEFFICIENT_UNNAMED5; |
| 63 | |
| 64 | DW2.Value = 0; |
| 65 | DW2.GlobalNoiseEstimation = GLOBAL_NOISE_ESTIMATION_UNNAMED255; |
| 66 | DW2.NonEdgeWeight = NON_EDGE_WEIGHT_UNNAMED1; |
| 67 | DW2.RegularWeight = REGULAR_WEIGHT_UNNAMED2; |
| 68 | DW2.StrongEdgeWeight = STRONG_EDGE_WEIGHT_UNNAMED7; |
| 69 | DW2.R5XCoefficient = R5X_COEFFICIENT_UNNAMED7; |
| 70 | DW2.R5CxCoefficient = R5CX_COEFFICIENT_UNNAMED7; |
| 71 | DW2.R5CCoefficient = R5C_COEFFICIENT_UNNAMED7; |
| 72 | |
| 73 | DW3.Value = 0; |
| 74 | DW3.SatMax = SAT_MAX_UNNAMED31; |
| 75 | DW3.HueMax = HUE_MAX_UNNAMED1_4; |
| 76 | |
| 77 | DW4.Value = 0; |
| 78 | DW4.DiamondMargin = DIAMOND_MARGIN_UNNAMED_4; |
| 79 | DW4.UMid = U_MID_UNNAMED110; |
| 80 | DW4.VMid = V_MID_UNNAMED15_4; |
| 81 | |
| 82 | DW5.Value = 0; |
| 83 | DW5.DiamondDv = DIAMOND_DV_UNNAMED0; |
| 84 | DW5.DiamondTh = DIAMOND_TH_UNNAMED35; |
| 85 | DW5.HsMargin = HS_MARGIN_UNNAMED3; |
| 86 | DW5.DiamondDu = DIAMOND_DU_UNNAMED0; |
| 87 | DW5.SkinDetailFactor = SKIN_DETAIL_FACTOR_DETAILREVEALED; |
| 88 | |
| 89 | DW6.Value = 0; |
| 90 | DW6.YPoint1 = Y_POINT_1_UNNAMED_46; |
| 91 | DW6.YPoint2 = Y_POINT_2_UNNAMED_47; |
| 92 | DW6.YPoint3 = Y_POINT_3_UNNAMED25_4; |
| 93 | DW6.YPoint4 = Y_POINT_4_UNNAMED255; |
| 94 | |
| 95 | DW7.Value = 0; |
| 96 | |
| 97 | DW8.Value = 0; |
| 98 | DW8.P0L = P0L_UNNAMED_46; |
| 99 | DW8.P1L = P1L_UNNAMED216; |
| 100 | |
| 101 | DW9.Value = 0; |
| 102 | DW9.P2L = P2L_UNNAMED236; |
| 103 | DW9.P3L = P3L_UNNAMED236; |
| 104 | DW9.B0L = B0L_UNNAMED133; |
| 105 | DW9.B1L = B1L_UNNAMED130; |
| 106 | |
| 107 | DW10.Value = 0; |
| 108 | DW10.B2L = B2L_UNNAMED130; |
| 109 | DW10.B3L = B3L_UNNAMED130; |
| 110 | |
| 111 | DW11.Value = 0; |
| 112 | |
| 113 | DW12.Value = 0; |
| 114 | DW12.P0U = P0U_UNNAMED_46; |
| 115 | DW12.P1U = P1U_UNNAMED66; |
| 116 | |
| 117 | DW13.Value = 0; |
| 118 | DW13.P2U = P2U_UNNAMED150; |
| 119 | DW13.P3U = P3U_UNNAMED236; |
| 120 | DW13.B0U = B0U_UNNAMED1_43; |
| 121 | DW13.B1U = B1U_UNNAMED163; |
| 122 | |
| 123 | DW14.Value = 0; |
| 124 | DW14.B2U = B2U_UNNAMED200; |
| 125 | DW14.B3U = B3U_UNNAMED1_40; |
| 126 | |
| 127 | DW15.Value = 0; |
| 128 | |
| 129 | DW16.Value = 0; |
| 130 | DW16.C0 = C0_UNNAMED102_4; |
| 131 | DW16.C1 = C1_UNNAMED0; |
| 132 | |
| 133 | DW17.Value = 0; |
| 134 | DW17.C2 = C2_UNNAMED0; |
| 135 | DW17.C3 = C3_UNNAMED0; |
| 136 | |
| 137 | DW18.Value = 0; |
| 138 | DW18.C4 = C4_UNNAMED102_4; |
| 139 | DW18.C5 = C5_UNNAMED0; |
| 140 | |
| 141 | DW19.Value = 0; |
| 142 | DW19.C6 = C6_UNNAMED0; |
| 143 | DW19.C7 = C7_UNNAMED0; |
| 144 | |
| 145 | DW20.Value = 0; |
| 146 | DW20.C8 = C8_UNNAMED102_4; |
| 147 | |
| 148 | DW21.Value = 0; |
| 149 | DW21.OffsetIn1 = OFFSET_IN_1_UNNAMED0; |
| 150 | DW21.OffsetOut1 = OFFSET_OUT_1_UNNAMED0; |
| 151 | |
| 152 | DW22.Value = 0; |
| 153 | DW22.OffsetIn2 = OFFSET_IN_2_UNNAMED0; |
| 154 | DW22.OffsetOut2 = OFFSET_OUT_2_UNNAMED0; |
| 155 | |
| 156 | DW23.Value = 0; |
| 157 | DW23.OffsetIn3 = OFFSET_IN_3_UNNAMED0; |
| 158 | DW23.OffsetOut3 = OFFSET_OUT_3_UNNAMED0; |
| 159 | |
| 160 | } |
| 161 | |
| 162 | mhw_sfc_g9_X::SFC_FRAME_START_CMD::SFC_FRAME_START_CMD() |
| 163 | { |
| 164 | DW0.Value = 0; |
| 165 | DW0.DwordLength = GetOpLength(dwSize); |
| 166 | DW0.Subopcodeb = SUBOPCODEB_SFCFRAMESTART; |
| 167 | DW0.Subopcodea = SUBOPCODEA_COMMON; |
| 168 | DW0.MediaCommandOpcode = MEDIA_COMMAND_OPCODE_MEDIAMISC; |
| 169 | DW0.Pipeline = PIPELINE_MEDIA; |
| 170 | DW0.CommandType = COMMAND_TYPE_PARALLELVIDEOPIPE; |
| 171 | |
| 172 | DW1.Value = 0; |
| 173 | |
| 174 | } |
| 175 | |
| 176 | mhw_sfc_g9_X::SFC_LOCK_CMD::SFC_LOCK_CMD() |
| 177 | { |
| 178 | DW0.Value = 0; |
| 179 | DW0.DwordLength = GetOpLength(dwSize); |
| 180 | DW0.Subopcodeb = SUBOPCODEB_SFCLOCK; |
| 181 | DW0.Subopcodea = SUBOPCODEA_COMMON; |
| 182 | DW0.MediaCommandOpcode = MEDIA_COMMAND_OPCODE_MEDIAMISC; |
| 183 | DW0.Pipeline = PIPELINE_MEDIA; |
| 184 | DW0.CommandType = COMMAND_TYPE_PARALLELVIDEOPIPE; |
| 185 | |
| 186 | DW1.Value = 0; |
| 187 | |
| 188 | } |
| 189 | |
| 190 | mhw_sfc_g9_X::SFC_STATE_CMD::SFC_STATE_CMD() |
| 191 | { |
| 192 | DW0.Value = 0; |
| 193 | DW0.DwordLength = GetOpLength(dwSize); |
| 194 | DW0.Subopcodeb = SUBOPCODEB_SFCSTATE; |
| 195 | DW0.Subopcodea = SUBOPCODEA_COMMON; |
| 196 | DW0.MediaCommandOpcode = MEDIA_COMMAND_OPCODE_MEDIAMISC; |
| 197 | DW0.Pipeline = PIPELINE_MEDIA; |
| 198 | DW0.CommandType = COMMAND_TYPE_PARALLELVIDEOPIPE; |
| 199 | |
| 200 | DW1.Value = 0; |
| 201 | DW1.SfcPipeMode = SFC_PIPE_MODE_UNNAMED0; |
| 202 | DW1.SfcInputChromaSubSampling = SFC_INPUT_CHROMA_SUB_SAMPLING_400; |
| 203 | DW1.VdVeInputOrderingMode = VDVE_INPUT_ORDERING_MODE_UNNAMED0; |
| 204 | |
| 205 | DW2.Value = 0; |
| 206 | |
| 207 | DW3.Value = 0; |
| 208 | DW3.OutputSurfaceFormatType = OUTPUT_SURFACE_FORMAT_TYPE_AYUV; |
| 209 | DW3.RgbaChannelSwapEnable = RGBA_CHANNEL_SWAP_ENABLE_UNNAMED0; |
| 210 | |
| 211 | DW4.Value = 0; |
| 212 | DW4.IefEnable = IEF_ENABLE_DISABLE; |
| 213 | DW4.Ief4SmoothEnable = IEF4SMOOTH_ENABLE_UNNAMED0; |
| 214 | DW4.AvsFilterMode = AVS_FILTER_MODE_5X5POLY_PHASEFILTERBILINEAR_ADAPTIVE; |
| 215 | DW4.AdaptiveFilterForAllChannels = ADAPTIVE_FILTER_FOR_ALL_CHANNELS_DISABLEADAPTIVEFILTERONUVRBCHANNELS; |
| 216 | DW4.AvsScalingEnable = AVS_SCALING_ENABLE_DISABLE; |
| 217 | DW4.BypassYAdaptiveFiltering = BYPASS_Y_ADAPTIVE_FILTERING_ENABLEYADAPTIVEFILTERING; |
| 218 | DW4.BypassXAdaptiveFiltering = BYPASS_X_ADAPTIVE_FILTERING_ENABLEXADAPTIVEFILTERING; |
| 219 | DW4.RotationMode = ROTATION_MODE_0_DEGREES; |
| 220 | |
| 221 | DW5.Value = 0; |
| 222 | |
| 223 | DW6.Value = 0; |
| 224 | |
| 225 | DW7.Value = 0; |
| 226 | |
| 227 | DW8.Value = 0; |
| 228 | |
| 229 | DW9.Value = 0; |
| 230 | |
| 231 | DW10.Value = 0; |
| 232 | |
| 233 | DW11.Value = 0; |
| 234 | |
| 235 | DW12.Value = 0; |
| 236 | |
| 237 | DW13.Value = 0; |
| 238 | |
| 239 | DW14.Value = 0; |
| 240 | DW14.ScalingFactorHeight = SCALING_FACTOR_HEIGHT_UNNAMED0; |
| 241 | |
| 242 | DW15.Value = 0; |
| 243 | DW15.ScalingFactorWidth = SCALING_FACTOR_WIDTH_UNNAMED0; |
| 244 | |
| 245 | DW16.Value = 0; |
| 246 | |
| 247 | DW17.Value = 0; |
| 248 | |
| 249 | DW18.Value = 0; |
| 250 | |
| 251 | DW19.Value = 0; |
| 252 | DW19.OutputFrameSurfaceBaseAddressMemoryCompressionMode = OUTPUT_FRAME_SURFACE_BASE_ADDRESS_MEMORY_COMPRESSION_MODE_VERTICALCOMPRESSION; |
| 253 | DW19.OutputFrameSurfaceBaseAddressRowStoreScratchBufferCacheSelect = OUTPUT_FRAME_SURFACE_BASE_ADDRESS_ROW_STORE_SCRATCH_BUFFER_CACHE_SELECT_DISABLE; |
| 254 | DW19.OutputSurfaceTiledMode = OUTPUT_SURFACE_TILED_MODE_TRMODENONE; |
| 255 | |
| 256 | DW20.Value = 0; |
| 257 | |
| 258 | DW21.Value = 0; |
| 259 | |
| 260 | DW22.Value = 0; |
| 261 | DW22.AvsLineBufferBaseAddressMemoryCompressionEnable = AVS_LINE_BUFFER_BASE_ADDRESS_MEMORY_COMPRESSION_ENABLE_DISABLE; |
| 262 | DW22.AvsLineBufferBaseAddressMemoryCompressionMode = AVS_LINE_BUFFER_BASE_ADDRESS_MEMORY_COMPRESSION_MODE_HORIZONTALCOMPRESSIONMODE; |
| 263 | DW22.AvsLineBufferBaseAddressRowStoreScratchBufferCacheSelect = AVS_LINE_BUFFER_BASE_ADDRESS_ROW_STORE_SCRATCH_BUFFER_CACHE_SELECT_LLC; |
| 264 | DW22.AvsLineBufferTiledMode = AVS_LINE_BUFFER_TILED_MODE_TRMODENONE; |
| 265 | |
| 266 | DW23.Value = 0; |
| 267 | |
| 268 | DW24.Value = 0; |
| 269 | |
| 270 | DW25.Value = 0; |
| 271 | DW25.IefLineBufferBaseAddressMemoryCompressionEnable = IEF_LINE_BUFFER_BASE_ADDRESS_MEMORY_COMPRESSION_ENABLE_DISABLE; |
| 272 | DW25.IefLineBufferBaseAddressMemoryCompressionMode = IEF_LINE_BUFFER_BASE_ADDRESS_MEMORY_COMPRESSION_MODE_UNNAMED0; |
| 273 | DW25.IefLineBufferBaseAddressRowStoreScratchBufferCacheSelect = IEF_LINE_BUFFER_BASE_ADDRESS_ROW_STORE_SCRATCH_BUFFER_CACHE_SELECT_LLC; |
| 274 | DW25.IefLineBufferTiledMode = IEF_LINE_BUFFER_TILED_MODE_TRMODENONE; |
| 275 | |
| 276 | DW26.Value = 0; |
| 277 | |
| 278 | DW27.Value = 0; |
| 279 | |
| 280 | DW28.Value = 0; |
| 281 | |
| 282 | DW29.Value = 0; |
| 283 | DW29.OutputSurfaceTileWalk = OUTPUT_SURFACE_TILE_WALK_TILEWALKXMAJOR; |
| 284 | DW29.OutputSurfaceTiled = OUTPUT_SURFACE_TILED_FALSE; |
| 285 | |
| 286 | DW30.Value = 0; |
| 287 | |
| 288 | DW31.Value = 0; |
| 289 | |
| 290 | DW32.Value = 0; |
| 291 | |
| 292 | DW33.Value = 0; |
| 293 | |
| 294 | } |
| 295 | |
| 296 | mhw_sfc_g9_X::SFC_AVS_LUMA_Coeff_Table_CMD::SFC_AVS_LUMA_Coeff_Table_CMD() |
| 297 | { |
| 298 | DW0.Value = 0; |
| 299 | DW0.DwordLength = GetOpLength(dwSize); |
| 300 | DW0.Subopcodeb = SUBOPCODEB_SFCAVSLUMACOEFFTABLE; |
| 301 | DW0.Subopcodea = SUBOPCODEA_COMMON; |
| 302 | DW0.MediaCommandOpcode = MEDIA_COMMAND_OPCODE_MEDIAMISC; |
| 303 | DW0.Pipeline = PIPELINE_MEDIA; |
| 304 | DW0.CommandType = COMMAND_TYPE_PARALLELVIDEOPIPE; |
| 305 | |
| 306 | DW1.Value = 0; |
| 307 | |
| 308 | DW2.Value = 0; |
| 309 | |
| 310 | DW3.Value = 0; |
| 311 | |
| 312 | DW4.Value = 0; |
| 313 | |
| 314 | MOS_ZeroMemory(&FilterCoefficients, sizeof(FilterCoefficients)); |
| 315 | } |
| 316 | |
| 317 | mhw_sfc_g9_X::SFC_AVS_CHROMA_Coeff_Table_CMD::SFC_AVS_CHROMA_Coeff_Table_CMD() |
| 318 | { |
| 319 | DW0.Value = 0; |
| 320 | DW0.DwordLength = GetOpLength(dwSize); |
| 321 | DW0.Subopcodeb = SUBOPCODEB_SFCAVSCHROMACOEFFTABLE; |
| 322 | DW0.Subopcodea = SUBOPCODEA_COMMON; |
| 323 | DW0.MediaCommandOpcode = MEDIA_COMMAND_OPCODE_MEDIAMISC; |
| 324 | DW0.Pipeline = PIPELINE_MEDIA; |
| 325 | DW0.CommandType = COMMAND_TYPE_PARALLELVIDEOPIPE; |
| 326 | |
| 327 | DW1.Value = 0; |
| 328 | |
| 329 | DW2.Value = 0; |
| 330 | |
| 331 | MOS_ZeroMemory(&FilterCoefficients, sizeof(FilterCoefficients)); |
| 332 | } |
| 333 |