1 /*
2 * Copyright (c) 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 #ifndef __VP_PIPELINE_ADAPTER_XE2_LPM_H__
23 #define __VP_PIPELINE_ADAPTER_XE2_LPM_H__
24 
25 #include "vp_pipeline.h"
26 #include "vp_pipeline_common.h"
27 #include "vp_pipeline_adapter.h"
28 
29 class VpPipelineAdapterXe2_Lpm : virtual public VpPipelineAdapter
30 {
31 public:
32     VpPipelineAdapterXe2_Lpm(
33         PMOS_INTERFACE          pOsInterface,
34         vp::VpPlatformInterface &vpPlatformInterface,
35         MOS_STATUS              &eStatus);
36 
37     //!
38     //! \brief    VpPipelineAdapterXe2_Lpm Destuctor
39     //! \details  Destroys VpPipelineAdapterXe2_Lpm and all internal states and objects
40     //! \return   void
41     //!
42     virtual ~VpPipelineAdapterXe2_Lpm();
43 
44     //!
45     //! \brief    Performs VP Rendering
46     //! \details  Performs VP Rendering
47     //!           - call default render of video
48     //! \param    [in] pcRenderParams
49     //!           Pointer to Render Params
50     //! \return   MOS_STATUS
51     //!           Return MOS_STATUS_SUCCESS if successful, otherwise failed
52     //!
53     virtual MOS_STATUS Render(
54         PCVPHAL_RENDER_PARAMS   pcRenderParams) override;
55 
56     //!
57     //! \brief    Allocate VP Resources
58     //! \details  Allocate VP Resources
59     //!           - Allocate and initialize HW states
60     //!           - Allocate and initialize renderer states
61     //! \param    [in] pVpHalSettings
62     //!           Pointer to VPHAL Settings
63     //! \return   MOS_STATUS
64     //!           Return MOS_STATUS_SUCCESS if successful, otherwise failed
65     //!
66     virtual MOS_STATUS Allocate(
67         const VpSettings *pVpHalSettings) override;
68 
69     virtual MOS_STATUS GetStatusReport(
70         PQUERY_STATUS_REPORT_APP  pQueryReport,
71         uint16_t                  numStatus) override;
72 
73     virtual MOS_STATUS Execute(PVP_PIPELINE_PARAMS params) override;
74 
75     //!
76     //! \brief    Get feature reporting
77     //! \details  Get feature reporting
78     //! \return   VphalFeatureReport*
79     //!           Pointer to VPHAL_FEATURE_REPOR: rendering features reported
80     //!
81     virtual VphalFeatureReport* GetRenderFeatureReport() override;
82 
83     virtual MOS_STATUS RegisterCacheSettings() override;
84 
85 protected:
IsApoEnabled()86     virtual bool IsApoEnabled() override
87     {
88         return true;
89     }
90 
91 MEDIA_CLASS_DEFINE_END(VpPipelineAdapterXe2_Lpm)
92 };
93 #endif // !__VP_PIPELINE_ADAPTER_XE2_LPM_H__
94 
95