1 /*
2 * Copyright (c) 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 //!
24 //! \file     codechal_decode_vc1_xe_hpm.h
25 //! \brief    Implements the decode interface extension for Xe_HPM VC1.
26 //! \details  Implements all functions required by CodecHal for Xe_HPM VC1 decoding.
27 //!
28 
29 
30 #ifndef __CODECHAL_DECODE_VC1_XE_HPM_H__
31 #define __CODECHAL_DECODE_VC1_XE_HPM_H__
32 
33 #include "codechal_decode_vc1_g12.h"
34 #include "codechal_kernel_base.h"
35 #include "codechal_kernel_olp_mdf_xe_hpm.h"
36 
37 class CodechalKernelOlpMdfXe_Hpm;
38 
39 //!
40 //! \class CodechalDecodeVc1Xe_Hpm
41 //! \brief This class defines the member fields, functions etc used by Xe_HPM VC1 decoder.
42 //!
43 class CodechalDecodeVc1Xe_Hpm : public CodechalDecodeVc1G12
44 {
45 public:
46     //!
47     //! \brief  Constructor
48     //! \param    [in] hwInterface
49     //!           Hardware interface
50     //! \param    [in] debugInterface
51     //!           Debug interface
52     //! \param    [in] standardInfo
53     //!           The information of decode standard for this instance
54     //!
55        CodechalDecodeVc1Xe_Hpm(
56         CodechalHwInterface   *hwInterface,
57         CodechalDebugInterface* debugInterface,
58         PCODECHAL_STANDARD_INFO standardInfo);
59 
60     //!
61     //! \brief    Copy constructor
62     //!
63     CodechalDecodeVc1Xe_Hpm(const CodechalDecodeVc1Xe_Hpm&) = delete;
64 
65     //!
66     //! \brief    Copy assignment operator
67     //!
68     CodechalDecodeVc1Xe_Hpm &operator=(const CodechalDecodeVc1Xe_Hpm &) = delete;
69 
70     //!
71     //! \brief  Destructor
72     //!
73     ~CodechalDecodeVc1Xe_Hpm();
74 
75 protected:
76     MOS_STATUS AllocateStandard(
77         CodechalSetting *          settings) override;
78 
79     MOS_STATUS PerformVc1Olp() override;
80 
81     MOS_STATUS HandleSkipFrame() override;
82 
83     CodechalKernelOlpMdfXe_Hpm *m_olpMdfKernel = nullptr;
84     MOS_SURFACE           m_olpInYSurface;
85     MOS_SURFACE           m_olpInUVSurface;
86     MOS_SURFACE           m_olpOutYSurface;
87     MOS_SURFACE           m_olpOutUVSurface;
88 };
89 
90 
91 #endif // __CODECHAL_DECODE_VC1_XE_HPM_H__
92