• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 * Copyright (c) 2020-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     decode_vp9_pipeline_M12.cpp
24 //! \brief    Defines the interface for vp9 decode pipeline
25 //!
26 #include "decode_vp9_pipeline_m12.h"
27 #include "decode_vp9_packet_single_m12.h"
28 #include "decode_vp9_packet_front_end_m12.h"
29 #include "decode_vp9_packet_back_end_m12.h"
30 #include "decode_vp9_picture_packet_m12.h"
31 #include "decode_vp9_slice_packet_m12.h"
32 #include "decode_utils.h"
33 #include "codechal_debug.h"
34 #include "decode_mem_compression_g12.h"
35 #include "decode_vp9_mem_compression_m12.h"
36 #include "decode_vp9_downsampling_packet.h"
37 #include "decode_common_feature_defs.h"
38 #include "decode_resource_auto_lock.h"
39 #include "decode_vp9_feature_manager_m12.h"
40 #include "decode_vp9_buffer_update_m12.h"
41 #include "decode_sfc_histogram_postsubpipeline_m12.h"
42 #include "decode_input_bitstream_m12.h"
43 #include "decode_cp_bitstream_m12.h"
44 #include "decode_marker_packet_g12.h"
45 #include "decode_predication_packet_g12.h"
46 #include "mos_interface.h"
47 
48 namespace decode
49 {
Vp9PipelineG12(CodechalHwInterface * hwInterface,CodechalDebugInterface * debugInterface)50 Vp9PipelineG12::Vp9PipelineG12(
51     CodechalHwInterface *   hwInterface,
52     CodechalDebugInterface *debugInterface)
53     : Vp9Pipeline(*hwInterface, debugInterface)
54 {
55     m_hwInterface = hwInterface;
56 }
57 
Init(void * settings)58 MOS_STATUS Vp9PipelineG12::Init(void *settings)
59 {
60     DECODE_FUNC_CALL();
61 
62     DECODE_CHK_NULL(settings);
63     DECODE_CHK_STATUS(Initialize(settings));
64 
65     auto vp9DecodePktSingle = MOS_New(Vp9DecodeSinglePktM12, this, m_task, m_hwInterface);
66     DECODE_CHK_STATUS(RegisterPacket(DecodePacketId(this, vp9SinglePacketId), vp9DecodePktSingle));
67     DECODE_CHK_STATUS(vp9DecodePktSingle->Init());
68 
69     auto vp9DecodePktFrontEnd = MOS_New(Vp9DecodeFrontEndPktM12, this, m_task, m_hwInterface);
70     DECODE_CHK_NULL(vp9DecodePktFrontEnd);
71     DECODE_CHK_STATUS(RegisterPacket(DecodePacketId(this, vp9FrontEndPacketId), vp9DecodePktFrontEnd));
72     DECODE_CHK_STATUS(vp9DecodePktFrontEnd->Init());
73 
74     auto vp9DecodePktBackEnd = MOS_New(Vp9DecodeBackEndPktM12, this, m_task, m_hwInterface);
75     DECODE_CHK_NULL(vp9DecodePktBackEnd);
76     DECODE_CHK_STATUS(RegisterPacket(DecodePacketId(this, vp9BackEndPacketId), vp9DecodePktBackEnd));
77     DECODE_CHK_STATUS(vp9DecodePktBackEnd->Init());
78 
79     return MOS_STATUS_SUCCESS;
80 }
81 
Prepare(void * params)82 MOS_STATUS Vp9PipelineG12::Prepare(void *params)
83 {
84     DECODE_FUNC_CALL();
85 
86     DECODE_CHK_NULL(params);
87     DecodePipelineParams *pipelineParams = (DecodePipelineParams *)params;
88     m_pipeMode                           = pipelineParams->m_pipeMode;
89 
90     PERF_UTILITY_AUTO((__FUNCTION__ + std::to_string((int)m_pipeMode)).c_str(), PERF_DECODE, PERF_LEVEL_HAL);
91 
92     if (IsFirstProcessPipe(*pipelineParams))
93     {
94         DECODE_CHK_STATUS(Vp9Pipeline::Prepare(params));
95     }
96 
97     DECODE_CHK_STATUS(m_preSubPipeline->Prepare(*pipelineParams));
98     DECODE_CHK_STATUS(m_postSubPipeline->Prepare(*pipelineParams));
99 
100     if (m_pipeMode == decodePipeModeProcess)
101     {
102         if (IsCompleteBitstream())
103         {
104             CODECHAL_DEBUG_TOOL(
105                 m_debugInterface->m_bufferDumpFrameNum = m_basicFeature->m_frameNum;
106                 DECODE_CHK_STATUS(DumpParams(*m_basicFeature));
107                 );
108 
109             DecodeStatusParameters inputParameters = {};
110             MOS_ZeroMemory(&inputParameters, sizeof(DecodeStatusParameters));
111             inputParameters.statusReportFeedbackNumber = m_basicFeature->m_vp9PicParams->StatusReportFeedbackNumber;
112             inputParameters.codecFunction              = m_basicFeature->m_codecFunction;
113             inputParameters.picWidthInMb               = m_basicFeature->m_picWidthInMb;
114             inputParameters.pictureCodingType          = m_basicFeature->m_pictureCodingType;
115             inputParameters.currOriginalPic            = m_basicFeature->m_curRenderPic;
116             inputParameters.currDecodedPicRes          = m_basicFeature->m_destSurface.OsResource;
117             inputParameters.numUsedVdbox               = m_numVdbox;
118 
119             CODECHAL_DEBUG_TOOL(
120                 if (m_streamout != nullptr)
121                 {
122                     DECODE_CHK_STATUS(m_streamout->InitStatusReportParam(inputParameters));
123                 }
124             );
125 
126 #if (_DEBUG || _RELEASE_INTERNAL)
127 #ifdef _DECODE_PROCESSING_SUPPORTED
128             DecodeDownSamplingFeature *downSamplingFeature = dynamic_cast<DecodeDownSamplingFeature *>(
129                 m_featureManager->GetFeature(DecodeFeatureIDs::decodeDownSampling));
130             if (downSamplingFeature != nullptr)
131             {
132                 auto frameIdx                   = m_basicFeature->m_curRenderPic.FrameIdx;
133                 inputParameters.sfcOutputSurface = &downSamplingFeature->m_outputSurfaceList[frameIdx];
134                 if (downSamplingFeature->m_histogramBuffer != nullptr)
135                 {
136                     inputParameters.histogramOutputBuf = &downSamplingFeature->m_histogramBuffer->OsResource;
137                 }
138                 CODECHAL_DEBUG_TOOL(DumpDownSamplingParams(*downSamplingFeature));
139             }
140 #endif
141 #endif
142             m_statusReport->Init(&inputParameters);
143         }
144     }
145 
146     return MOS_STATUS_SUCCESS;
147 }
148 
InitContexOption(Vp9BasicFeature & basicFeature)149 MOS_STATUS Vp9PipelineG12::InitContexOption(Vp9BasicFeature &basicFeature)
150 {
151     DecodeScalabilityPars scalPars;
152     MOS_ZeroMemory(&scalPars, sizeof(scalPars));
153 
154     scalPars.usingHcp           = true;
155     scalPars.enableVE           = MOS_VE_SUPPORTED(m_osInterface);
156     scalPars.disableScalability = m_hwInterface->IsDisableScalability();
157     scalPars.surfaceFormat      = basicFeature.m_destSurface.Format;
158     scalPars.frameWidth         = basicFeature.m_frameWidthAlignedMinBlk;
159     scalPars.frameHeight        = basicFeature.m_frameHeightAlignedMinBlk;
160     scalPars.numVdbox           = m_numVdbox;
161     bool isMultiDevices = false, isMultiEngine = false;
162     m_osInterface->pfnGetMultiEngineStatus(m_osInterface, nullptr, COMPONENT_Encode, isMultiDevices, isMultiEngine);
163     if (isMultiDevices && !isMultiEngine)
164     {
165         scalPars.disableScalability = true;
166     }
167 #if (_DEBUG || _RELEASE_INTERNAL)
168     if (m_osInterface->bHcpDecScalabilityMode == MOS_SCALABILITY_ENABLE_MODE_FALSE)
169     {
170         scalPars.disableScalability = true;
171     }
172     else if (m_osInterface->bHcpDecScalabilityMode == MOS_SCALABILITY_ENABLE_MODE_USER_FORCE)
173     {
174         scalPars.disableScalability = false;
175     }
176     scalPars.modeSwithThreshold1 =
177         ReadUserFeature(m_userSettingPtr, "HCP Decode Mode Switch TH1", MediaUserSetting::Group::Sequence).Get<uint32_t>();
178     scalPars.modeSwithThreshold2 =
179         ReadUserFeature(m_userSettingPtr, "HCP Decode Mode Switch TH2", MediaUserSetting::Group::Sequence).Get<uint32_t>();
180     scalPars.forceMultiPipe =
181         ReadUserFeature(m_userSettingPtr, "HCP Decode Always Frame Split", MediaUserSetting::Group::Sequence).Get<bool>();
182     scalPars.userPipeNum =
183         ReadUserFeature(m_userSettingPtr, "HCP Decode User Pipe Num", MediaUserSetting::Group::Sequence).Get<uint8_t>();
184 #endif
185 
186 #ifdef _DECODE_PROCESSING_SUPPORTED
187     DecodeDownSamplingFeature *downSamplingFeature = dynamic_cast<DecodeDownSamplingFeature *>(
188         m_featureManager->GetFeature(DecodeFeatureIDs::decodeDownSampling));
189     if (downSamplingFeature != nullptr && downSamplingFeature->IsEnabled())
190     {
191         scalPars.usingSfc = true;
192         if (!MEDIA_IS_SKU(m_skuTable, FtrSfcScalability))
193         {
194             scalPars.disableScalability = true;
195         }
196     }
197     //Disable Scalability when histogram is enabled
198     if (downSamplingFeature != nullptr && (downSamplingFeature->m_histogramDestSurf || downSamplingFeature->m_histogramDebug))
199     {
200         scalPars.disableScalability = true;
201     }
202 #endif
203 
204     if (MEDIA_IS_SKU(m_skuTable, FtrVirtualTileScalabilityDisable))
205     {
206         scalPars.disableScalability = true;
207         scalPars.disableVirtualTile = true;
208     }
209 
210     if (!scalPars.disableScalability)
211         m_osInterface->pfnSetMultiEngineEnabled(m_osInterface, COMPONENT_Decode, true);
212 
213     DECODE_CHK_STATUS(m_scalabOption.SetScalabilityOption(&scalPars));
214     return MOS_STATUS_SUCCESS;
215 }
216 
Execute()217 MOS_STATUS Vp9PipelineG12::Execute()
218 {
219     DECODE_FUNC_CALL();
220 
221     PERF_UTILITY_AUTO((__FUNCTION__ + std::to_string((int)m_pipeMode)).c_str(), PERF_DECODE, PERF_LEVEL_HAL);
222 
223     if (m_pipeMode == decodePipeModeProcess)
224     {
225         DECODE_CHK_STATUS(m_preSubPipeline->Execute());
226 
227         if (IsCompleteBitstream())
228         {
229             DECODE_CHK_STATUS(InitContexOption(*m_basicFeature));
230             DECODE_CHK_STATUS(InitDecodeMode(m_scalabOption.GetMode()));
231             DECODE_CHK_STATUS(Vp9Pipeline::CreatePhaseList(
232                 m_scalabOption.GetMode(), m_scalabOption.GetNumPipe()));
233             DECODE_CHK_STATUS(Vp9Pipeline::Execute());
234 
235 #if (_DEBUG || _RELEASE_INTERNAL)
236             DECODE_CHK_STATUS(StatusCheck());
237 #endif
238             // Only update user features for the first frame.
239             if (m_basicFeature->m_frameNum == 0)
240             {
241                 DECODE_CHK_STATUS(UserFeatureReport());
242             }
243 
244             DecodeFrameIndex++;
245             m_basicFeature->m_frameNum = DecodeFrameIndex;
246 
247             DECODE_CHK_STATUS(m_statusReport->Reset());
248 
249             DECODE_CHK_STATUS(DestoryPhaseList());
250         }
251         DECODE_CHK_STATUS(m_postSubPipeline->Execute());
252     }
253 
254     return MOS_STATUS_SUCCESS;
255 }
256 
GetStatusReport(void * status,uint16_t numStatus)257 MOS_STATUS Vp9PipelineG12::GetStatusReport(void *status, uint16_t numStatus)
258 {
259     DECODE_FUNC_CALL();
260 
261     m_statusReport->GetReport(numStatus, status);
262 
263     return MOS_STATUS_SUCCESS;
264 }
265 
GetCompletedReport()266 uint32_t Vp9PipelineG12::GetCompletedReport()
267 {
268     DECODE_FUNC_CALL();
269 
270     uint32_t completedCount = m_statusReport->GetCompletedCount();
271     uint32_t reportedCount  = m_statusReport->GetReportedCount();
272 
273     if (reportedCount > completedCount)
274     {
275         DECODE_ASSERTMESSAGE("No report available at all");
276         return 0;
277     }
278     else
279     {
280         uint32_t availableCount = completedCount - reportedCount;
281         return availableCount;
282     }
283 }
284 
Destroy()285 MOS_STATUS Vp9PipelineG12::Destroy()
286 {
287     DECODE_FUNC_CALL();
288 
289     Uninitialize();
290 
291     m_osInterface->pfnSetMultiEngineEnabled(m_osInterface, COMPONENT_Decode, false);
292 
293     return MOS_STATUS_SUCCESS;
294 }
295 
CreateFeatureManager()296 MOS_STATUS Vp9PipelineG12::CreateFeatureManager()
297 {
298     DECODE_FUNC_CALL();
299     m_featureManager = MOS_New(DecodeVp9FeatureManagerM12, m_allocator, m_hwInterface, m_osInterface);
300     DECODE_CHK_NULL(m_featureManager);
301     return MOS_STATUS_SUCCESS;
302 }
303 
Initialize(void * settings)304 MOS_STATUS Vp9PipelineG12::Initialize(void *settings)
305 {
306     DECODE_FUNC_CALL();
307 
308     DECODE_CHK_STATUS(MediaPipeline::InitPlatform());
309     DECODE_CHK_STATUS(MediaPipeline::CreateMediaCopyWrapper());
310     DECODE_CHK_NULL(m_mediaCopyWrapper);
311 
312     DECODE_CHK_NULL(m_waTable);
313 
314     auto *codecSettings = (CodechalSetting *)settings;
315     DECODE_CHK_NULL(m_hwInterface);
316     DECODE_CHK_STATUS(m_hwInterface->Initialize(codecSettings));
317 
318     if (m_mediaCopyWrapper->MediaCopyStateIsNull())
319     {
320         m_mediaCopyWrapper->SetMediaCopyState(m_hwInterface->CreateMediaCopy(m_osInterface));
321     }
322 
323     CODECHAL_DEBUG_TOOL(
324         m_debugInterface = MOS_New(CodechalDebugInterface);
325         DECODE_CHK_NULL(m_debugInterface);
326         DECODE_CHK_STATUS(
327             m_debugInterface->Initialize(m_hwInterface, codecSettings->codecFunction, m_mediaCopyWrapper)););
328 
329     if (m_hwInterface->m_hwInterfaceNext)
330     {
331         m_hwInterface->m_hwInterfaceNext->legacyHwInterface = m_hwInterface;
332     }
333     m_mediaContext = MOS_New(MediaContext, scalabilityDecoder, m_hwInterface->m_hwInterfaceNext, m_osInterface);
334     DECODE_CHK_NULL(m_mediaContext);
335 
336     m_task = CreateTask(MediaTask::TaskType::cmdTask);
337     DECODE_CHK_NULL(m_task);
338 
339     m_numVdbox = GetSystemVdboxNumber();
340 
341     bool limitedLMemBar = MEDIA_IS_SKU(m_skuTable, FtrLimitedLMemBar) ? true : false;
342     m_allocator         = MOS_New(DecodeAllocator, m_osInterface, limitedLMemBar);
343     DECODE_CHK_NULL(m_allocator);
344 
345     DECODE_CHK_STATUS(CreateStatusReport());
346 
347     m_decodecp = Create_DecodeCpInterface(codecSettings, m_hwInterface->GetCpInterface(), m_hwInterface->GetOsInterface());
348     if (m_decodecp)
349     {
350         DECODE_CHK_STATUS(m_decodecp->RegisterParams(codecSettings));
351     }
352     DECODE_CHK_STATUS(CreateFeatureManager());
353     DECODE_CHK_STATUS(m_featureManager->Init(codecSettings));
354 
355     DECODE_CHK_STATUS(CreateSubPipeLineManager(codecSettings));
356     DECODE_CHK_STATUS(CreateSubPacketManager(codecSettings));
357 
358     // Create basic GPU context
359     DecodeScalabilityPars scalPars;
360     MOS_ZeroMemory(&scalPars, sizeof(scalPars));
361     DECODE_CHK_STATUS(m_mediaContext->SwitchContext(VdboxDecodeFunc, &scalPars, &m_scalability));
362     m_decodeContext = m_osInterface->pfnGetGpuContext(m_osInterface);
363 
364     m_basicFeature = dynamic_cast<Vp9BasicFeature *>(m_featureManager->GetFeature(FeatureIDs::basicFeature));
365     DECODE_CHK_NULL(m_basicFeature);
366 
367     auto *bufferUpdatePipeline = MOS_New(DecodeVp9BufferUpdateM12, this, m_task, m_numVdbox, m_hwInterface);
368     DECODE_CHK_NULL(bufferUpdatePipeline);
369     DECODE_CHK_STATUS(m_preSubPipeline->Register(*bufferUpdatePipeline));
370     DECODE_CHK_STATUS(bufferUpdatePipeline->Init(*codecSettings));
371 #ifdef _MMC_SUPPORTED
372     DECODE_CHK_STATUS(InitMmcState());
373 #endif
374 
375     return MOS_STATUS_SUCCESS;
376 }
377 
Uninitialize()378 MOS_STATUS Vp9PipelineG12::Uninitialize()
379 {
380     DECODE_FUNC_CALL();
381 
382     for (auto pair : m_packetList)
383     {
384         pair.second->Destroy();
385     }
386 
387     if (m_mmcState != nullptr)
388     {
389         MOS_Delete(m_mmcState);
390     }
391 
392     return Vp9Pipeline::Uninitialize();
393 }
394 
UserFeatureReport()395 MOS_STATUS Vp9PipelineG12::UserFeatureReport()
396 {
397     DECODE_FUNC_CALL();
398 
399     return Vp9Pipeline::UserFeatureReport();
400 }
401 
CreateSubPackets(DecodeSubPacketManager & subPacketManager,CodechalSetting & codecSettings)402 MOS_STATUS Vp9PipelineG12::CreateSubPackets(DecodeSubPacketManager &subPacketManager, CodechalSetting &codecSettings)
403 {
404     DecodePredicationPktG12 *predicationPkt = MOS_New(DecodePredicationPktG12, this, m_hwInterface);
405     DECODE_CHK_NULL(predicationPkt);
406     DECODE_CHK_STATUS(subPacketManager.Register(
407         DecodePacketId(this, predicationSubPacketId), *predicationPkt));
408 
409     DecodeMarkerPktG12 *markerPkt = MOS_New(DecodeMarkerPktG12, this, m_hwInterface);
410     DECODE_CHK_NULL(markerPkt);
411     DECODE_CHK_STATUS(subPacketManager.Register(
412         DecodePacketId(this, markerSubPacketId), *markerPkt));
413 
414 #ifdef _DECODE_PROCESSING_SUPPORTED
415     Vp9DownSamplingPkt *downSamplingPkt = MOS_New(Vp9DownSamplingPkt, this, *m_hwInterface);
416     DECODE_CHK_NULL(downSamplingPkt);
417     DECODE_CHK_STATUS(subPacketManager.Register(
418         DecodePacketId(this, downSamplingSubPacketId), *downSamplingPkt));
419 #endif
420 
421     Vp9DecodePicPktM12 *pictureDecodePkt = MOS_New(Vp9DecodePicPktM12, this, m_hwInterface);
422     DECODE_CHK_NULL(pictureDecodePkt);
423     DECODE_CHK_STATUS(subPacketManager.Register(
424         DecodePacketId(this, vp9PictureSubPacketId), *pictureDecodePkt));
425 
426     //VP9 slice packet, only 1 slice
427     Vp9DecodeSlcPktM12 *sliceDecodePkt = MOS_New(Vp9DecodeSlcPktM12, this, m_hwInterface);
428     DECODE_CHK_NULL(sliceDecodePkt);
429     DECODE_CHK_STATUS(subPacketManager.Register(
430         DecodePacketId(this, vp9SliceSubPacketId), *sliceDecodePkt));
431 
432     Vp9DecodeTilePktM12 *tileDecodePkt = MOS_New(Vp9DecodeTilePktM12, this, m_hwInterface);
433     DECODE_CHK_NULL(tileDecodePkt);
434     DECODE_CHK_STATUS(subPacketManager.Register(
435         DecodePacketId(this, vp9TileSubPacketId), *tileDecodePkt));
436 
437     return MOS_STATUS_SUCCESS;
438 }
439 
CreatePostSubPipeLines(DecodeSubPipelineManager & subPipelineManager)440 MOS_STATUS Vp9PipelineG12::CreatePostSubPipeLines(DecodeSubPipelineManager &subPipelineManager)
441 {
442     DECODE_FUNC_CALL();
443 
444 #ifdef _DECODE_PROCESSING_SUPPORTED
445     auto sfcHistogramPostSubPipeline = MOS_New(DecodeSfcHistogramSubPipelineM12, this, m_task, m_numVdbox, m_hwInterface);
446     DECODE_CHK_NULL(sfcHistogramPostSubPipeline);
447     DECODE_CHK_STATUS(m_postSubPipeline->Register(*sfcHistogramPostSubPipeline));
448 #endif
449 
450     return MOS_STATUS_SUCCESS;
451 }
452 
CreatePreSubPipeLines(DecodeSubPipelineManager & subPipelineManager)453 MOS_STATUS Vp9PipelineG12::CreatePreSubPipeLines(DecodeSubPipelineManager &subPipelineManager)
454 {
455     m_bitstream = MOS_New(DecodeInputBitstreamM12, this, m_task, m_numVdbox, m_hwInterface);
456     DECODE_CHK_NULL(m_bitstream);
457     DECODE_CHK_STATUS(subPipelineManager.Register(*m_bitstream));
458 
459     m_streamout = MOS_New(DecodeStreamOutM12, this, m_task, m_numVdbox, m_hwInterface);
460     DECODE_CHK_NULL(m_streamout);
461     DECODE_CHK_STATUS(subPipelineManager.Register(*m_streamout));
462     return MOS_STATUS_SUCCESS;
463 }
464 
InitMmcState()465 MOS_STATUS Vp9PipelineG12::InitMmcState()
466 {
467 #ifdef _MMC_SUPPORTED
468     DECODE_CHK_NULL(m_hwInterface);
469     m_mmcState = MOS_New(Vp9DecodeMemCompM12, m_hwInterface);
470     DECODE_CHK_NULL(m_mmcState);
471     DECODE_CHK_STATUS(m_basicFeature->SetMmcState(m_mmcState->IsMmcEnabled()));
472 #endif
473     return MOS_STATUS_SUCCESS;
474 }
475 
476 #if USE_CODECHAL_DEBUG_TOOL
DumpParams(Vp9BasicFeature & basicFeature)477 MOS_STATUS Vp9PipelineG12::DumpParams(Vp9BasicFeature &basicFeature)
478 {
479     basicFeature.m_vp9PicParams->CurrPic.PicFlags = PICTURE_FRAME;
480     m_debugInterface->m_currPic                   = basicFeature.m_curRenderPic;
481     m_debugInterface->m_frameType                 = basicFeature.m_pictureCodingType;
482     m_debugInterface->m_secondField               = basicFeature.m_secondField;
483     m_debugInterface->m_bufferDumpFrameNum        = basicFeature.m_frameNum;
484 
485     DECODE_CHK_STATUS(DumpPicParams(basicFeature.m_vp9PicParams));
486     DECODE_CHK_STATUS(DumpSliceParams(basicFeature.m_vp9SliceParams));
487     DECODE_CHK_STATUS(DumpSegmentParams(basicFeature.m_vp9SegmentParams));
488     DECODE_CHK_STATUS(DumpBitstream(&basicFeature.m_resDataBuffer.OsResource, basicFeature.m_dataSize, 0));
489 
490     DECODE_CHK_STATUS(m_debugInterface->DumpBuffer(
491         &(basicFeature.m_resVp9SegmentIdBuffer->OsResource),
492         CodechalDbgAttr::attrSegId,
493         "SegId_beforeHCP",
494         (basicFeature.m_allocatedWidthInSb * basicFeature.m_allocatedHeightInSb * CODECHAL_CACHELINE_SIZE)));
495 
496     DECODE_CHK_STATUS(m_debugInterface->DumpBuffer(
497          &(basicFeature.m_resVp9ProbBuffer[basicFeature.m_frameCtxIdx]->OsResource),
498         CodechalDbgAttr::attrCoefProb,
499         "PakHwCoeffProbs_beforeHCP",
500         CODEC_VP9_PROB_MAX_NUM_ELEM));
501 
502     return MOS_STATUS_SUCCESS;
503 }
504 #endif
505 
506 }  // namespace decode
507