| 1 | /* |
| 2 | * Copyright (c) 2017-2020, 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 codechal_decode_vp8_g12.cpp |
| 24 | //! \brief Implements the decode interface extension for VP8. |
| 25 | //! \details Implements all functions and constants required by CodecHal for VP8 decoding. |
| 26 | //! |
| 27 | |
| 28 | #include "codechal_decoder.h" |
| 29 | #include "codechal_decode_vp8_g12.h" |
| 30 | #include "codechal_mmc_decode_vp8_g12.h" |
| 31 | #include "mhw_vdbox_mfx_g12_X.h" |
| 32 | #include "hal_oca_interface.h" |
| 33 | |
| 34 | CodechalDecodeVp8G12::~CodechalDecodeVp8G12() |
| 35 | { |
| 36 | CODECHAL_DECODE_FUNCTION_ENTER; |
| 37 | |
| 38 | if (m_veState != nullptr) |
| 39 | { |
| 40 | MOS_FreeMemAndSetNull(m_veState); |
| 41 | m_veState = nullptr; |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | MOS_STATUS CodechalDecodeVp8G12::SetFrameStates() |
| 46 | { |
| 47 | MOS_STATUS eStatus = MOS_STATUS_SUCCESS; |
| 48 | |
| 49 | CODECHAL_DECODE_FUNCTION_ENTER; |
| 50 | |
| 51 | CODECHAL_DECODE_CHK_STATUS_RETURN(CodechalDecodeVp8::SetFrameStates()); |
| 52 | |
| 53 | if ( MOS_VE_SUPPORTED(m_osInterface)) |
| 54 | { |
| 55 | MOS_VIRTUALENGINE_SET_PARAMS vesetParams; |
| 56 | |
| 57 | MOS_ZeroMemory(&vesetParams, sizeof(vesetParams)); |
| 58 | vesetParams.bSFCInUse = false; |
| 59 | vesetParams.bNeedSyncWithPrevious = true; |
| 60 | vesetParams.bSameEngineAsLastSubmission = false; |
| 61 | CODECHAL_DECODE_CHK_STATUS_RETURN(CodecHalDecodeSinglePipeVE_SetHintParams(m_veState, &vesetParams)); |
| 62 | } |
| 63 | |
| 64 | // To WA invalid aux data caused HW issue when MMC on |
| 65 | if (m_mmc && m_mmc->IsMmcEnabled() && MEDIA_IS_WA(m_waTable, Wa_1408785368) && |
| 66 | !Mos_ResourceIsNull(&m_destSurface.OsResource) && |
| 67 | m_destSurface.OsResource.bConvertedFromDDIResource) |
| 68 | { |
| 69 | CODECHAL_DECODE_VERBOSEMESSAGE("Clear CCS by VE resolve before frame %d submission", m_frameNum); |
| 70 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_osInterface->pfnDecompResource(m_osInterface, &m_destSurface.OsResource)); |
| 71 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_osInterface->pfnSetGpuContext(m_osInterface, m_videoContext)); |
| 72 | } |
| 73 | |
| 74 | return eStatus; |
| 75 | } |
| 76 | |
| 77 | MOS_STATUS CodechalDecodeVp8G12::DecodeStateLevel() |
| 78 | { |
| 79 | MOS_STATUS eStatus = MOS_STATUS_SUCCESS; |
| 80 | |
| 81 | CODECHAL_DECODE_FUNCTION_ENTER; |
| 82 | |
| 83 | PCODEC_REF_LIST *vp8RefList = m_vp8RefList; |
| 84 | |
| 85 | uint8_t lastRefPicIndex = m_vp8PicParams->ucLastRefPicIndex; |
| 86 | uint8_t goldenRefPicIndex = m_vp8PicParams->ucGoldenRefPicIndex; |
| 87 | uint8_t altRefPicIndex = m_vp8PicParams->ucAltRefPicIndex; |
| 88 | |
| 89 | PMOS_SURFACE destSurface = &m_destSurface; |
| 90 | if (m_vp8PicParams->key_frame) // reference surface should be nullptr when key_frame == true |
| 91 | { |
| 92 | m_presLastRefSurface = nullptr; |
| 93 | m_presGoldenRefSurface = nullptr; |
| 94 | m_presAltRefSurface = nullptr; |
| 95 | } |
| 96 | else |
| 97 | { |
| 98 | m_presLastRefSurface = &(vp8RefList[lastRefPicIndex]->resRefPic); |
| 99 | m_presGoldenRefSurface = &(vp8RefList[goldenRefPicIndex]->resRefPic); |
| 100 | m_presAltRefSurface = &(vp8RefList[altRefPicIndex]->resRefPic); |
| 101 | } |
| 102 | |
| 103 | MOS_COMMAND_BUFFER cmdBuffer; |
| 104 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_osInterface->pfnGetCommandBuffer(m_osInterface, &cmdBuffer, 0)); |
| 105 | |
| 106 | auto mmioRegisters = m_hwInterface->GetMfxInterface()->GetMmioRegisters(m_vdboxIndex); |
| 107 | HalOcaInterface::On1stLevelBBStart(cmdBuffer, *m_osInterface->pOsContext, m_osInterface->CurrentGpuContextHandle, *m_miInterface, *mmioRegisters); |
| 108 | |
| 109 | MHW_MI_FORCE_WAKEUP_PARAMS forceWakeupParams; |
| 110 | MOS_ZeroMemory(&forceWakeupParams, sizeof(MHW_MI_FORCE_WAKEUP_PARAMS)); |
| 111 | forceWakeupParams.bMFXPowerWellControl = true; |
| 112 | forceWakeupParams.bMFXPowerWellControlMask = true; |
| 113 | forceWakeupParams.bHEVCPowerWellControl = false; |
| 114 | forceWakeupParams.bHEVCPowerWellControlMask = true; |
| 115 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_miInterface->AddMiForceWakeupCmd( |
| 116 | &cmdBuffer, |
| 117 | &forceWakeupParams)); |
| 118 | |
| 119 | MHW_VDBOX_PIPE_MODE_SELECT_PARAMS pipeModeSelectParams; |
| 120 | pipeModeSelectParams.Mode = m_mode; |
| 121 | pipeModeSelectParams.bStreamOutEnabled = m_streamOutEnabled; |
| 122 | pipeModeSelectParams.bPostDeblockOutEnable = m_deblockingEnabled; |
| 123 | pipeModeSelectParams.bPreDeblockOutEnable = !m_deblockingEnabled; |
| 124 | pipeModeSelectParams.bShortFormatInUse = m_shortFormatInUse; |
| 125 | |
| 126 | MHW_VDBOX_SURFACE_PARAMS surfaceParams; |
| 127 | MOS_ZeroMemory(&surfaceParams, sizeof(surfaceParams)); |
| 128 | surfaceParams.Mode = m_mode; |
| 129 | surfaceParams.psSurface = destSurface; |
| 130 | |
| 131 | MHW_VDBOX_PIPE_BUF_ADDR_PARAMS pipeBufAddrParams; |
| 132 | pipeBufAddrParams.Mode = m_mode; |
| 133 | |
| 134 | if (m_deblockingEnabled) |
| 135 | { |
| 136 | pipeBufAddrParams.psPostDeblockSurface = &m_destSurface; |
| 137 | } |
| 138 | else |
| 139 | { |
| 140 | pipeBufAddrParams.psPreDeblockSurface = &m_destSurface; |
| 141 | } |
| 142 | |
| 143 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_mmc->SetPipeBufAddr(&pipeBufAddrParams)); |
| 144 | |
| 145 | // when there is no last, golden and alternate reference, |
| 146 | // the index is set to the destination frame index |
| 147 | pipeBufAddrParams.presReferences[CodechalDecodeLastRef] = m_presLastRefSurface; |
| 148 | pipeBufAddrParams.presReferences[CodechalDecodeGoldenRef] = m_presGoldenRefSurface; |
| 149 | pipeBufAddrParams.presReferences[CodechalDecodeAlternateRef] = m_presAltRefSurface; |
| 150 | |
| 151 | pipeBufAddrParams.presMfdIntraRowStoreScratchBuffer = &m_resMfdIntraRowStoreScratchBuffer; |
| 152 | pipeBufAddrParams.presMfdDeblockingFilterRowStoreScratchBuffer = &m_resMfdDeblockingFilterRowStoreScratchBuffer; |
| 153 | if (m_streamOutEnabled) |
| 154 | { |
| 155 | pipeBufAddrParams.presStreamOutBuffer = |
| 156 | &(m_streamOutBuffer[m_streamOutCurrBufIdx]); |
| 157 | } |
| 158 | |
| 159 | // set all ref pic addresses to valid addresses for error concealment purpose |
| 160 | for (uint32_t i = 0; i <= CodechalDecodeAlternateRef; i++) |
| 161 | { |
| 162 | if (pipeBufAddrParams.presReferences[i] == nullptr && |
| 163 | MEDIA_IS_WA(m_waTable, WaDummyReference) && |
| 164 | !Mos_ResourceIsNull(&m_dummyReference.OsResource)) |
| 165 | { |
| 166 | pipeBufAddrParams.presReferences[i] = &m_dummyReference.OsResource; |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_mmc->CheckReferenceList(&pipeBufAddrParams)); |
| 171 | |
| 172 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_mmc->SetRefrenceSync(m_disableDecodeSyncLock, m_disableLockForTranscode)); |
| 173 | |
| 174 | MHW_VDBOX_IND_OBJ_BASE_ADDR_PARAMS indObjBaseAddrParams; |
| 175 | MOS_ZeroMemory(&indObjBaseAddrParams, sizeof(indObjBaseAddrParams)); |
| 176 | indObjBaseAddrParams.Mode = m_mode; |
| 177 | indObjBaseAddrParams.dwDataSize = m_dataSize; |
| 178 | indObjBaseAddrParams.presDataBuffer = &m_resDataBuffer; |
| 179 | |
| 180 | MHW_VDBOX_BSP_BUF_BASE_ADDR_PARAMS bspBufBaseAddrParams; |
| 181 | MOS_ZeroMemory(&bspBufBaseAddrParams, sizeof(bspBufBaseAddrParams)); |
| 182 | bspBufBaseAddrParams.presBsdMpcRowStoreScratchBuffer = &m_resBsdMpcRowStoreScratchBuffer; |
| 183 | bspBufBaseAddrParams.presMprRowStoreScratchBuffer = &m_resMprRowStoreScratchBuffer; |
| 184 | |
| 185 | MHW_VDBOX_VP8_PIC_STATE vp8PicState; |
| 186 | vp8PicState.pVp8PicParams = m_vp8PicParams; |
| 187 | vp8PicState.pVp8IqMatrixParams = m_vp8IqMatrixParams; |
| 188 | vp8PicState.presSegmentationIdStreamBuffer = &m_resSegmentationIdStreamBuffer; |
| 189 | vp8PicState.dwCoefProbTableOffset = 0; |
| 190 | vp8PicState.presCoefProbBuffer = &m_resCoefProbBuffer; |
| 191 | |
| 192 | CODECHAL_DECODE_CHK_STATUS_RETURN(SendPrologWithFrameTracking( |
| 193 | &cmdBuffer, true)); |
| 194 | |
| 195 | if (m_statusQueryReportingEnabled) |
| 196 | { |
| 197 | CODECHAL_DECODE_CHK_STATUS_RETURN(StartStatusReport(&cmdBuffer)); |
| 198 | } |
| 199 | |
| 200 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_mfxInterface->AddMfxPipeModeSelectCmd(&cmdBuffer, &pipeModeSelectParams)); |
| 201 | |
| 202 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_mmc->SetSurfaceState(&surfaceParams)); |
| 203 | |
| 204 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_mfxInterface->AddMfxSurfaceCmd(&cmdBuffer, &surfaceParams)); |
| 205 | |
| 206 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_mfxInterface->AddMfxPipeBufAddrCmd(&cmdBuffer, &pipeBufAddrParams)); |
| 207 | |
| 208 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_mfxInterface->AddMfxIndObjBaseAddrCmd(&cmdBuffer, &indObjBaseAddrParams)); |
| 209 | |
| 210 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_mfxInterface->AddMfxBspBufBaseAddrCmd(&cmdBuffer, &bspBufBaseAddrParams)); |
| 211 | |
| 212 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_mfxInterface->AddMfxVp8PicCmd(&cmdBuffer, &vp8PicState)); |
| 213 | |
| 214 | m_osInterface->pfnReturnCommandBuffer(m_osInterface, &cmdBuffer, 0); |
| 215 | |
| 216 | return eStatus; |
| 217 | } |
| 218 | |
| 219 | MOS_STATUS CodechalDecodeVp8G12::DecodePrimitiveLevel() |
| 220 | { |
| 221 | MOS_STATUS eStatus = MOS_STATUS_SUCCESS; |
| 222 | |
| 223 | CODECHAL_DECODE_FUNCTION_ENTER; |
| 224 | |
| 225 | CODECHAL_DECODE_CHK_NULL_RETURN(m_osInterface); |
| 226 | MOS_COMMAND_BUFFER cmdBuffer; |
| 227 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_osInterface->pfnGetCommandBuffer(m_osInterface, &cmdBuffer, 0)); |
| 228 | |
| 229 | if (m_incompletePicture) |
| 230 | { |
| 231 | MHW_MI_FORCE_WAKEUP_PARAMS forceWakeupParams; |
| 232 | MOS_ZeroMemory(&forceWakeupParams, sizeof(MHW_MI_FORCE_WAKEUP_PARAMS)); |
| 233 | forceWakeupParams.bMFXPowerWellControl = true; |
| 234 | forceWakeupParams.bMFXPowerWellControlMask = true; |
| 235 | forceWakeupParams.bHEVCPowerWellControl = false; |
| 236 | forceWakeupParams.bHEVCPowerWellControlMask = true; |
| 237 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_miInterface->AddMiForceWakeupCmd( |
| 238 | &cmdBuffer, |
| 239 | &forceWakeupParams)); |
| 240 | } |
| 241 | |
| 242 | // Fill BSD Object Commands |
| 243 | MHW_VDBOX_VP8_BSD_PARAMS vp8BsdParams; |
| 244 | vp8BsdParams.pVp8PicParams = m_vp8PicParams; |
| 245 | |
| 246 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_mfxInterface->AddMfdVp8BsdObjectCmd(&cmdBuffer, &vp8BsdParams)); |
| 247 | |
| 248 | // Check if destination surface needs to be synchronized |
| 249 | MOS_SYNC_PARAMS syncParams; |
| 250 | syncParams = g_cInitSyncParams; |
| 251 | syncParams.GpuContext = m_videoContext; |
| 252 | syncParams.presSyncResource = &m_destSurface.OsResource; |
| 253 | syncParams.bReadOnly = false; |
| 254 | syncParams.bDisableDecodeSyncLock = m_disableDecodeSyncLock; |
| 255 | syncParams.bDisableLockForTranscode = m_disableLockForTranscode; |
| 256 | |
| 257 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_osInterface->pfnPerformOverlaySync(m_osInterface, &syncParams)); |
| 258 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_osInterface->pfnResourceWait(m_osInterface, &syncParams)); |
| 259 | |
| 260 | // Update the resource tag (s/w tag) for On-Demand Sync |
| 261 | m_osInterface->pfnSetResourceSyncTag(m_osInterface, &syncParams); |
| 262 | |
| 263 | MHW_MI_FLUSH_DW_PARAMS flushDwParams; |
| 264 | MOS_ZeroMemory(&flushDwParams, sizeof(flushDwParams)); |
| 265 | |
| 266 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_miInterface->AddMiFlushDwCmd(&cmdBuffer, &flushDwParams)); |
| 267 | |
| 268 | // Update the tag in GPU Sync eStatus buffer (H/W Tag) to match the current S/W tag |
| 269 | if (m_osInterface->bTagResourceSync) |
| 270 | { |
| 271 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_hwInterface->WriteSyncTagToResource(&cmdBuffer, &syncParams)); |
| 272 | } |
| 273 | |
| 274 | if (m_statusQueryReportingEnabled) |
| 275 | { |
| 276 | CodechalDecodeStatusReport decodeStatusReport; |
| 277 | |
| 278 | decodeStatusReport.m_statusReportNumber = m_statusReportFeedbackNumber; |
| 279 | decodeStatusReport.m_currDecodedPic = m_vp8PicParams->CurrPic; |
| 280 | decodeStatusReport.m_currDeblockedPic = m_vp8PicParams->CurrPic; |
| 281 | decodeStatusReport.m_codecStatus = CODECHAL_STATUS_UNAVAILABLE; |
| 282 | decodeStatusReport.m_currDecodedPicRes = m_vp8RefList[m_vp8PicParams->CurrPic.FrameIdx]->resRefPic; |
| 283 | CODECHAL_DEBUG_TOOL( |
| 284 | decodeStatusReport.m_secondField = CodecHal_PictureIsBottomField(m_vp8PicParams->CurrPic); |
| 285 | decodeStatusReport.m_frameType = m_perfType;) |
| 286 | CODECHAL_DECODE_CHK_STATUS_RETURN(EndStatusReport(decodeStatusReport, &cmdBuffer)); |
| 287 | } |
| 288 | |
| 289 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_miInterface->AddMiBatchBufferEnd(&cmdBuffer, nullptr)); |
| 290 | |
| 291 | m_osInterface->pfnReturnCommandBuffer(m_osInterface, &cmdBuffer, 0); |
| 292 | |
| 293 | CODECHAL_DEBUG_TOOL( |
| 294 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_debugInterface->DumpCmdBuffer( |
| 295 | &cmdBuffer, |
| 296 | CODECHAL_NUM_MEDIA_STATES, |
| 297 | "_DEC")); |
| 298 | ) |
| 299 | |
| 300 | if ( MOS_VE_SUPPORTED(m_osInterface)) |
| 301 | { |
| 302 | CodecHalDecodeSinglePipeVE_PopulateHintParams(m_veState, &cmdBuffer, false); |
| 303 | } |
| 304 | |
| 305 | if (m_huCCopyInUse) |
| 306 | { |
| 307 | syncParams = g_cInitSyncParams; |
| 308 | syncParams.GpuContext = m_videoContextForWa; |
| 309 | syncParams.presSyncResource = &m_resSyncObjectWaContextInUse; |
| 310 | |
| 311 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_osInterface->pfnEngineSignal(m_osInterface, &syncParams)); |
| 312 | |
| 313 | syncParams = g_cInitSyncParams; |
| 314 | syncParams.GpuContext = m_videoContext; |
| 315 | syncParams.presSyncResource = &m_resSyncObjectWaContextInUse; |
| 316 | |
| 317 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_osInterface->pfnEngineWait(m_osInterface, &syncParams)); |
| 318 | |
| 319 | m_huCCopyInUse = false; |
| 320 | } |
| 321 | |
| 322 | HalOcaInterface::On1stLevelBBEnd(cmdBuffer, *m_osInterface); |
| 323 | |
| 324 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_osInterface->pfnSubmitCommandBuffer(m_osInterface, &cmdBuffer, m_videoContextUsesNullHw)); |
| 325 | |
| 326 | CODECHAL_DEBUG_TOOL( |
| 327 | m_mmc->UpdateUserFeatureKey(&m_destSurface);) |
| 328 | |
| 329 | if (m_statusQueryReportingEnabled) |
| 330 | { |
| 331 | CODECHAL_DECODE_CHK_STATUS_RETURN(ResetStatusReport(m_videoContextUsesNullHw)); |
| 332 | } |
| 333 | |
| 334 | // Needs to be re-set for Linux buffer re-use scenarios |
| 335 | m_vp8RefList[m_vp8PicParams->ucCurrPicIndex]->resRefPic = |
| 336 | m_destSurface.OsResource; |
| 337 | |
| 338 | // Send the signal to indicate decode completion, in case On-Demand Sync is not present |
| 339 | CODECHAL_DECODE_CHK_STATUS_RETURN(m_osInterface->pfnResourceSignal(m_osInterface, &syncParams)); |
| 340 | |
| 341 | return eStatus; |
| 342 | } |
| 343 | |
| 344 | MOS_STATUS CodechalDecodeVp8G12::AllocateStandard( |
| 345 | CodechalSetting * settings) |
| 346 | { |
| 347 | MOS_STATUS eStatus = MOS_STATUS_SUCCESS; |
| 348 | |
| 349 | CODECHAL_DECODE_FUNCTION_ENTER; |
| 350 | |
| 351 | CODECHAL_DECODE_CHK_NULL_RETURN(settings); |
| 352 | |
| 353 | CODECHAL_DECODE_CHK_STATUS_RETURN(CodechalDecodeVp8::AllocateStandard(settings)); |
| 354 | |
| 355 | if ( MOS_VE_SUPPORTED(m_osInterface)) |
| 356 | { |
| 357 | static_cast<MhwVdboxMfxInterfaceG12*>(m_mfxInterface)->DisableScalabilitySupport(); |
| 358 | |
| 359 | //single pipe VE initialize |
| 360 | m_veState = (PCODECHAL_DECODE_SINGLEPIPE_VIRTUALENGINE_STATE)MOS_AllocAndZeroMemory(sizeof(CODECHAL_DECODE_SINGLEPIPE_VIRTUALENGINE_STATE)); |
| 361 | CODECHAL_DECODE_CHK_NULL_RETURN(m_veState); |
| 362 | CODECHAL_DECODE_CHK_STATUS_RETURN(CodecHalDecodeSinglePipeVE_InitInterface(m_osInterface, m_veState)); |
| 363 | } |
| 364 | |
| 365 | return eStatus; |
| 366 | } |
| 367 | |
| 368 | MOS_STATUS CodechalDecodeVp8G12::InitMmcState() |
| 369 | { |
| 370 | m_mmc = MOS_New(CodechalMmcDecodeVp8G12, m_hwInterface, this); |
| 371 | CODECHAL_DECODE_CHK_NULL_RETURN(m_mmc); |
| 372 | |
| 373 | return MOS_STATUS_SUCCESS; |
| 374 | } |
| 375 | |
| 376 | CodechalDecodeVp8G12::CodechalDecodeVp8G12( |
| 377 | CodechalHwInterface *hwInterface, |
| 378 | CodechalDebugInterface* debugInterface, |
| 379 | PCODECHAL_STANDARD_INFO standardInfo) : |
| 380 | CodechalDecodeVp8(hwInterface, debugInterface, standardInfo) |
| 381 | { |
| 382 | CODECHAL_DECODE_FUNCTION_ENTER; |
| 383 | |
| 384 | CODECHAL_DECODE_CHK_NULL_NO_STATUS_RETURN(m_osInterface); |
| 385 | |
| 386 | m_osInterface->pfnVirtualEngineSupported(m_osInterface, true, true); |
| 387 | } |
| 388 |