Debian Codegraph @

media_softlet/agnostic/common/vp/hal/utils/vp_debug_interface.h

raw
1 /*
2 * Copyright (c) 2020-2021, 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 vp_debug_interface.h
24 //! \brief Defines the debug interface shared by vp only.
25 //! \details The debug interface dumps output from Media based on in input config file.
26 //!
27 #ifndef __VP_DEBUG_INTERFACE_H__
28 #define __VP_DEBUG_INTERFACE_H__
29
30 #include "media_debug_interface.h"
31 #include "vp_dumper.h"
32 #include "vp_common.h"
33 #include "vp_pipeline_common.h"
34 #include "vp_utils.h"
35
36 #if USE_MEDIA_DEBUG_TOOL
37 #define USE_VP_DEBUG_TOOL 1
38 #define VP_DEBUG_TOOL(expr) expr;
39
40 class VpDebugInterface : public MediaDebugInterface
41 {
42 public:
43 VpDebugInterface();
44 virtual ~VpDebugInterface();
45
46 virtual MOS_STATUS Initialize(PMOS_INTERFACE pOsInterface);
47
48 void DumpToXML(
49 PVPHAL_RENDER_PARAMS pRenderParams,
50 uint32_t framecounter);
51
52 void SkuWa_DumpToXML(
53 MEDIA_FEATURE_TABLE *skuTable,
54 MEDIA_WA_TABLE *waTable);
55
56 MOS_STATUS DumpVpSurfaceArray(
57 PVPHAL_SURFACE *ppSurfaces,
58 uint32_t uiMaxSurfaces,
59 uint32_t uiNumSurfaces,
60 uint32_t uiFrameNumber,
61 uint32_t Location,
62 uint32_t uiDDI = VPHAL_SURF_DUMP_DDI_UNKNOWN);
63
64 MOS_STATUS DumpVpSurface(
65 PVPHAL_SURFACE pSurf,
66 uint32_t uiFrameNumber,
67 uint32_t uiCounter,
68 uint32_t Location,
69 uint32_t uiDDI = VPHAL_SURF_DUMP_DDI_UNKNOWN);
70
71 MOS_STATUS DumpVpSurface(
72 PVP_SURFACE pSurf,
73 uint32_t uiFrameNumber,
74 uint32_t uiCounter,
75 uint32_t Location,
76 uint32_t uiDDI = VPHAL_SURF_DUMP_DDI_UNKNOWN);
77
78 protected:
79 std::string SetOutputPathKey() override;
80 std::string InitDefaultOutput() override;
81
82 VpSurfaceDumper *m_surfaceDumper = nullptr;
83 VpParameterDumper *m_parameterDumper = nullptr;
84
85 MEDIA_CLASS_DEFINE_END(VpDebugInterface)
86 };
87
88 #else
89 #define USE_VP_DEBUG_TOOL 0
90 #define VP_DEBUG_TOOL(expr) ;
91 #endif // USE_MEDIA_DEBUG_TOOL
92 #endif /* __VP_DEBUG_INTERFACE_H__ */