1 /*
2 * Copyright (c) 2021-2024, 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_vvc_pipeline.cpp
24 //! \brief    Defines the interface for vvc decode pipeline
25 //!
26 #include "decode_vvc_pipeline.h"
27 #include "decode_utils.h"
28 #include "codechal_debug.h"
29 #include "decode_vvc_feature_manager.h"
30 #include "decode_vvc_packet.h"
31 #include "decode_mem_compression.h"
32 #include "media_debug_fast_dump.h"
33 
34 namespace decode
35 {
VvcPipeline(CodechalHwInterfaceNext * hwInterface,CodechalDebugInterface * debugInterface)36     VvcPipeline::VvcPipeline(
37         CodechalHwInterfaceNext *   hwInterface,
38         CodechalDebugInterface *debugInterface)
39         : DecodePipeline(hwInterface, debugInterface)
40     {
41         m_hwInterface    = hwInterface;
42     }
43 
InitContext()44     MOS_STATUS VvcPipeline::InitContext()
45     {
46         DECODE_FUNC_CALL();
47 
48         DECODE_CHK_NULL(m_basicFeature);
49 
50         DecodeScalabilityPars scalPars;
51         MOS_ZeroMemory(&scalPars, sizeof(scalPars));
52         scalPars.disableScalability = true;
53         scalPars.enableVE           = MOS_VE_SUPPORTED(m_osInterface);
54         scalPars.usingSlimVdbox     = false;
55         scalPars.numVdbox           = m_numVdbox;
56 
57         m_mediaContext->SwitchContext(VdboxDecodeFunc, &scalPars, &m_scalability);
58         DECODE_CHK_NULL(m_scalability);
59 
60         m_decodeContext = m_osInterface->pfnGetGpuContext(m_osInterface);
61         m_decodeContextHandle = m_osInterface->CurrentGpuContextHandle;
62 
63         m_passNum = (uint16_t)m_basicFeature->m_numSlices;
64         m_basicFeature->m_curSlice = 0;
65         m_scalability->SetPassNumber(m_passNum);
66 
67         return MOS_STATUS_SUCCESS;
68     }
69 
ActivateDecodePackets()70     MOS_STATUS VvcPipeline::ActivateDecodePackets()
71     {
72         DECODE_FUNC_CALL();
73         if (m_basicFeature->m_shortFormatInUse)
74         {
75             DECODE_CHK_STATUS(ActivatePacket(DecodePacketId(this, vvcDecodeS2LPktId), false, 0, 0));
76         }
77 
78         for (uint16_t curPass = 0; curPass < GetPassNum(); curPass++)
79         {
80             DECODE_CHK_STATUS(ActivatePacket(DecodePacketId(this, vvcDecodePacketId), false, curPass, 0));
81         }
82 
83         return MOS_STATUS_SUCCESS;
84     }
85 
Prepare(void * params)86     MOS_STATUS VvcPipeline::Prepare(void *params)
87     {
88         DECODE_FUNC_CALL();
89 
90         DECODE_CHK_NULL(params);
91         DECODE_CHK_NULL(m_basicFeature);
92 
93         DecodePipelineParams *pipelineParams = (DecodePipelineParams *)params;
94         m_pipeMode = pipelineParams->m_pipeMode;
95 
96         PERF_UTILITY_AUTO((__FUNCTION__ + std::to_string((int)m_pipeMode)).c_str(), PERF_DECODE, PERF_LEVEL_HAL);
97 
98         if (IsFirstProcessPipe(*pipelineParams))
99         {
100             DECODE_CHK_STATUS(DecodePipeline::Prepare(params));
101         }
102 
103         DECODE_CHK_STATUS(m_preSubPipeline->Prepare(*pipelineParams));
104         DECODE_CHK_STATUS(m_postSubPipeline->Prepare(*pipelineParams));
105 
106         if (m_pipeMode == decodePipeModeProcess)
107         {
108             if (IsCompleteBitstream())
109             {
110                 CODECHAL_DEBUG_TOOL(DECODE_CHK_STATUS(DumpParams(*m_basicFeature)));
111 
112                 DecodeStatusParameters inputParameters = {};
113                 MOS_ZeroMemory(&inputParameters, sizeof(DecodeStatusParameters));
114                 inputParameters.statusReportFeedbackNumber = m_basicFeature->m_vvcPicParams->m_statusReportFeedbackNumber;
115                 inputParameters.codecFunction              = m_basicFeature->m_codecFunction;
116                 inputParameters.picWidthInMb               = m_basicFeature->m_picWidthInMb;
117                 inputParameters.pictureCodingType          = m_basicFeature->m_pictureCodingType;
118                 inputParameters.currOriginalPic            = m_basicFeature->m_curRenderPic;
119                 inputParameters.currDecodedPicRes          = m_basicFeature->m_destSurface.OsResource;
120                 inputParameters.numUsedVdbox               = m_numVdbox;
121                 m_allocator->UpdateResoreceUsageType(&inputParameters.currDecodedPicRes, resourceOutputPicture);
122                 m_statusReport->Init(&inputParameters);
123             }
124         }
125 
126         return MOS_STATUS_SUCCESS;
127     }
128 
Execute()129     MOS_STATUS VvcPipeline::Execute()
130     {
131         DECODE_FUNC_CALL();
132 
133         PERF_UTILITY_AUTO((__FUNCTION__ + std::to_string((int)m_pipeMode)).c_str(), PERF_DECODE, PERF_LEVEL_HAL);
134 
135         if (m_pipeMode == decodePipeModeBegin)
136         {
137             return MOS_STATUS_SUCCESS;
138         }
139 
140         DECODE_CHK_NULL(m_basicFeature);
141         DECODE_CHK_NULL(m_basicFeature->m_vvcPicParams);
142 
143         if (m_pipeMode == decodePipeModeProcess)
144         {
145             DECODE_CHK_STATUS(m_preSubPipeline->Execute());
146 
147             if (IsCompleteBitstream())
148             {
149                 AllocateResources(*m_basicFeature);
150                 DECODE_CHK_STATUS(InitContext());
151                 DECODE_CHK_STATUS(ActivateDecodePackets());
152                 DECODE_CHK_STATUS(ExecuteActivePackets());
153             }
154 
155             DECODE_CHK_STATUS(m_postSubPipeline->Execute());
156         }
157         else if (m_pipeMode == decodePipeModeEnd)
158         {
159             DECODE_CHK_NULL(m_basicFeature);
160             CODECHAL_DEBUG_TOOL(
161                 m_debugInterface->m_bufferDumpFrameNum = m_basicFeature->m_frameNum;
162                 DECODE_CHK_STATUS(m_debugInterface->DumpYUVSurface(
163                     &m_basicFeature->m_destSurface,
164                     CodechalDbgAttr::attrDecodeOutputSurface,
165                     "DstSurf"));)
166 
167             CODECHAL_DEBUG_TOOL(
168                 PMHW_BATCH_BUFFER batchBuffer = m_vvcDecodePkt->GetPictureLvlBB();
169                 DECODE_CHK_NULL(batchBuffer);
170                 batchBuffer->iLastCurrent = batchBuffer->iSize;
171                 batchBuffer->dwOffset = 0;
172                 DECODE_CHK_STATUS(m_debugInterface->Dump2ndLvlBatch(
173                     batchBuffer,
174                     CODECHAL_NUM_MEDIA_STATES,
175                     "VVC_DEC_Pic"));)
176 
177             if (m_basicFeature->m_shortFormatInUse) // Is Short Format In Use
178             {
179                 CODECHAL_DEBUG_TOOL(
180                     PMHW_BATCH_BUFFER batchBuffer = GetSliceLvlCmdBuffer();
181                     DECODE_CHK_NULL(batchBuffer);
182                     batchBuffer->iLastCurrent = batchBuffer->iSize;
183                     batchBuffer->dwOffset     = 0;
184                     DECODE_CHK_STATUS(m_debugInterface->Dump2ndLvlBatch(
185                         batchBuffer,
186                         CODECHAL_NUM_MEDIA_STATES,
187                         "VVC_DEC_Slice"));)
188                 CODECHAL_DEBUG_TOOL(
189                     PMHW_BATCH_BUFFER pbatchBuffer = GetTileLvlCmdBuffer();
190                     DECODE_CHK_NULL(pbatchBuffer);
191                     pbatchBuffer->iLastCurrent = pbatchBuffer->iSize;
192                     pbatchBuffer->dwOffset     = 0;
193                     DECODE_CHK_STATUS(m_debugInterface->Dump2ndLvlBatch(
194                         pbatchBuffer,
195                         CODECHAL_NUM_MEDIA_STATES,
196                         "VVC_DEC_Tile"));)
197             }
198 
199 #if (_DEBUG || _RELEASE_INTERNAL)
200             DECODE_CHK_STATUS(StatusCheck());
201 #endif
202 
203             // Only update user features for the first frame.
204             if (m_basicFeature->m_frameNum == 0)
205             {
206                 DECODE_CHK_STATUS(UserFeatureReport());
207             }
208 
209             DecodeFrameIndex++;
210             m_basicFeature->m_frameNum = DecodeFrameIndex;
211 
212             DECODE_CHK_STATUS(m_statusReport->Reset());
213         }
214 
215         return MOS_STATUS_SUCCESS;
216     }
217 
GetStatusReport(void * status,uint16_t numStatus)218     MOS_STATUS VvcPipeline::GetStatusReport(void *status, uint16_t numStatus)
219     {
220         DECODE_FUNC_CALL();
221 
222         m_statusReport->GetReport(numStatus, status);
223 
224         return MOS_STATUS_SUCCESS;
225     }
226 
GetCompletedReport()227     uint32_t VvcPipeline::GetCompletedReport()
228     {
229         DECODE_FUNC_CALL();
230 
231         uint32_t completedCount = m_statusReport->GetCompletedCount();
232         uint32_t reportedCount = m_statusReport->GetReportedCount();
233 
234         if (reportedCount > completedCount)
235         {
236             DECODE_ASSERTMESSAGE("No report available at all");
237             return 0;
238         }
239         else
240         {
241             uint32_t availableCount = completedCount - reportedCount;
242             return availableCount;
243         }
244     }
245 
Destroy()246     MOS_STATUS VvcPipeline::Destroy()
247     {
248         DECODE_FUNC_CALL();
249 
250         Uninitialize();
251 
252         return MOS_STATUS_SUCCESS;
253     }
254 
Initialize(void * settings)255     MOS_STATUS VvcPipeline::Initialize(void *settings)
256     {
257         DECODE_FUNC_CALL();
258         DECODE_CHK_STATUS(DecodePipeline::Initialize(settings));
259         m_basicFeature = dynamic_cast<VvcBasicFeature*>(m_featureManager->GetFeature(FeatureIDs::basicFeature));
260         DECODE_CHK_NULL(m_basicFeature);
261 
262         DECODE_CHK_STATUS(InitMmcState());
263 
264         return MOS_STATUS_SUCCESS;
265     }
266 
Uninitialize()267     MOS_STATUS VvcPipeline::Uninitialize()
268     {
269         DECODE_FUNC_CALL();
270 
271         for (auto pair : m_packetList)
272         {
273             pair.second->Destroy();
274         }
275 
276         if (m_mmcState != nullptr)
277         {
278             MOS_Delete(m_mmcState);
279         }
280 
281         if (m_allocator && m_basicFeature->m_shortFormatInUse && m_sliceLevelBBArray)
282         {
283             DECODE_CHK_STATUS(m_allocator->Destroy(m_sliceLevelBBArray));
284         }
285         if (m_allocator && m_basicFeature->m_shortFormatInUse && m_tileLevelBBArray)
286         {
287             DECODE_CHK_STATUS(m_allocator->Destroy(m_tileLevelBBArray));
288         }
289 
290 
291         return DecodePipeline::Uninitialize();
292     }
293 
UserFeatureReport()294     MOS_STATUS VvcPipeline::UserFeatureReport()
295     {
296         DECODE_FUNC_CALL();
297         DECODE_CHK_STATUS(DecodePipeline::UserFeatureReport());
298 
299     #ifdef _MMC_SUPPORTED
300         CODECHAL_DEBUG_TOOL(
301             if (m_mmcState != nullptr){
302                 m_mmcState->UpdateUserFeatureKey(&(m_basicFeature->m_destSurface));
303             })
304     #endif
305         return MOS_STATUS_SUCCESS;
306     }
307 
CreateSubPackets(DecodeSubPacketManager & subPacketManager,CodechalSetting & codecSettings)308     MOS_STATUS VvcPipeline::CreateSubPackets(DecodeSubPacketManager &subPacketManager, CodechalSetting &codecSettings)
309     {
310         DECODE_CHK_STATUS(DecodePipeline::CreateSubPackets(subPacketManager, codecSettings));
311 
312         VvcDecodePicPkt *pictureDecodePkt = MOS_New(VvcDecodePicPkt, this, m_hwInterface);
313         DECODE_CHK_NULL(pictureDecodePkt);
314         DECODE_CHK_STATUS(subPacketManager.Register(
315                             DecodePacketId(this, vvcPictureSubPacketId), *pictureDecodePkt));
316 
317         VvcDecodeSlicePkt *sliceDecodePkt = MOS_New(VvcDecodeSlicePkt, this, m_hwInterface);
318         DECODE_CHK_NULL(sliceDecodePkt);
319         DECODE_CHK_STATUS(subPacketManager.Register(
320                             DecodePacketId(this, vvcSliceSubPacketId), *sliceDecodePkt));
321 
322         if(m_decodecp!=nullptr)
323         {
324             auto feature = dynamic_cast<VvcBasicFeature *>(m_featureManager->GetFeature(FeatureIDs::basicFeature));
325             DECODE_CHK_NULL(feature);
326             DecodeSubPacket *cpSubPkt = (DecodeSubPacket *)m_decodecp->CreateDecodeCpIndSubPkt((DecodePipeline *)this, feature->m_mode, m_hwInterface);
327             DECODE_CHK_NULL(cpSubPkt);
328             DECODE_CHK_STATUS(subPacketManager.Register(
329                             DecodePacketId(this, vvcCpSubPacketId), *cpSubPkt));
330         }
331         return MOS_STATUS_SUCCESS;
332     }
333 
InitMmcState()334     MOS_STATUS VvcPipeline::InitMmcState()
335     {
336 #ifdef _MMC_SUPPORTED
337         DECODE_CHK_NULL(m_hwInterface);
338         DECODE_CHK_NULL(m_basicFeature);
339 
340         m_mmcState = MOS_New(DecodeMemComp, m_hwInterface);
341         DECODE_CHK_NULL(m_mmcState);
342         DECODE_CHK_STATUS(m_basicFeature->SetMmcState(m_mmcState->IsMmcEnabled()));
343 #endif
344 
345         return MOS_STATUS_SUCCESS;
346     }
347 
AllocateResources(VvcBasicFeature & basicFeature)348     MOS_STATUS VvcPipeline::AllocateResources(VvcBasicFeature &basicFeature)
349     {
350         DECODE_FUNC_CALL();
351         uint32_t vvcpSliceCommandsSize  = 0;
352         uint32_t vvcpSlicePatchListSize = 0;
353         uint32_t vvcpTileCommandsSize   = 0;
354         uint32_t vvcpTilePatchListSize  = 0;
355 
356         DECODE_CHK_NULL(m_hwInterface);
357         CodechalHwInterfaceNext *hwInterface = dynamic_cast<CodechalHwInterfaceNext *>(m_hwInterface);
358         DECODE_CHK_NULL(hwInterface);
359         DECODE_CHK_STATUS(hwInterface->GetVvcpPrimitiveCommandSize(
360             basicFeature.m_mode, &vvcpSliceCommandsSize, &vvcpSlicePatchListSize, &vvcpTileCommandsSize, &vvcpTilePatchListSize));
361         DECODE_CHK_STATUS(hwInterface->GetVvcpSliceLvlCmdSize(&vvcpSliceCommandsSize));
362         uint32_t size     = MOS_ALIGN_CEIL(vvcpSliceCommandsSize, 64) * basicFeature.m_numSlices;
363         m_sliceLvlBufSize = MOS_ALIGN_CEIL(vvcpSliceCommandsSize, 64);
364 
365         // In VVC short format decode, second level command buffer is programmed by Huc, so not need lock it.
366         if (m_basicFeature->m_shortFormatInUse)
367         {
368             //Slice Level BB Array Allocation
369             if (m_sliceLevelBBArray == nullptr)
370             {
371                 m_sliceLevelBBArray = m_allocator->AllocateBatchBufferArray(
372                     size, 1, CODEC_VVC_BUFFER_ARRAY_SIZE, true, notLockableVideoMem);
373                 DECODE_CHK_NULL(m_sliceLevelBBArray);
374                 PMHW_BATCH_BUFFER &batchBuf = m_sliceLevelBBArray->Fetch();
375                 DECODE_CHK_NULL(batchBuf);
376             }
377             else
378             {
379                 PMHW_BATCH_BUFFER &batchBuf = m_sliceLevelBBArray->Fetch();
380                 DECODE_CHK_NULL(batchBuf);
381                 DECODE_CHK_STATUS(m_allocator->Resize(
382                     batchBuf, size, basicFeature.m_numSlices, notLockableVideoMem));
383             }
384 
385             //Tile Level BB Array Allocation
386             uint32_t tileLvlCmdSize = 0;
387             if (!m_basicFeature->m_vvcPicParams->m_ppsFlags.m_fields.m_ppsRectSliceFlag)  // Raster Scan Mode
388             {
389                 tileLvlCmdSize = vvcpTileCommandsSize * vvcMaxTileRowNum;
390             }
391             else //Rect Scan Mode
392             {
393                 tileLvlCmdSize = (m_basicFeature->m_numSlices + m_basicFeature->m_tileCols * m_basicFeature->m_tileRows) * vvcpTileCommandsSize;
394             }
395             tileLvlCmdSize   = MOS_ALIGN_CEIL(tileLvlCmdSize, 64);
396             m_tileLvlBufSize = tileLvlCmdSize;
397             if (m_tileLevelBBArray == nullptr)
398             {
399                 m_tileLevelBBArray          = m_allocator->AllocateBatchBufferArray(tileLvlCmdSize, 1, CODEC_VVC_BUFFER_ARRAY_SIZE, true, notLockableVideoMem);
400                 PMHW_BATCH_BUFFER&BatchBuf  = m_tileLevelBBArray->Fetch();
401                 DECODE_CHK_NULL(BatchBuf);
402             }
403             else
404             {
405                 PMHW_BATCH_BUFFER &batchBuf = m_tileLevelBBArray->Fetch();
406                 DECODE_CHK_NULL(batchBuf);
407                 DECODE_CHK_STATUS(m_allocator->Resize(
408                     batchBuf, tileLvlCmdSize, 1, notLockableVideoMem));
409             }
410 
411         }
412 
413         return MOS_STATUS_SUCCESS;
414     }
415 
GetSliceLvlCmdBuffer()416     MHW_BATCH_BUFFER *VvcPipeline::GetSliceLvlCmdBuffer()
417     {
418         if (m_sliceLevelBBArray == nullptr)
419         {
420             return nullptr;
421         }
422         return m_sliceLevelBBArray->Peek();
423     }
424 
GetTileLvlCmdBuffer()425     MHW_BATCH_BUFFER *VvcPipeline::GetTileLvlCmdBuffer()
426     {
427         if (m_tileLevelBBArray == nullptr)
428         {
429             return nullptr;
430         }
431         return m_tileLevelBBArray->Peek();
432     }
433 
434  #if USE_CODECHAL_DEBUG_TOOL
DumpParams(VvcBasicFeature & basicFeature)435     MOS_STATUS VvcPipeline::DumpParams(VvcBasicFeature &basicFeature)
436     {
437         m_debugInterface->m_bufferDumpFrameNum = basicFeature.m_frameNum;
438 
439         DECODE_CHK_STATUS(DumpPicParams(basicFeature.m_vvcPicParams, basicFeature.m_shortFormatInUse));
440         DECODE_CHK_STATUS(DumpApsAlfData(basicFeature.m_alfApsArray, vvcMaxAlfNum));
441         DECODE_CHK_STATUS(DumpApsLmcsData(basicFeature.m_lmcsApsArray, vvcMaxLmcsNum));
442         DECODE_CHK_STATUS(DumpApsQuantMatrix(basicFeature.m_scalingListArray, vvcMaxScalingMatrixNum));
443         DECODE_CHK_STATUS(DumpTileParams(basicFeature.m_tileParams, basicFeature.m_vvcPicParams->m_ppsNumExpTileColumnsMinus1 + basicFeature.m_vvcPicParams->m_ppsNumExpTileRowsMinus1 + 2));
444         DECODE_CHK_STATUS(DumpSubpicParams(basicFeature.m_subPicParams, (basicFeature.m_vvcPicParams->m_spsFlags0.m_fields.m_spsSubpicInfoPresentFlag && basicFeature.m_vvcPicParams->m_spsNumSubpicsMinus1 > 0)? (basicFeature.m_vvcPicParams->m_spsNumSubpicsMinus1+1) : 0));
445         DECODE_CHK_STATUS(DumpSliceStructParams(basicFeature.m_sliceStructParams, ((basicFeature.m_vvcPicParams->m_ppsFlags.m_fields.m_ppsRectSliceFlag && basicFeature.m_vvcPicParams->m_numSliceStructsMinus1 > 0))? (basicFeature.m_vvcPicParams->m_numSliceStructsMinus1 + 1) : 0));
446         DECODE_CHK_STATUS(DumpRplStructParams(basicFeature.m_rplParams, basicFeature.m_vvcPicParams->m_numRefPicListStructs, basicFeature.m_shortFormatInUse));
447         DECODE_CHK_STATUS(DumpSliceParams(basicFeature.m_vvcSliceParams, basicFeature.m_numSlices, basicFeature.m_shortFormatInUse));
448         DECODE_CHK_STATUS(DumpBitstream(&basicFeature.m_resDataBuffer.OsResource, basicFeature.m_dataSize, 0));
449 
450         return MOS_STATUS_SUCCESS;
451     }
452 
DumpPicParams(CodecVvcPicParams * picParams,bool shortFormatInUse)453     MOS_STATUS VvcPipeline::DumpPicParams(
454         CodecVvcPicParams *picParams,
455         bool               shortFormatInUse)
456     {
457         CODECHAL_DEBUG_FUNCTION_ENTER;
458 
459         if (picParams == nullptr)
460         {
461             return MOS_STATUS_SUCCESS;
462         }
463 
464         if (m_debugInterface->DumpIsEnabled(CodechalDbgAttr::attrPicParams))
465         {
466             const char *fileName = m_debugInterface->CreateFileName(
467                 "_DEC",
468                 CodechalDbgBufferType::bufPicParams,
469                 CodechalDbgExtType::txt);
470 
471             if (m_debugInterface->DumpIsEnabled(CodechalDbgAttr::attrEnableFastDump))
472             {
473                 MediaDebugFastDump::Dump(
474                     (uint8_t *)picParams,
475                     fileName,
476                     sizeof(CodecVvcPicParams),
477                     0);
478             }
479             else
480             {
481                 DumpDecodeVvcPicParams(picParams, fileName, shortFormatInUse);
482             }
483         }
484 
485         return MOS_STATUS_SUCCESS;
486     }
487 
DumpApsAlfData(CodecVvcAlfData * alfDataBuf,uint32_t numAlf)488     MOS_STATUS VvcPipeline::DumpApsAlfData(
489             CodecVvcAlfData *alfDataBuf,
490             uint32_t        numAlf)
491     {
492         CODECHAL_DEBUG_FUNCTION_ENTER;
493 
494         if (alfDataBuf == nullptr)
495         {
496             return MOS_STATUS_SUCCESS;
497         }
498 
499         if (m_debugInterface->DumpIsEnabled(CodechalDbgAttr::attrAlfData))
500         {
501             const char *fileName = m_debugInterface->CreateFileName(
502                 "_DEC",
503                 CodechalDbgBufferType::bufAlfData,
504                 CodechalDbgExtType::txt);
505 
506             if (m_debugInterface->DumpIsEnabled(CodechalDbgAttr::attrEnableFastDump))
507             {
508                 MediaDebugFastDump::Dump(
509                     (uint8_t *)alfDataBuf,
510                     fileName,
511                     sizeof(CodecVvcAlfData) * numAlf,
512                     0);
513             }
514             else
515             {
516                 DumpDecodeVvcAlfParams(alfDataBuf, numAlf, fileName);
517             }
518         }
519 
520         return MOS_STATUS_SUCCESS;
521     }
522 
DumpApsLmcsData(CodecVvcLmcsData * lmcsDataBuf,uint32_t numLmcs)523     MOS_STATUS VvcPipeline::DumpApsLmcsData(
524             CodecVvcLmcsData *lmcsDataBuf,
525             uint32_t         numLmcs)
526     {
527         CODECHAL_DEBUG_FUNCTION_ENTER;
528 
529         if (lmcsDataBuf == nullptr)
530         {
531             return MOS_STATUS_SUCCESS;
532         }
533 
534         if (m_debugInterface->DumpIsEnabled(CodechalDbgAttr::attrLmcsData))
535         {
536             const char *fileName = m_debugInterface->CreateFileName(
537                 "_DEC",
538                 CodechalDbgBufferType::bufLmcsData,
539                 CodechalDbgExtType::txt);
540 
541             if (m_debugInterface->DumpIsEnabled(CodechalDbgAttr::attrEnableFastDump))
542             {
543                 MediaDebugFastDump::Dump(
544                     (uint8_t *)lmcsDataBuf,
545                     fileName,
546                     sizeof(CodecVvcLmcsData) * numLmcs,
547                     0);
548             }
549             else
550             {
551                 DumpDecodeVvcLmcsParams(lmcsDataBuf, numLmcs, fileName);
552             }
553         }
554 
555         return MOS_STATUS_SUCCESS;
556     }
557 
DumpApsQuantMatrix(CodecVvcQmData * quantMatrixBuf,uint32_t numScalingList)558     MOS_STATUS VvcPipeline::DumpApsQuantMatrix(
559             CodecVvcQmData *quantMatrixBuf,
560             uint32_t        numScalingList)
561     {
562         CODECHAL_DEBUG_FUNCTION_ENTER;
563 
564         if (quantMatrixBuf == nullptr)
565         {
566             return MOS_STATUS_SUCCESS;
567         }
568 
569         if (m_debugInterface->DumpIsEnabled(CodechalDbgAttr::attrIqParams))
570         {
571             const char *fileName = m_debugInterface->CreateFileName(
572                 "_DEC",
573                 CodechalDbgBufferType::bufIqParams,
574                 CodechalDbgExtType::txt);
575 
576             if(m_debugInterface->DumpIsEnabled(CodechalDbgAttr::attrEnableFastDump))
577             {
578                 MediaDebugFastDump::Dump(
579                     (uint8_t *)quantMatrixBuf,
580                     fileName,
581                     sizeof(CodecVvcQmData) * numScalingList,
582                     0);
583             }
584             else
585             {
586                 DumpDecodeVvcIqParams(quantMatrixBuf, numScalingList, fileName);
587             }
588         }
589 
590         return MOS_STATUS_SUCCESS;
591     }
592 
DumpTileParams(CodecVvcTileParam * tileParams,uint32_t numElements)593     MOS_STATUS VvcPipeline::DumpTileParams(
594             CodecVvcTileParam *tileParams,
595             uint32_t          numElements)
596     {
597         CODECHAL_DEBUG_FUNCTION_ENTER;
598 
599         if (tileParams == nullptr)
600         {
601             return MOS_STATUS_SUCCESS;
602         }
603 
604         if (m_debugInterface->DumpIsEnabled(CodechalDbgAttr::attrTileParams))
605         {
606             const char *fileName = m_debugInterface->CreateFileName(
607                 "_DEC",
608                 CodechalDbgBufferType::bufTileParams,
609                 CodechalDbgExtType::txt);
610 
611             if (m_debugInterface->DumpIsEnabled(CodechalDbgAttr::attrEnableFastDump))
612             {
613                 MediaDebugFastDump::Dump(
614                     (uint8_t *)tileParams,
615                     fileName,
616                     sizeof(CodecVvcTileParam) * numElements,
617                     0);
618             }
619             else
620             {
621                 DumpDecodeVvcTileParams(tileParams, numElements, fileName);
622             }
623         }
624 
625         return MOS_STATUS_SUCCESS;
626     }
627 
DumpSubpicParams(CodecVvcSubpicParam * subpicParamsBuf,uint32_t numSubpics)628     MOS_STATUS VvcPipeline::DumpSubpicParams(
629             CodecVvcSubpicParam *subpicParamsBuf,
630             uint32_t            numSubpics)
631     {
632         CODECHAL_DEBUG_FUNCTION_ENTER;
633 
634         if (subpicParamsBuf == nullptr)
635         {
636             return MOS_STATUS_SUCCESS;
637         }
638 
639         if (m_debugInterface->DumpIsEnabled(CodechalDbgAttr::attrSubpicParams))
640         {
641             const char *fileName = m_debugInterface->CreateFileName(
642                 "_DEC",
643                 CodechalDbgBufferType::bufSubpicParams,
644                 CodechalDbgExtType::txt);
645 
646             if (m_debugInterface->DumpIsEnabled(CodechalDbgAttr::attrEnableFastDump))
647             {
648                 MediaDebugFastDump::Dump(
649                     (uint8_t *)subpicParamsBuf,
650                     fileName,
651                     sizeof(CodecVvcSubpicParam) * numSubpics,
652                     0);
653             }
654             else
655             {
656                 DumpDecodeVvcSubpicParams(subpicParamsBuf, numSubpics, fileName);
657             }
658         }
659 
660         return MOS_STATUS_SUCCESS;
661     }
662 
DumpSliceStructParams(CodecVvcSliceStructure * sliceStructParamsBuf,uint32_t numSlcStruct)663     MOS_STATUS VvcPipeline::DumpSliceStructParams(
664             CodecVvcSliceStructure *sliceStructParamsBuf,
665             uint32_t                numSlcStruct)
666     {
667         CODECHAL_DEBUG_FUNCTION_ENTER;
668 
669         if (sliceStructParamsBuf == nullptr)
670         {
671             return MOS_STATUS_SUCCESS;
672         }
673 
674         if (m_debugInterface->DumpIsEnabled(CodechalDbgAttr::attrSliceStruct))
675         {
676             const char *fileName = m_debugInterface->CreateFileName(
677                 "_DEC",
678                 CodechalDbgBufferType::bufSliceStruct,
679                 CodechalDbgExtType::txt);
680 
681             if (m_debugInterface->DumpIsEnabled(CodechalDbgAttr::attrEnableFastDump))
682             {
683                 MediaDebugFastDump::Dump(
684                     (uint8_t *)sliceStructParamsBuf,
685                     fileName,
686                     sizeof(CodecVvcSliceStructure) * numSlcStruct,
687                     0);
688             }
689             else
690             {
691                 DumpDecodeVvcSliceStructureParams(sliceStructParamsBuf, numSlcStruct, fileName);
692             }
693         }
694 
695         return MOS_STATUS_SUCCESS;
696     }
697 
DumpRplStructParams(CodecVvcRplStructure * rplParams,uint32_t numRpls,bool shortFormatInUse)698     MOS_STATUS VvcPipeline::DumpRplStructParams(
699             CodecVvcRplStructure *rplParams,
700             uint32_t             numRpls,
701             bool                 shortFormatInUse)
702     {
703         CODECHAL_DEBUG_FUNCTION_ENTER;
704 
705         if (rplParams == nullptr)
706         {
707             return MOS_STATUS_SUCCESS;
708         }
709 
710         if (m_debugInterface->DumpIsEnabled(CodechalDbgAttr::attrRplStruct))
711         {
712             const char *fileName = m_debugInterface->CreateFileName(
713                 "_DEC",
714                 CodechalDbgBufferType::bufRplStruct,
715                 CodechalDbgExtType::txt);
716 
717             if (m_debugInterface->DumpIsEnabled(CodechalDbgAttr::attrEnableFastDump))
718             {
719                 MediaDebugFastDump::Dump(
720                     (uint8_t *)rplParams,
721                     fileName,
722                     sizeof(CodecVvcRplStructure) * numRpls,
723                     0);
724             }
725             else
726             {
727                 DumpDecodeVvcRplStructureParams(rplParams, numRpls, fileName);
728             }
729         }
730 
731         return MOS_STATUS_SUCCESS;
732     }
733 
DumpSliceParams(CodecVvcSliceParams * sliceParams,uint32_t numSlices,bool shortFormatInUse)734     MOS_STATUS VvcPipeline::DumpSliceParams(
735         CodecVvcSliceParams* sliceParams,
736         uint32_t             numSlices,
737         bool                 shortFormatInUse)
738     {
739         CODECHAL_DEBUG_FUNCTION_ENTER;
740 
741         if (sliceParams == nullptr)
742         {
743             return MOS_STATUS_SUCCESS;
744         }
745 
746         if (m_debugInterface->DumpIsEnabled(CodechalDbgAttr::attrSlcParams))
747         {
748             const char *fileName = m_debugInterface->CreateFileName(
749                 "_DEC",
750                 CodechalDbgBufferType::bufSlcParams,
751                 CodechalDbgExtType::txt);
752 
753             if (m_debugInterface->DumpIsEnabled(CodechalDbgAttr::attrEnableFastDump))
754             {
755                 MediaDebugFastDump::Dump(
756                     (uint8_t *)sliceParams,
757                     fileName,
758                     sizeof(CodecVvcSliceParams) * numSlices,
759                     0);
760             }
761             else
762             {
763                 DumpDecodeVvcSliceParams(sliceParams, numSlices, fileName, shortFormatInUse);
764             }
765         }
766 
767         return MOS_STATUS_SUCCESS;
768     }
769 
DumpDecodeVvcPicParams(CodecVvcPicParams * picParams,std::string fileName,bool shortFormatInUse)770     void DumpDecodeVvcPicParams(CodecVvcPicParams *picParams, std::string fileName, bool shortFormatInUse)
771     {
772         std::ostringstream oss;
773         oss.setf(std::ios::showbase | std::ios::uppercase);
774 
775         // SPS info
776         oss << "spsPicWidthMaxInLumaSamples: " << +picParams->m_spsPicWidthMaxInLumaSamples << std::endl;
777         oss << "spsPicHeightMaxInLumaSamples: " << +picParams->m_spsPicHeightMaxInLumaSamples << std::endl;
778 
779         oss << "spsNumSubpicsMinus1: " << +picParams->m_spsNumSubpicsMinus1 << std::endl;
780         oss << "spsSubpicIdLenMinus1: " << +picParams->m_spsSubpicIdLenMinus1 << std::endl;
781         oss << "spsChromaFormatIdc: " << +picParams->m_spsChromaFormatIdc << std::endl;
782         oss << "spsBitdepthMinus8: " << +picParams->m_spsBitdepthMinus8 << std::endl;
783         oss << "spsLog2CtuSizeMinus5: " << +picParams->m_spsLog2CtuSizeMinus5 << std::endl;
784         oss << "spsLog2MaxPicOrderCntLsbMinus4: " << +picParams->m_spsLog2MaxPicOrderCntLsbMinus4 << std::endl;
785         oss << "spsLog2MinLumaCodingBlockSizeMinus2: " << +picParams->m_spsLog2MinLumaCodingBlockSizeMinus2 << std::endl;
786         oss << "spsPocMsbCycleLenMinus1: " << +picParams->m_spsPocMsbCycleLenMinus1 << std::endl;
787         oss << "numExtraPhBits: " << +picParams->m_numExtraPhBits << std::endl;
788         oss << "numExtraShBits: " << +picParams->m_numExtraShBits << std::endl;
789         oss << "spsLog2TransformSkipMaxSizeMinus2: " << +picParams->m_spsLog2TransformSkipMaxSizeMinus2 << std::endl;
790 
791         for (auto i = 0; i < 3; i++)
792         {
793             for (auto j = 0; j < 76; j++)
794             {
795                 oss << "chromaQpTable[" << +i << "][" << +j << "]: " << +picParams->m_chromaQpTable[i][j] << std::endl;
796             }
797         }
798 
799         for (auto i = 0; i < 2; i++)
800         {
801             oss << "spsNumRefPicLists[" << +i << "]: " << +picParams->m_spsNumRefPicLists[i] << std::endl;
802         }
803         oss << "spsSixMinusMaxNumMergeCand: " << +picParams->m_spsSixMinusMaxNumMergeCand << std::endl;
804         oss << "spsFiveMinusMaxNumSubblockMergeCand: " << +picParams->m_spsFiveMinusMaxNumSubblockMergeCand << std::endl;
805         oss << "spsMaxNumMergeCandMinusMaxNumGpmCand: " << +picParams->m_spsMaxNumMergeCandMinusMaxNumGpmCand << std::endl;
806         oss << "spsLog2ParallelMergeLevelMinus2: " << +picParams->m_spsLog2ParallelMergeLevelMinus2 << std::endl;
807         oss << "spsMinQpPrimeTs: " << +picParams->m_spsMinQpPrimeTs << std::endl;
808         oss << "spsSixMinusMaxNumIbcMergeCand: " << +picParams->m_spsSixMinusMaxNumIbcMergeCand << std::endl;
809         oss << "spsNumLadfIntervalsMinus2: " << +picParams->m_spsNumLadfIntervalsMinus2 << std::endl;
810         oss << "spsLadfLowestIntervalQpOffset: " << +picParams->m_spsLadfLowestIntervalQpOffset << std::endl;
811         for (auto i = 0; i < 4; i++)
812         {
813             oss << "spsLadfQpOffset[" << +i << "]: " << +picParams->m_spsLadfQpOffset[i] << std::endl;
814         }
815         for (auto i = 0; i < 4; i++)
816         {
817             oss << "spsLadfDeltaThresholdMinus1[" << +i << "]: " << +picParams->m_spsLadfDeltaThresholdMinus1[i] << std::endl;
818         }
819 
820         oss << "spsFlags0 value: " << +picParams->m_spsFlags0.m_value << std::endl;
821         oss << "spsSubpicInfoPresentFlag: " << +picParams->m_spsFlags0.m_fields.m_spsSubpicInfoPresentFlag << std::endl;
822         oss << "spsIndependentSubpicsFlag: " << +picParams->m_spsFlags0.m_fields.m_spsIndependentSubpicsFlag << std::endl;
823         oss << "spsSubpicSameSizeFlag: " << +picParams->m_spsFlags0.m_fields.m_spsSubpicSameSizeFlag << std::endl;
824         oss << "spsEntropyCodingSyncEnabledFlag: " << +picParams->m_spsFlags0.m_fields.m_spsEntropyCodingSyncEnabledFlag << std::endl;
825         oss << "spsEntryPointOffsetsPresentFlag: " << +picParams->m_spsFlags0.m_fields.m_spsEntryPointOffsetsPresentFlag << std::endl;
826         oss << "spsPocMsbCycleFlag: " << +picParams->m_spsFlags0.m_fields.m_spsPocMsbCycleFlag << std::endl;
827         oss << "spsPartitionConstraintsOverrideEnabledFlag: " << +picParams->m_spsFlags0.m_fields.m_spsPartitionConstraintsOverrideEnabledFlag << std::endl;
828         oss << "spsQtbttDualTreeIntraFlag: " << +picParams->m_spsFlags0.m_fields.m_spsQtbttDualTreeIntraFlag << std::endl;
829         oss << "spsMaxLumaTransformSize64Flag: " << +picParams->m_spsFlags0.m_fields.m_spsMaxLumaTransformSize64Flag << std::endl;
830         oss << "spsTransformSkipEnabledFlag: " << +picParams->m_spsFlags0.m_fields.m_spsTransformSkipEnabledFlag << std::endl;
831         oss << "spsBdpcmEnabledFlag: " << +picParams->m_spsFlags0.m_fields.m_spsBdpcmEnabledFlag << std::endl;
832         oss << "spsMtsEnabledFlag: " << +picParams->m_spsFlags0.m_fields.m_spsMtsEnabledFlag << std::endl;
833         oss << "spsExplicitMtsIntraEnabledFlag: " << +picParams->m_spsFlags0.m_fields.m_spsExplicitMtsIntraEnabledFlag << std::endl;
834         oss << "spsExplicitMtsInterEnabledFlag: " << +picParams->m_spsFlags0.m_fields.m_spsExplicitMtsInterEnabledFlag << std::endl;
835         oss << "spsLfnstEnabledFlag: " << +picParams->m_spsFlags0.m_fields.m_spsLfnstEnabledFlag << std::endl;
836         oss << "spsJointCbcrEnabledFlag: " << +picParams->m_spsFlags0.m_fields.m_spsJointCbcrEnabledFlag << std::endl;
837         oss << "spsSameQpTableForChromaFlag: " << +picParams->m_spsFlags0.m_fields.m_spsSameQpTableForChromaFlag << std::endl;
838         oss << "spsSaoEnabledFlag: " << +picParams->m_spsFlags0.m_fields.m_spsSaoEnabledFlag << std::endl;
839         oss << "spsAlfEnabledFlag: " << +picParams->m_spsFlags0.m_fields.m_spsAlfEnabledFlag << std::endl;
840         oss << "spsCcalfEnabledFlag: " << +picParams->m_spsFlags0.m_fields.m_spsCcalfEnabledFlag << std::endl;
841         oss << "spsLmcsEnabledFlag: " << +picParams->m_spsFlags0.m_fields.m_spsLmcsEnabledFlag << std::endl;
842         oss << "spsLongTermRefPicsFlag: " << +picParams->m_spsFlags0.m_fields.m_spsLongTermRefPicsFlag << std::endl;
843         oss << "spsInterLayerPredictionEnabledFlag: " << +picParams->m_spsFlags0.m_fields.m_spsInterLayerPredictionEnabledFlag << std::endl;
844         oss << "spsIdrRplPresentFlag: " << +picParams->m_spsFlags0.m_fields.m_spsIdrRplPresentFlag << std::endl;
845 
846         oss << "spsFlags1 value: " << +picParams->m_spsFlags1.m_value << std::endl;
847         oss << "spsTemporalMvpEnabledFlag: " << +picParams->m_spsFlags1.m_fields.m_spsTemporalMvpEnabledFlag << std::endl;
848         oss << "spsSbtmvpEnabledFlag: " << +picParams->m_spsFlags1.m_fields.m_spsSbtmvpEnabledFlag << std::endl;
849         oss << "spsAmvrEnabledFlag: " << +picParams->m_spsFlags1.m_fields.m_spsAmvrEnabledFlag << std::endl;
850         oss << "spsBdofEnabledFlag: " << +picParams->m_spsFlags1.m_fields.m_spsBdofEnabledFlag << std::endl;
851         oss << "spsBdofControlPresentInPhFlag: " << +picParams->m_spsFlags1.m_fields.m_spsBdofControlPresentInPhFlag << std::endl;
852         oss << "spsSmvdEnabledFlag: " << +picParams->m_spsFlags1.m_fields.m_spsSmvdEnabledFlag << std::endl;
853         oss << "spsDmvrEnabledFlag: " << +picParams->m_spsFlags1.m_fields.m_spsDmvrEnabledFlag << std::endl;
854         oss << "spsDmvrControlPresentInPhFlag: " << +picParams->m_spsFlags1.m_fields.m_spsDmvrControlPresentInPhFlag << std::endl;
855         oss << "spsMmvdEnabledFlag: " << +picParams->m_spsFlags1.m_fields.m_spsMmvdEnabledFlag << std::endl;
856         oss << "spsMmvdFullpelOnlyEnabledFlag: " << +picParams->m_spsFlags1.m_fields.m_spsMmvdFullpelOnlyEnabledFlag << std::endl;
857         oss << "spsSbtEnabledFlag: " << +picParams->m_spsFlags1.m_fields.m_spsSbtEnabledFlag << std::endl;
858         oss << "spsAffineEnabledFlag: " << +picParams->m_spsFlags1.m_fields.m_spsAffineEnabledFlag << std::endl;
859         oss << "sps6paramAffineEnabledFlag: " << +picParams->m_spsFlags1.m_fields.m_sps6paramAffineEnabledFlag << std::endl;
860         oss << "spsAffineAmvrEnabledFlag: " << +picParams->m_spsFlags1.m_fields.m_spsAffineAmvrEnabledFlag << std::endl;
861         oss << "spsAffineProfEnabledFlag: " << +picParams->m_spsFlags1.m_fields.m_spsAffineProfEnabledFlag << std::endl;
862         oss << "spsProfControlPresentInPhFlag: " << +picParams->m_spsFlags1.m_fields.m_spsProfControlPresentInPhFlag << std::endl;
863         oss << "spsBcwEnabledFlag: " << +picParams->m_spsFlags1.m_fields.m_spsBcwEnabledFlag << std::endl;
864         oss << "spsCiipEnabledFlag: " << +picParams->m_spsFlags1.m_fields.m_spsCiipEnabledFlag << std::endl;
865         oss << "spsGpmEnabledFlag: " << +picParams->m_spsFlags1.m_fields.m_spsGpmEnabledFlag << std::endl;
866         oss << "spsIspEnabledFlag: " << +picParams->m_spsFlags1.m_fields.m_spsIspEnabledFlag << std::endl;
867         oss << "spsMrlEnabledFlag: " << +picParams->m_spsFlags1.m_fields.m_spsMrlEnabledFlag << std::endl;
868         oss << "spsMipEnabledFlag: " << +picParams->m_spsFlags1.m_fields.m_spsMipEnabledFlag << std::endl;
869         oss << "spsCclmEnabledFlag: " << +picParams->m_spsFlags1.m_fields.m_spsCclmEnabledFlag << std::endl;
870         oss << "spsChromaHorizontalCollocatedFlag: " << +picParams->m_spsFlags1.m_fields.m_spsChromaHorizontalCollocatedFlag << std::endl;
871         oss << "spsChromaVerticalCollocatedFlag: " << +picParams->m_spsFlags1.m_fields.m_spsChromaVerticalCollocatedFlag << std::endl;
872 
873         oss << "spsFlags2 value: " << +picParams->m_spsFlags2.m_value << std::endl;
874         oss << "spsPaletteEnabledFlag: " << +picParams->m_spsFlags2.m_fields.m_spsPaletteEnabledFlag << std::endl;
875         oss << "spsActEnabledFlag: " << +picParams->m_spsFlags2.m_fields.m_spsActEnabledFlag << std::endl;
876         oss << "spsIbcEnabledFlag: " << +picParams->m_spsFlags2.m_fields.m_spsIbcEnabledFlag << std::endl;
877         oss << "spsLadfEnabledFlag: " << +picParams->m_spsFlags2.m_fields.m_spsLadfEnabledFlag << std::endl;
878         oss << "spsExplicitScalingListEnabledFlag: " << +picParams->m_spsFlags2.m_fields.m_spsExplicitScalingListEnabledFlag << std::endl;
879         oss << "spsScalingMatrixForLfnstDisabledFlag: " << +picParams->m_spsFlags2.m_fields.m_spsScalingMatrixForLfnstDisabledFlag << std::endl;
880         oss << "spsScalingMatrixForAlternativeColourSpaceDisabledFlag: " << +picParams->m_spsFlags2.m_fields.m_spsScalingMatrixForAlternativeColourSpaceDisabledFlag << std::endl;
881         oss << "spsScalingMatrixDesignatedColourSpaceFlag: " << +picParams->m_spsFlags2.m_fields.m_spsScalingMatrixDesignatedColourSpaceFlag << std::endl;
882         oss << "spsDepQuantEnabledFlag: " << +picParams->m_spsFlags2.m_fields.m_spsDepQuantEnabledFlag << std::endl;
883         oss << "spsSignDataHidingEnabledFlag: " << +picParams->m_spsFlags2.m_fields.m_spsSignDataHidingEnabledFlag << std::endl;
884         oss << "spsVirtualBoundariesEnabledFlag: " << +picParams->m_spsFlags2.m_fields.m_spsVirtualBoundariesEnabledFlag << std::endl;
885         oss << "spsVirtualBoundariesPresentFlag: " << +picParams->m_spsFlags2.m_fields.m_spsVirtualBoundariesPresentFlag << std::endl;
886         oss << "spsWeightedPredFlag: " << +picParams->m_spsFlags2.m_fields.m_spsWeightedPredFlag << std::endl;
887         oss << "spsWeightedBipredFlag: " << +picParams->m_spsFlags2.m_fields.m_spsWeightedBipredFlag << std::endl;
888 
889         // PPS info
890         oss << "ppsPicWidthInLumaSamples: " << +picParams->m_ppsPicWidthInLumaSamples << std::endl;
891         oss << "ppsPicHeightInLumaSamples: " << +picParams->m_ppsPicHeightInLumaSamples << std::endl;
892         oss << "numVerVirtualBoundaries: " << +picParams->m_numVerVirtualBoundaries << std::endl;
893         oss << "numHorVirtualBoundaries: " << +picParams->m_numHorVirtualBoundaries << std::endl;
894         for (auto i = 0; i < 3; i++)
895         {
896             oss << "virtualBoundaryPosX[" << +i << "]: " << +picParams->m_virtualBoundaryPosX[i] << std::endl;
897         }
898         for (auto i = 0; i < 3; i++)
899         {
900             oss << "virtualBoundaryPosY[" << +i << "]: " << +picParams->m_virtualBoundaryPosY[i] << std::endl;
901         }
902 
903         oss << "ppsScalingWinLeftOffset: " << +picParams->m_ppsScalingWinLeftOffset << std::endl;
904         oss << "ppsScalingWinRightOffset: " << +picParams->m_ppsScalingWinRightOffset << std::endl;
905         oss << "ppsScalingWinTopOffset: " << +picParams->m_ppsScalingWinTopOffset << std::endl;
906         oss << "ppsScalingWinBottomOffset: " << +picParams->m_ppsScalingWinBottomOffset << std::endl;
907 
908         oss << "ppsNumExpTileColumnsMinus1: " << +picParams->m_ppsNumExpTileColumnsMinus1 << std::endl;
909         oss << "ppsNumExpTileRowsMinus1: " << +picParams->m_ppsNumExpTileRowsMinus1 << std::endl;
910         oss << "ppsNumSlicesInPicMinus1: " << +picParams->m_ppsNumSlicesInPicMinus1 << std::endl;
911         for (auto i = 0; i < 2; i++)
912         {
913             oss << "ppsNumRefIdxDefaultActiveMinus1[" << +i << "]: " << +picParams->m_ppsNumRefIdxDefaultActiveMinus1[i] << std::endl;
914         }
915         oss << "ppsPicWidthMinusWraparoundOffset: " << +picParams->m_ppsPicWidthMinusWraparoundOffset << std::endl;
916         oss << "ppsInitQpMinus26: " << +picParams->m_ppsInitQpMinus26 << std::endl;
917         oss << "ppsCbQpOffset: " << +picParams->m_ppsCbQpOffset << std::endl;
918         oss << "ppsCrQpOffset: " << +picParams->m_ppsCrQpOffset << std::endl;
919         oss << "ppsJointCbcrQpOffsetValue: " << +picParams->m_ppsJointCbcrQpOffsetValue << std::endl;
920         oss << "ppsChromaQpOffsetListLenMinus1: " << +picParams->m_ppsChromaQpOffsetListLenMinus1 << std::endl;
921         for (auto i = 0; i < 6; i++)
922         {
923             oss << "ppsCbQpOffsetList[" << +i << "]: " << +picParams->m_ppsCbQpOffsetList[i] << std::endl;
924         }
925         for (auto i = 0; i < 6; i++)
926         {
927             oss << "ppsCrQpOffsetList[" << +i << "]: " << +picParams->m_ppsCrQpOffsetList[i] << std::endl;
928         }
929         for (auto i = 0; i < 6; i++)
930         {
931             oss << "ppsJointCbcrQpOffsetList[" << +i << "]: " << +picParams->m_ppsJointCbcrQpOffsetList[i] << std::endl;
932         }
933 
934         oss << "numScalingMatrixBuffers: " << +picParams->m_numScalingMatrixBuffers << std::endl;
935         oss << "numAlfBuffers: " << +picParams->m_numAlfBuffers << std::endl;
936         oss << "numLmcsBuffers: " << +picParams->m_numLmcsBuffers << std::endl;
937         oss << "numRefPicListStructs: " << +picParams->m_numRefPicListStructs << std::endl;
938         oss << "numSliceStructsMinus1: " << +picParams->m_numSliceStructsMinus1 << std::endl;
939 
940         oss << "ppsFlags value: " << +picParams->m_ppsFlags.m_value << std::endl;
941         oss << "ppsOutputFlagPresentFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsOutputFlagPresentFlag << std::endl;
942         oss << "ppsLoopFilterAcrossTilesEnabledFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsLoopFilterAcrossTilesEnabledFlag << std::endl;
943         oss << "ppsRectSliceFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsRectSliceFlag << std::endl;
944         oss << "ppsSingleSlicePerSubpicFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsSingleSlicePerSubpicFlag << std::endl;
945         oss << "ppsLoopFilterAcrossSlicesEnabledFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsLoopFilterAcrossSlicesEnabledFlag << std::endl;
946         oss << "ppsCabacInitPresentFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsCabacInitPresentFlag << std::endl;
947         oss << "ppsRpl1IdxPresentFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsRpl1IdxPresentFlag << std::endl;
948         oss << "ppsWeightedPredFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsWeightedPredFlag << std::endl;
949         oss << "ppsWeightedBipredFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsWeightedBipredFlag << std::endl;
950         oss << "ppsRefWraparoundEnabledFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsRefWraparoundEnabledFlag << std::endl;
951         oss << "ppsCuQpDeltaEnabledFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsCuQpDeltaEnabledFlag << std::endl;
952         oss << "ppsChroma_toolOffsetsPresentFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsChroma_toolOffsetsPresentFlag << std::endl;
953         oss << "ppsSliceChromaQpOffsetsPresentFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsSliceChromaQpOffsetsPresentFlag << std::endl;
954         oss << "ppsCuChromaQpOffsetListEnabledFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsCuChromaQpOffsetListEnabledFlag << std::endl;
955         oss << "ppsDeblockingFilterOverrideEnabledFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsDeblockingFilterOverrideEnabledFlag << std::endl;
956         oss << "ppsDeblockingFilterDisabledFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsDeblockingFilterDisabledFlag << std::endl;
957         oss << "ppsDbfInfoInPhFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsDbfInfoInPhFlag << std::endl;
958         oss << "ppsRplInfoInPhFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsRplInfoInPhFlag << std::endl;
959         oss << "ppsSaoInfoInPhFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsSaoInfoInPhFlag << std::endl;
960         oss << "ppsAlfInfoInPhFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsAlfInfoInPhFlag << std::endl;
961         oss << "ppsWpInfoInPhFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsWpInfoInPhFlag << std::endl;
962         oss << "ppsQpDeltaInfoInPhFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsQpDeltaInfoInPhFlag << std::endl;
963         oss << "ppsPictureHeaderExtensionPresentFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsPictureHeaderExtensionPresentFlag << std::endl;
964         oss << "ppsSliceHeaderExtensionPresentFlag: " << +picParams->m_ppsFlags.m_fields.m_ppsSliceHeaderExtensionPresentFlag << std::endl;
965 
966         // PH info
967         oss << "phNumAlfApsIdsLuma: " << +picParams->m_phNumAlfApsIdsLuma << std::endl;
968         for (auto i = 0; i < 7; i++)
969         {
970             oss << "phAlfApsIdLuma[" << +i << "]: " << +picParams->m_phAlfApsIdLuma[i] << std::endl;
971         }
972         oss << "phAlfApsIdChroma: " << +picParams->m_phAlfApsIdChroma << std::endl;
973         oss << "phAlfCcCbApsId: " << +picParams->m_phAlfCcCbApsId << std::endl;
974         oss << "phAlfCcCrApsId: " << +picParams->m_phAlfCcCrApsId << std::endl;
975         oss << "phLmcsApsId: " << +picParams->m_phLmcsApsId << std::endl;
976         oss << "phScalingListApsId: " << +picParams->m_phScalingListApsId << std::endl;
977         oss << "phLog2DiffMinQtMinCbIntraSliceLuma: " << +picParams->m_phLog2DiffMinQtMinCbIntraSliceLuma << std::endl;
978         oss << "phMaxMtt_hierarchyDepthIntraSliceLuma: " << +picParams->m_phMaxMtt_hierarchyDepthIntraSliceLuma << std::endl;
979         oss << "phLog2DiffMaxBtMinQtIntraSliceLuma: " << +picParams->m_phLog2DiffMaxBtMinQtIntraSliceLuma << std::endl;
980         oss << "phLog2DiffMax_ttMinQtIntraSliceLuma: " << +picParams->m_phLog2DiffMax_ttMinQtIntraSliceLuma << std::endl;
981         oss << "phLog2DiffMinQtMinCbIntraSliceChroma: " << +picParams->m_phLog2DiffMinQtMinCbIntraSliceChroma << std::endl;
982         oss << "phMaxMtt_hierarchyDepthIntraSliceChroma: " << +picParams->m_phMaxMtt_hierarchyDepthIntraSliceChroma << std::endl;
983         oss << "phLog2DiffMaxBtMinQtIntraSliceChroma: " << +picParams->m_phLog2DiffMaxBtMinQtIntraSliceChroma << std::endl;
984         oss << "phLog2DiffMax_ttMinQtIntraSliceChroma: " << +picParams->m_phLog2DiffMax_ttMinQtIntraSliceChroma << std::endl;
985         oss << "phCuQpDeltaSubdivIntraSlice: " << +picParams->m_phCuQpDeltaSubdivIntraSlice << std::endl;
986         oss << "phCuChromaQpOffsetSubdivIntraSlice: " << +picParams->m_phCuChromaQpOffsetSubdivIntraSlice << std::endl;
987         oss << "phLog2DiffMinQtMinCbInterSlice: " << +picParams->m_phLog2DiffMinQtMinCbInterSlice << std::endl;
988         oss << "phMaxMtt_hierarchyDepthInterSlice: " << +picParams->m_phMaxMtt_hierarchyDepthInterSlice << std::endl;
989         oss << "phLog2DiffMaxBtMinQtInterSlice: " << +picParams->m_phLog2DiffMaxBtMinQtInterSlice << std::endl;
990         oss << "phLog2DiffMax_ttMinQtInterSlice: " << +picParams->m_phLog2DiffMax_ttMinQtInterSlice << std::endl;
991         oss << "phCuQpDeltaSubdivInterSlice: " << +picParams->m_phCuQpDeltaSubdivInterSlice << std::endl;
992         oss << "phCuChromaQpOffsetSubdivInterSlice: " << +picParams->m_phCuChromaQpOffsetSubdivInterSlice << std::endl;
993         oss << "phCollocatedRefIdx: " << +picParams->m_phCollocatedRefIdx << std::endl;
994         oss << "phQpDelta: " << +picParams->m_phQpDelta << std::endl;
995         oss << "phLumaBetaOffsetDiv2: " << +picParams->m_phLumaBetaOffsetDiv2 << std::endl;
996         oss << "phLumaTcOffsetDiv2: " << +picParams->m_phLumaTcOffsetDiv2 << std::endl;
997         oss << "phCbBetaOffsetDiv2: " << +picParams->m_phCbBetaOffsetDiv2 << std::endl;
998         oss << "phCbTcOffsetDiv2: " << +picParams->m_phCbTcOffsetDiv2 << std::endl;
999         oss << "phCrBetaOffsetDiv2: " << +picParams->m_phCrBetaOffsetDiv2 << std::endl;
1000         oss << "phCrTcOffsetDiv2: " << +picParams->m_phCrTcOffsetDiv2 << std::endl;
1001 
1002         // weighted prediction info
1003         oss << "lumaLog2WeightDenom: " << +picParams->m_wpInfo.m_lumaLog2WeightDenom << std::endl;
1004         oss << "deltaChromaLog2WeightDenom: " << +picParams->m_wpInfo.m_deltaChromaLog2WeightDenom << std::endl;
1005         oss << "numL0Weights: " << +picParams->m_wpInfo.m_numL0Weights << std::endl;
1006         for (auto i = 0; i < 15; i++)
1007         {
1008             oss << "lumaWeightL0Flag[" << +i << "]: " << +picParams->m_wpInfo.m_lumaWeightL0Flag[i] << std::endl;
1009         }
1010         for (auto i = 0; i < 15; i++)
1011         {
1012             oss << "chromaWeightL0Flag[" << +i << "]: " << +picParams->m_wpInfo.m_chromaWeightL0Flag[i] << std::endl;
1013         }
1014         for (auto i = 0; i < 15; i++)
1015         {
1016             oss << "deltaLumaWeightL0[" << +i << "]: " << +picParams->m_wpInfo.m_deltaLumaWeightL0[i] << std::endl;
1017         }
1018         for (auto i = 0; i < 15; i++)
1019         {
1020             oss << "lumaOffsetL0[" << +i << "]: " << +picParams->m_wpInfo.m_lumaOffsetL0[i] << std::endl;
1021         }
1022         for (auto i = 0; i < 15; i++)
1023         {
1024             for (auto j = 0; j < 2; j++)
1025             {
1026                 oss << "deltaChromaWeightL0[" << +i << "][" << +j << "]: " << +picParams->m_wpInfo.m_deltaChromaWeightL0[i][j] << std::endl;
1027             }
1028         }
1029         for (auto i = 0; i < 15; i++)
1030         {
1031             for (auto j = 0; j < 2; j++)
1032             {
1033                 oss << "deltaChromaOffsetL0[" << +i << "][" << +j << "]: " << +picParams->m_wpInfo.m_deltaChromaOffsetL0[i][j] << std::endl;
1034             }
1035         }
1036         oss << "numL1Weights: " << +picParams->m_wpInfo.m_numL1Weights << std::endl;
1037         for (auto i = 0; i < 15; i++)
1038         {
1039             oss << "lumaWeightL1Flag[" << +i << "]: " << +picParams->m_wpInfo.m_lumaWeightL1Flag[i] << std::endl;
1040         }
1041         for (auto i = 0; i < 15; i++)
1042         {
1043             oss << "chromaWeightL1Flag[" << +i << "]: " << +picParams->m_wpInfo.m_chromaWeightL1Flag[i] << std::endl;
1044         }
1045         for (auto i = 0; i < 15; i++)
1046         {
1047             oss << "deltaLumaWeightL1[" << +i << "]: " << +picParams->m_wpInfo.m_deltaLumaWeightL1[i] << std::endl;
1048         }
1049         for (auto i = 0; i < 15; i++)
1050         {
1051             oss << "lumaOffsetL1[" << +i << "]: " << +picParams->m_wpInfo.m_lumaOffsetL1[i] << std::endl;
1052         }
1053         for (auto i = 0; i < 15; i++)
1054         {
1055             for (auto j = 0; j < 2; j++)
1056             {
1057                 oss << "deltaChromaWeightL1[" << +i << "][" << +j << "]: " << +picParams->m_wpInfo.m_deltaChromaWeightL1[i][j] << std::endl;
1058             }
1059         }
1060         for (auto i = 0; i < 15; i++)
1061         {
1062             for (auto j = 0; j < 2; j++)
1063             {
1064                 oss << "deltaChromaOffsetL1[" << +i << "][" << +j << "]: " << +picParams->m_wpInfo.m_deltaChromaOffsetL1[i][j] << std::endl;
1065             }
1066         }
1067 
1068         oss << "phFlags value: " << +picParams->m_phFlags.m_value << std::endl;
1069         oss << "phNonRefPicFlag: " << +picParams->m_phFlags.m_fields.m_phNonRefPicFlag << std::endl;
1070         oss << "phInterSliceAllowedFlag: " << +picParams->m_phFlags.m_fields.m_phInterSliceAllowedFlag << std::endl;
1071         oss << "phAlfEnabledFlag: " << +picParams->m_phFlags.m_fields.m_phAlfEnabledFlag << std::endl;
1072         oss << "phAlfCbEnabledFlag: " << +picParams->m_phFlags.m_fields.m_phAlfCbEnabledFlag << std::endl;
1073         oss << "phAlfCrEnabledFlag: " << +picParams->m_phFlags.m_fields.m_phAlfCrEnabledFlag << std::endl;
1074         oss << "phAlfCcCbEnabledFlag: " << +picParams->m_phFlags.m_fields.m_phAlfCcCbEnabledFlag << std::endl;
1075         oss << "phAlfCcCrEnabledFlag: " << +picParams->m_phFlags.m_fields.m_phAlfCcCrEnabledFlag << std::endl;
1076         oss << "phLmcsEnabledFlag: " << +picParams->m_phFlags.m_fields.m_phLmcsEnabledFlag << std::endl;
1077         oss << "phChromaResidualScaleFlag: " << +picParams->m_phFlags.m_fields.m_phChromaResidualScaleFlag << std::endl;
1078         oss << "phExplicitScalingListEnabledFlag: " << +picParams->m_phFlags.m_fields.m_phExplicitScalingListEnabledFlag << std::endl;
1079         oss << "phVirtualBoundariesPresentFlag: " << +picParams->m_phFlags.m_fields.m_phVirtualBoundariesPresentFlag << std::endl;
1080         oss << "phTemporalMvpEnabledFlag: " << +picParams->m_phFlags.m_fields.m_phTemporalMvpEnabledFlag << std::endl;
1081         oss << "numRefEntries0RplIdx0LargerThan0: " << +picParams->m_phFlags.m_fields.m_numRefEntries0RplIdx0LargerThan0 << std::endl;
1082         oss << "numRefEntries1RplIdx1LargerThan0: " << +picParams->m_phFlags.m_fields.m_numRefEntries1RplIdx1LargerThan0 << std::endl;
1083         oss << "phCollocatedFromL0Flag: " << +picParams->m_phFlags.m_fields.m_phCollocatedFromL0Flag << std::endl;
1084         oss << "phMmvdFullpelOnlyFlag: " << +picParams->m_phFlags.m_fields.m_phMmvdFullpelOnlyFlag << std::endl;
1085         oss << "phMvdL1ZeroFlag: " << +picParams->m_phFlags.m_fields.m_phMvdL1ZeroFlag << std::endl;
1086         oss << "phBdofDisabledFlag: " << +picParams->m_phFlags.m_fields.m_phBdofDisabledFlag << std::endl;
1087         oss << "phDmvrDisabledFlag: " << +picParams->m_phFlags.m_fields.m_phDmvrDisabledFlag << std::endl;
1088         oss << "phProfDisabledFlag: " << +picParams->m_phFlags.m_fields.m_phProfDisabledFlag << std::endl;
1089         oss << "phJointCbcrSignFlag: " << +picParams->m_phFlags.m_fields.m_phJointCbcrSignFlag << std::endl;
1090         oss << "phSaoLumaEnabledFlag: " << +picParams->m_phFlags.m_fields.m_phSaoLumaEnabledFlag << std::endl;
1091         oss << "phSaoChromaEnabledFlag: " << +picParams->m_phFlags.m_fields.m_phSaoChromaEnabledFlag << std::endl;
1092         oss << "phDeblockingFilterDisabledFlag: " << +picParams->m_phFlags.m_fields.m_phDeblockingFilterDisabledFlag << std::endl;
1093 
1094         // reference lists
1095         oss << "CurrPic FrameIdx: " << +picParams->m_currPic.FrameIdx << std::endl;
1096         oss << "picOrderCntVal: " << +picParams->m_picOrderCntVal << std::endl;
1097         for (auto i = 0; i < 15; i++)
1098         {
1099             oss << "refFramePocList[" << +i << "]: " << +picParams->m_refFramePocList[i] << std::endl;
1100         }
1101         for (auto i = 0; i < 15; i++)
1102         {
1103             oss << "refFrameList[" << +i << "] FrameIdx: " << +picParams->m_refFrameList[i].FrameIdx << std::endl;
1104         }
1105         for (auto i = 0; i < 2; i++)
1106         {
1107             for (auto j = 0; j < 15; j++)
1108             {
1109                 oss << "refPicList[" << +i << "][" << +j << "] FrameIdx: " << +picParams->m_refPicList[i][j].FrameIdx << std::endl;
1110             }
1111         }
1112 
1113         oss << "picMiscFlags value: " << +picParams->m_picMiscFlags.m_value << std::endl;
1114         oss << "intraPicFlag: " << +picParams->m_picMiscFlags.m_fields.m_intraPicFlag << std::endl;
1115 
1116         oss << "statusReportFeedbackNumber: " << +picParams->m_statusReportFeedbackNumber << std::endl;
1117 
1118         // multilayer
1119         if (shortFormatInUse)
1120         {
1121             for (auto i = 0; i < 15; i++)
1122             {
1123                 oss << "refFrameListNuhLayerId[" << +i << "]: " << +picParams->m_refFrameListNuhLayerId[i] << std::endl;
1124             }
1125             oss << "nuhLayerId: " << +picParams->m_nuhLayerId << std::endl;
1126             oss << "vpsMaxLayersMinus1: " << +picParams->m_vpsMaxLayersMinus1 << std::endl;
1127             for (auto i = 0; i < 56; i++)
1128             {
1129                 oss << "vpsLayerId[" << +i << "]: " << +picParams->m_vpsLayerId[i] << std::endl;
1130             }
1131             for (auto i = 0; i < 56; i++)
1132             {
1133                 for (auto j = 0; j < 7; j++)
1134                 {
1135                     oss << "vpsDirectRefLayerFlag[" << +i << "][" << +j << "]: " << +picParams->m_vpsDirectRefLayerFlag[i][j] << std::endl;
1136                 }
1137             }
1138         }
1139 
1140         std::ofstream ofs(fileName, std::ios::out);
1141         ofs << oss.str();
1142         ofs.close();
1143     }
1144 
DumpDecodeVvcAlfParams(CodecVvcAlfData * alfDataBuf,uint32_t numAlf,std::string fileName)1145     void DumpDecodeVvcAlfParams(CodecVvcAlfData *alfDataBuf, uint32_t numAlf, std::string fileName)
1146     {
1147         CodecVvcAlfData *alfData = nullptr;
1148 
1149         std::ostringstream oss;
1150         oss.setf(std::ios::showbase | std::ios::uppercase);
1151 
1152         for (uint16_t j = 0; j < numAlf; j++)
1153         {
1154             alfData = &alfDataBuf[j];
1155             oss << "====================================================================================================" << std::endl;
1156             oss << "Data for APS ALF number = " << +j << std::endl;
1157             oss << "apsAdaptationParameterSetId: " << +alfData->m_apsAdaptationParameterSetId << std::endl;
1158             oss << "alfLumaNumFiltersSignalledMinus1: " << +alfData->m_alfLumaNumFiltersSignalledMinus1 << std::endl;
1159             for (auto i = 0; i < 25; i++)
1160             {
1161                 oss << "alfLumaCoeffDeltaIdx[" << +i << "]: " << +alfData->m_alfLumaCoeffDeltaIdx[i] << std::endl;
1162             }
1163             for (auto i = 0; i < 25; i++)
1164             {
1165                 for (auto j = 0; j < 12; j++)
1166                 {
1167                     oss << "alfCoeffL[" << +i << "][" << +j << "]: " << +alfData->m_alfCoeffL[i][j] << std::endl;
1168                 }
1169             }
1170             for (auto i = 0; i < 25; i++)
1171             {
1172                 for (auto j = 0; j < 12; j++)
1173                 {
1174                     oss << "alfLumaClipIdx[" << +i << "][" << +j << "]: " << +alfData->m_alfLumaClipIdx[i][j] << std::endl;
1175                 }
1176             }
1177             oss << "alfChromaNumAltFiltersMinus1: " << +alfData->m_alfChromaNumAltFiltersMinus1 << std::endl;
1178             for (auto i = 0; i < 8; i++)
1179             {
1180                 for (auto j = 0; j < 6; j++)
1181                 {
1182                     oss << "alfCoeffC[" << +i << "][" << +j << "]: " << +alfData->m_alfCoeffC[i][j] << std::endl;
1183                 }
1184             }
1185             for (auto i = 0; i < 8; i++)
1186             {
1187                 for (auto j = 0; j < 6; j++)
1188                 {
1189                     oss << "alfChromaClipIdx[" << +i << "][" << +j << "]: " << +alfData->m_alfChromaClipIdx[i][j] << std::endl;
1190                 }
1191             }
1192             oss << "alfCcCbFiltersSignalledMinus1: " << +alfData->m_alfCcCbFiltersSignalledMinus1 << std::endl;
1193             for (auto i = 0; i < 4; i++)
1194             {
1195                 for (auto j = 0; j < 7; j++)
1196                 {
1197                     oss << "CcAlfApsCoeffCb[" << +i << "][" << +j << "]: " << +alfData->m_ccAlfApsCoeffCb[i][j] << std::endl;
1198                 }
1199             }
1200             oss << "alfCcCrFiltersSignalledMinus1: " << +alfData->m_alfCcCrFiltersSignalledMinus1 << std::endl;
1201             for (auto i = 0; i < 4; i++)
1202             {
1203                 for (auto j = 0; j < 7; j++)
1204                 {
1205                     oss << "CcAlfApsCoeffCr[" << +i << "][" << +j << "]: " << +alfData->m_ccAlfApsCoeffCr[i][j] << std::endl;
1206                 }
1207             }
1208 
1209             oss << "alfFlags value: " << +alfData->m_alfFlags.m_value << std::endl;
1210             oss << "alfLumaFilterSignalFlag: " << +alfData->m_alfFlags.m_fields.m_alfLumaFilterSignalFlag << std::endl;
1211             oss << "alfChromaFilterSignalFlag: " << +alfData->m_alfFlags.m_fields.m_alfChromaFilterSignalFlag << std::endl;
1212             oss << "alfCcCbFilterSignalFlag: " << +alfData->m_alfFlags.m_fields.m_alfCcCbFilterSignalFlag << std::endl;
1213             oss << "alfCcCrFilterSignalFlag: " << +alfData->m_alfFlags.m_fields.m_alfCcCrFilterSignalFlag << std::endl;
1214             oss << "alfLumaClipFlag: " << +alfData->m_alfFlags.m_fields.m_alfLumaClipFlag << std::endl;
1215             oss << "alfChromaClipFlag: " << +alfData->m_alfFlags.m_fields.m_alfChromaClipFlag << std::endl;
1216         }
1217 
1218         std::ofstream ofs(fileName, std::ios::out);
1219         ofs << oss.str();
1220         ofs.close();
1221     }
1222 
DumpDecodeVvcLmcsParams(CodecVvcLmcsData * lmcsDataBuf,uint32_t numLmcs,std::string fileName)1223     void DumpDecodeVvcLmcsParams(CodecVvcLmcsData *lmcsDataBuf, uint32_t numLmcs, std::string fileName)
1224     {
1225         CodecVvcLmcsData *lmcsData = nullptr;
1226 
1227         std::ostringstream oss;
1228         oss.setf(std::ios::showbase | std::ios::uppercase);
1229 
1230         for (uint16_t j = 0; j < numLmcs; j++)
1231         {
1232             lmcsData = &lmcsDataBuf[j];
1233             oss << "====================================================================================================" << std::endl;
1234             oss << "Data for APS LMCS number = " << +j << std::endl;
1235             oss << "apsAdaptationParameterSetId: " << +lmcsData->m_apsAdaptationParameterSetId << std::endl;
1236             oss << "lmcsMinBinIdx: " << +lmcsData->m_lmcsMinBinIdx << std::endl;
1237             oss << "lmcsDeltaMaxBinIdx: " << +lmcsData->m_lmcsDeltaMaxBinIdx << std::endl;
1238             for (auto i = 0; i < 16; i++)
1239             {
1240                 oss << "lmcsDeltaCW[" << +i << "]: " << +lmcsData->m_lmcsDeltaCW[i] << std::endl;
1241             }
1242             oss << "lmcsDeltaCrs: " << +lmcsData->m_lmcsDeltaCrs << std::endl;
1243         }
1244 
1245         std::ofstream ofs(fileName, std::ios::out);
1246         ofs << oss.str();
1247         ofs.close();
1248     }
1249 
DumpDecodeVvcIqParams(CodecVvcQmData * quantMatrixBuf,uint32_t numScalingList,std::string fileName)1250     void DumpDecodeVvcIqParams(CodecVvcQmData *quantMatrixBuf, uint32_t numScalingList, std::string fileName)
1251     {
1252         CodecVvcQmData *quantMatrix = nullptr;
1253 
1254         std::ostringstream oss;
1255         oss.setf(std::ios::showbase | std::ios::uppercase);
1256 
1257         for (uint16_t j = 0; j < numScalingList; j++)
1258         {
1259             quantMatrix = &quantMatrixBuf[j];
1260             oss << "====================================================================================================" << std::endl;
1261             oss << "Data for APS Scaling List number = " << +j << std::endl;
1262             oss << "apsAdaptationParameterSetId: " << +quantMatrix->m_apsAdaptationParameterSetId << std::endl;
1263             for (auto i = 0; i < 14; i++)
1264             {
1265                 oss << "scalingMatrixDCRec[" << +i << "]: " << +quantMatrix->m_scalingMatrixDCRec[i] << std::endl;
1266             }
1267             for (auto i = 0; i < 2; i++)
1268             {
1269                 for (auto j = 0; j < 2; j++)
1270                 {
1271                     for (auto k = 0; k < 2; k++)
1272                     {
1273                         oss << "scalingMatrixRec2x2[" << +i << "][" << +j << "][" << +k << "]: " << +quantMatrix->m_scalingMatrixRec2x2[i][j][k] << std::endl;
1274                     }
1275                 }
1276             }
1277             for (auto i = 0; i < 6; i++)
1278             {
1279                 for (auto j = 0; j < 4; j++)
1280                 {
1281                     for (auto k = 0; k < 4; k++)
1282                     {
1283                         oss << "scalingMatrixRec4x4[" << +i << "][" << +j << "][" << +k << "]: " << +quantMatrix->m_scalingMatrixRec4x4[i][j][k] << std::endl;
1284                     }
1285                 }
1286             }
1287             for (auto i = 0; i < 20; i++)
1288             {
1289                 for (auto j = 0; j < 8; j++)
1290                 {
1291                     for (auto k = 0; k < 8; k++)
1292                     {
1293                         oss << "scalingMatrixRec8x8[" << +i << "][" << +j << "][" << +k << "]: " << +quantMatrix->m_scalingMatrixRec8x8[i][j][k] << std::endl;
1294                     }
1295                 }
1296             }
1297         }
1298 
1299         std::ofstream ofs(fileName, std::ios::out);
1300         ofs << oss.str();
1301         ofs.close();
1302     }
1303 
DumpDecodeVvcTileParams(CodecVvcTileParam * tileParams,uint32_t numElements,std::string fileName)1304     void DumpDecodeVvcTileParams(CodecVvcTileParam *tileParams, uint32_t numElements, std::string fileName)
1305     {
1306         CodecVvcTileParam *element = nullptr;
1307 
1308         std::ostringstream oss;
1309         oss.setf(std::ios::showbase | std::ios::uppercase);
1310 
1311         for (uint16_t j = 0; j < numElements; j++)
1312         {
1313             element = &tileParams[j];
1314             oss << "====================================================================================================" << std::endl;
1315             oss << "Data for Tile Params element = " << +j << std::endl;
1316             oss << "tileDimension: " << +element->m_tileDimension << std::endl;
1317         }
1318 
1319         std::ofstream ofs(fileName, std::ios::out);
1320         ofs << oss.str();
1321         ofs.close();
1322     }
1323 
DumpDecodeVvcSubpicParams(CodecVvcSubpicParam * subpicParamsBuf,uint32_t numSubpics,std::string fileName)1324     void DumpDecodeVvcSubpicParams(CodecVvcSubpicParam *subpicParamsBuf, uint32_t numSubpics, std::string fileName)
1325     {
1326         CodecVvcSubpicParam *subpicParams = nullptr;
1327 
1328         std::ostringstream oss;
1329         oss.setf(std::ios::showbase | std::ios::uppercase);
1330 
1331         for (uint16_t j = 0; j < numSubpics; j++)
1332         {
1333             subpicParams = &subpicParamsBuf[j];
1334             oss << "====================================================================================================" << std::endl;
1335             oss << "Data for SubPic Params number = " << +j << std::endl;
1336             oss << "spsSubpicCtuTopLeftX: " << +subpicParams->m_spsSubpicCtuTopLeftX << std::endl;
1337             oss << "spsSubpicCtuTopLeftY: " << +subpicParams->m_spsSubpicCtuTopLeftY << std::endl;
1338             oss << "spsSubpicWidthMinus1: " << +subpicParams->m_spsSubpicWidthMinus1 << std::endl;
1339             oss << "spsSubpicHeightMinus1: " << +subpicParams->m_spsSubpicHeightMinus1 << std::endl;
1340             oss << "subpicIdVal: " << +subpicParams->m_subpicIdVal << std::endl;
1341 
1342             oss << "subPicFlags value: " << +subpicParams->m_subPicFlags.m_value << std::endl;
1343             oss << "spsSubpicTreatedAsPicFlag: " << +subpicParams->m_subPicFlags.m_fields.m_spsSubpicTreatedAsPicFlag << std::endl;
1344             oss << "spsLoopFilterAcrossSubpicEnabledFlag: " << +subpicParams->m_subPicFlags.m_fields.m_spsLoopFilterAcrossSubpicEnabledFlag << std::endl;
1345 
1346             //Additional params, miss m_sliceIdx pointer
1347             oss << "endCtbX: " << +subpicParams->m_endCtbX << std::endl;
1348             oss << "endCtbY: " << +subpicParams->m_endCtbY << std::endl;
1349             oss << "numSlices: " << +subpicParams->m_numSlices << std::endl;
1350         }
1351 
1352         std::ofstream ofs(fileName, std::ios::out);
1353         ofs << oss.str();
1354         ofs.close();
1355     }
1356 
DumpDecodeVvcSliceStructureParams(CodecVvcSliceStructure * sliceStructParamsBuf,uint32_t numSlcStruct,std::string fileName)1357     void DumpDecodeVvcSliceStructureParams(CodecVvcSliceStructure *sliceStructParamsBuf, uint32_t numSlcStruct, std::string fileName)
1358     {
1359         CodecVvcSliceStructure *sliceStructParams = nullptr;
1360 
1361         std::ostringstream oss;
1362         oss.setf(std::ios::showbase | std::ios::uppercase);
1363 
1364         for (uint16_t j = 0; j < numSlcStruct; j++)
1365         {
1366             sliceStructParams = &sliceStructParamsBuf[j];
1367             oss << "====================================================================================================" << std::endl;
1368             oss << "Data for Slice Struct Params number = " << +j << std::endl;
1369             oss << "sliceTopLeftTileIdx: " << +sliceStructParams->m_sliceTopLeftTileIdx << std::endl;
1370             oss << "ppsSliceWidthInTilesMinus1: " << +sliceStructParams->m_ppsSliceWidthInTilesMinus1 << std::endl;
1371             oss << "ppsSliceHeightInTilesMinus1: " << +sliceStructParams->m_ppsSliceHeightInTilesMinus1 << std::endl;
1372             oss << "ppsExpSliceHeightInCtusMinus1: " << +sliceStructParams->m_ppsExpSliceHeightInCtusMinus1 << std::endl;
1373         }
1374 
1375         std::ofstream ofs(fileName, std::ios::out);
1376         ofs << oss.str();
1377         ofs.close();
1378     }
1379 
DumpDecodeVvcRplStructureParams(CodecVvcRplStructure * rplParams,uint32_t numRpls,std::string fileName)1380     void DumpDecodeVvcRplStructureParams(CodecVvcRplStructure *rplParams, uint32_t numRpls, std::string fileName)
1381     {
1382         CodecVvcRplStructure *rplStructParams = nullptr;
1383 
1384         std::ostringstream oss;
1385         oss.setf(std::ios::showbase | std::ios::uppercase);
1386 
1387         for (uint16_t j = 0; j < numRpls; j++)
1388         {
1389             rplStructParams = &rplParams[j];
1390             oss << "====================================================================================================" << std::endl;
1391             oss << "Data for RPL Params number = " << +j << std::endl;
1392             oss << "listIdx: " << +rplStructParams->m_listIdx << std::endl;
1393             oss << "rplsIdx: " << +rplStructParams->m_rplsIdx << std::endl;
1394             oss << "numRefEntries: " << +rplStructParams->m_numRefEntries << std::endl;
1395             oss << "ltrpInHeaderFlag: " << +rplStructParams->m_ltrpInHeaderFlag << std::endl;
1396             for (auto i = 0; i < 29; i++)
1397             {
1398                 oss << "stRefPicFlag[" << +i << "]: " << +rplStructParams->m_stRefPicFlag[i] << std::endl;
1399             }
1400             for (auto i = 0; i < 29; i++)
1401             {
1402                 oss << "DeltaPocSt[" << +i << "]: " << +rplStructParams->m_deltaPocSt[i] << std::endl;
1403             }
1404             for (auto i = 0; i < 29; i++)
1405             {
1406                 oss << "rplsPocLsbLt[" << +i << "]: " << +rplStructParams->m_rplsPocLsbLt[i] << std::endl;
1407             }
1408             for (auto i = 0; i < 29; i++)
1409             {
1410                 oss << "interLayerRefPicFlag[" << +i << "]: " << +rplStructParams->m_interLayerRefPicFlag[i] << std::endl;
1411             }
1412             for (auto i = 0; i < 29; i++)
1413             {
1414                 oss << "ilrpIdx[" << +i << "]: " << +rplStructParams->m_ilrpIdx[i] << std::endl;
1415             }
1416         }
1417 
1418         std::ofstream ofs(fileName, std::ios::out);
1419         ofs << oss.str();
1420         ofs.close();
1421     }
1422 
DumpDecodeVvcSliceParams(CodecVvcSliceParams * sliceParams,uint32_t numSlices,std::string fileName,bool shortFormatInUse)1423     void DumpDecodeVvcSliceParams(CodecVvcSliceParams *sliceParams, uint32_t numSlices, std::string fileName, bool shortFormatInUse)
1424     {
1425         CodecVvcSliceParams *vvcSliceControl = nullptr;
1426 
1427         std::ostringstream oss;
1428         oss.setf(std::ios::showbase | std::ios::uppercase);
1429 
1430         for (uint16_t j = 0; j < numSlices; j++)
1431         {
1432             vvcSliceControl = &sliceParams[j];
1433             oss << "====================================================================================================" << std::endl;
1434             oss << "Data for Slice number = " << +j << std::endl;
1435             oss << "bSNALunitDataLocation: " << +vvcSliceControl->m_bSNALunitDataLocation << std::endl;
1436             oss << "sliceBytesInBuffer: " << +vvcSliceControl->m_sliceBytesInBuffer << std::endl;
1437             oss << "wBadSliceChopping: " << +vvcSliceControl->m_wBadSliceChopping << std::endl;
1438 
1439             if (!shortFormatInUse)
1440             {
1441                 oss << "shSubpicId: " << +vvcSliceControl->m_shSubpicId << std::endl;
1442                 oss << "shSliceAddress: " << +vvcSliceControl->m_shSliceAddress << std::endl;
1443                 oss << "shNumTilesInSliceMinus1: " << +vvcSliceControl->m_shNumTilesInSliceMinus1 << std::endl;
1444                 oss << "shSliceType: " << +vvcSliceControl->m_shSliceType << std::endl;
1445                 oss << "shNumAlfApsIdsLuma: " << +vvcSliceControl->m_shNumAlfApsIdsLuma << std::endl;
1446                 for (auto i = 0; i < 7; i++)
1447                 {
1448                     oss << "shAlfApsIdLuma[" << +i << "]: " << +vvcSliceControl->m_shAlfApsIdLuma[i] << std::endl;
1449                 }
1450                 oss << "shAlfApsIdChroma: " << +vvcSliceControl->m_shAlfApsIdChroma << std::endl;
1451                 oss << "shAlfCcCbApsId: " << +vvcSliceControl->m_shAlfCcCbApsId << std::endl;
1452                 oss << "shAlfCcCrApsId: " << +vvcSliceControl->m_shAlfCcCrApsId << std::endl;
1453                 for (auto i = 0; i < 2; i++)
1454                 {
1455                     oss << "numRefIdxActive[" << +i << "]: " << +vvcSliceControl->m_numRefIdxActive[i] << std::endl;
1456                 }
1457                 oss << "shCollocatedRefIdx: " << +vvcSliceControl->m_shCollocatedRefIdx << std::endl;
1458                 oss << "sliceQpY: " << +vvcSliceControl->m_sliceQpY << std::endl;
1459                 oss << "shCbQpOffset: " << +vvcSliceControl->m_shCbQpOffset << std::endl;
1460                 oss << "shCrQpOffset: " << +vvcSliceControl->m_shCrQpOffset << std::endl;
1461                 oss << "shJointCbcrQpOffset: " << +vvcSliceControl->m_shJointCbcrQpOffset << std::endl;
1462                 oss << "shLumaBetaOffsetDiv2: " << +vvcSliceControl->m_shLumaBetaOffsetDiv2 << std::endl;
1463                 oss << "shLumaTcOffsetDiv2: " << +vvcSliceControl->m_shLumaTcOffsetDiv2 << std::endl;
1464                 oss << "shCbBetaOffsetDiv2: " << +vvcSliceControl->m_shCbBetaOffsetDiv2 << std::endl;
1465                 oss << "shCbTcOffsetDiv2: " << +vvcSliceControl->m_shCbTcOffsetDiv2 << std::endl;
1466                 oss << "shCrBetaOffsetDiv2: " << +vvcSliceControl->m_shCrBetaOffsetDiv2 << std::endl;
1467                 oss << "shCrTcOffsetDiv2: " << +vvcSliceControl->m_shCrTcOffsetDiv2 << std::endl;
1468 
1469                 oss << "byteOffsetToSliceData: " << +vvcSliceControl->m_byteOffsetToSliceData << std::endl;
1470                 oss << "numEntryPoints: " << +vvcSliceControl->m_numEntryPoints << std::endl;
1471 
1472                 for (auto i = 0; i < 2; i++)
1473                 {
1474                     for (auto j = 0; j < 15; j++)
1475                     {
1476                         oss << "refPicList[" << +i << "][" << +j << "] FrameIdx: " << +vvcSliceControl->m_refPicList[i][j].FrameIdx << std::endl;
1477                     }
1478                 }
1479                 oss << "lumaLog2WeightDenom: " << +vvcSliceControl->m_wpInfo.m_lumaLog2WeightDenom << std::endl;
1480                 oss << "deltaChromaLog2WeightDenom: " << +vvcSliceControl->m_wpInfo.m_deltaChromaLog2WeightDenom << std::endl;
1481                 oss << "numL0Weights: " << +vvcSliceControl->m_wpInfo.m_numL0Weights << std::endl;
1482                 for (auto i = 0; i < 15; i++)
1483                 {
1484                     oss << "lumaWeightL0Flag[" << +i << "]: " << +vvcSliceControl->m_wpInfo.m_lumaWeightL0Flag[i] << std::endl;
1485                 }
1486                 for (auto i = 0; i < 15; i++)
1487                 {
1488                     oss << "chromaWeightL0Flag[" << +i << "]: " << +vvcSliceControl->m_wpInfo.m_chromaWeightL0Flag[i] << std::endl;
1489                 }
1490                 for (auto i = 0; i < 15; i++)
1491                 {
1492                     oss << "deltaLumaWeightL0[" << +i << "]: " << +vvcSliceControl->m_wpInfo.m_deltaLumaWeightL0[i] << std::endl;
1493                 }
1494                 for (auto i = 0; i < 15; i++)
1495                 {
1496                     oss << "lumaOffsetL0[" << +i << "]: " << +vvcSliceControl->m_wpInfo.m_lumaOffsetL0[i] << std::endl;
1497                 }
1498                 for (auto i = 0; i < 15; i++)
1499                 {
1500                     for (auto j = 0; j < 2; j++)
1501                     {
1502                         oss << "deltaChromaWeightL0[" << +i << "][" << +j << "]: " << +vvcSliceControl->m_wpInfo.m_deltaChromaWeightL0[i][j] << std::endl;
1503                     }
1504                 }
1505                 for (auto i = 0; i < 15; i++)
1506                 {
1507                     for (auto j = 0; j < 2; j++)
1508                     {
1509                         oss << "deltaChromaOffsetL0[" << +i << "][" << +j << "]: " << +vvcSliceControl->m_wpInfo.m_deltaChromaOffsetL0[i][j] << std::endl;
1510                     }
1511                 }
1512                 oss << "numL1Weights: " << +vvcSliceControl->m_wpInfo.m_numL1Weights << std::endl;
1513                 for (auto i = 0; i < 15; i++)
1514                 {
1515                     oss << "lumaWeightL1Flag[" << +i << "]: " << +vvcSliceControl->m_wpInfo.m_lumaWeightL1Flag[i] << std::endl;
1516                 }
1517                 for (auto i = 0; i < 15; i++)
1518                 {
1519                     oss << "chromaWeightL1Flag[" << +i << "]: " << +vvcSliceControl->m_wpInfo.m_chromaWeightL1Flag[i] << std::endl;
1520                 }
1521                 for (auto i = 0; i < 15; i++)
1522                 {
1523                     oss << "deltaLumaWeightL1[" << +i << "]: " << +vvcSliceControl->m_wpInfo.m_deltaLumaWeightL1[i] << std::endl;
1524                 }
1525                 for (auto i = 0; i < 15; i++)
1526                 {
1527                     oss << "lumaOffsetL1[" << +i << "]: " << +vvcSliceControl->m_wpInfo.m_lumaOffsetL1[i] << std::endl;
1528                 }
1529                 for (auto i = 0; i < 15; i++)
1530                 {
1531                     for (auto j = 0; j < 2; j++)
1532                     {
1533                         oss << "deltaChromaWeightL1[" << +i << "][" << +j << "]: " << +vvcSliceControl->m_wpInfo.m_deltaChromaWeightL1[i][j] << std::endl;
1534                     }
1535                 }
1536                 for (auto i = 0; i < 15; i++)
1537                 {
1538                     for (auto j = 0; j < 2; j++)
1539                     {
1540                         oss << "deltaChromaOffsetL1[" << +i << "][" << +j << "]: " << +vvcSliceControl->m_wpInfo.m_deltaChromaOffsetL1[i][j] << std::endl;
1541                     }
1542                 }
1543 
1544                 oss << "longSliceFlags value: " << +vvcSliceControl->m_longSliceFlags.m_value << std::endl;
1545                 oss << "shAlfEnabledFlag: " << +vvcSliceControl->m_longSliceFlags.m_fields.m_shAlfEnabledFlag << std::endl;
1546                 oss << "shAlfCbEnabledFlag: " << +vvcSliceControl->m_longSliceFlags.m_fields.m_shAlfCbEnabledFlag << std::endl;
1547                 oss << "shAlfCrEnabledFlag: " << +vvcSliceControl->m_longSliceFlags.m_fields.m_shAlfCrEnabledFlag << std::endl;
1548                 oss << "shAlfCcCbEnabledFlag: " << +vvcSliceControl->m_longSliceFlags.m_fields.m_shAlfCcCbEnabledFlag << std::endl;
1549                 oss << "shAlfCcCrEnabledFlag: " << +vvcSliceControl->m_longSliceFlags.m_fields.m_shAlfCcCrEnabledFlag << std::endl;
1550                 oss << "shLmcsUsedFlag: " << +vvcSliceControl->m_longSliceFlags.m_fields.m_shLmcsUsedFlag << std::endl;
1551                 oss << "shExplicitScalingListUsedFlag: " << +vvcSliceControl->m_longSliceFlags.m_fields.m_shExplicitScalingListUsedFlag << std::endl;
1552                 oss << "shCabacInitFlag: " << +vvcSliceControl->m_longSliceFlags.m_fields.m_shCabacInitFlag << std::endl;
1553                 oss << "shCollocatedFromL0Flag: " << +vvcSliceControl->m_longSliceFlags.m_fields.m_shCollocatedFromL0Flag << std::endl;
1554                 oss << "shCuChromaQpOffsetEnabledFlag: " << +vvcSliceControl->m_longSliceFlags.m_fields.m_shCuChromaQpOffsetEnabledFlag << std::endl;
1555                 oss << "shSaoLumaUsedFlag: " << +vvcSliceControl->m_longSliceFlags.m_fields.m_shSaoLumaUsedFlag << std::endl;
1556                 oss << "shSaoChromaUsedFlag: " << +vvcSliceControl->m_longSliceFlags.m_fields.m_shSaoChromaUsedFlag << std::endl;
1557                 oss << "shDeblockingFilterDisabledFlag: " << +vvcSliceControl->m_longSliceFlags.m_fields.m_shDeblockingFilterDisabledFlag << std::endl;
1558                 oss << "shDepQuantUsedFlag: " << +vvcSliceControl->m_longSliceFlags.m_fields.m_shDepQuantUsedFlag << std::endl;
1559                 oss << "shSignDataHidingUsedFlag: " << +vvcSliceControl->m_longSliceFlags.m_fields.m_shSignDataHidingUsedFlag << std::endl;
1560                 oss << "shTsResidualCodingDisabledFlag: " << +vvcSliceControl->m_longSliceFlags.m_fields.m_shTsResidualCodingDisabledFlag << std::endl;
1561                 oss << "lastSliceOfPic: " << +vvcSliceControl->m_longSliceFlags.m_fields.m_lastSliceOfPic << std::endl;
1562                 oss << "noBackwardPredFlag: " << +vvcSliceControl->m_longSliceFlags.m_fields.m_noBackwardPredFlag << std::endl;
1563             }
1564         }
1565 
1566         std::ofstream ofs(fileName, std::ios::out);
1567         ofs << oss.str();
1568         ofs.close();
1569     }
1570 #endif
1571 
CreateFeatureManager()1572     MOS_STATUS VvcPipeline::CreateFeatureManager()
1573     {
1574         DECODE_FUNC_CALL();
1575 
1576         m_featureManager = MOS_New(DecodeVvcFeatureManager, m_allocator, dynamic_cast<CodechalHwInterfaceNext *>(m_hwInterface), m_osInterface);
1577         DECODE_CHK_NULL(m_featureManager);
1578 
1579         return MOS_STATUS_SUCCESS;
1580     }
1581 
1582 }
1583