Debian Codegraph @

media_driver/agnostic/gen11/codec/hal/codechal_decode_avc_g11.h

raw
1 /*
2 * Copyright (c) 2017, 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 codechal_decode_avc_g11.h
24 //! \brief This modules implements Render interface layer for AVC decoding to be used on all operating systems/DDIs, across CODECHAL components.
25 //!
26 //!
27 //! \file codechal_decode_avc_g11.h
28 //! \brief Defines the decode interface extension for AVC.
29 //! \details Defines all types, macros, and functions required by CodecHal for AVC decoding.
30 //! Definitions are not externally facing.
31 //!
32
33 #ifndef __CODECHAL_DECODER_AVC_G11_H__
34 #define __CODECHAL_DECODER_AVC_G11_H__
35
36 #include "codechal_decode_avc.h"
37 #include "codechal_decode_singlepipe_virtualengine.h"
38
39 //!
40 //! \class CodechalDecodeAvcG11
41 //! \brief This class defines the member fields, functions etc used by AVC decoder.
42 //!
43 class CodechalDecodeAvcG11 : public CodechalDecodeAvc
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 CodechalDecodeAvcG11(
56 CodechalHwInterface *hwInterface,
57 CodechalDebugInterface* debugInterface,
58 PCODECHAL_STANDARD_INFO standardInfo);
59
60 //!
61 //! \brief Copy constructor
62 //!
63 CodechalDecodeAvcG11(const CodechalDecodeAvcG11&) = delete;
64
65 //!
66 //! \brief Copy assignment operator
67 //!
68 CodechalDecodeAvcG11& operator=(const CodechalDecodeAvcG11&) = delete;
69
70 //!
71 //! \brief Destructor
72 //!
73 ~CodechalDecodeAvcG11();
74
75 //!
76 //! \brief Allocate and initialize AVC decoder standard
77 //! \param [in] settings
78 //! Pointer to CodechalSetting
79 //! \return MOS_STATUS
80 //! MOS_STATUS_SUCCESS if success, else fail reason
81 //!
82 MOS_STATUS AllocateStandard(
83 CodechalSetting * settings) override;
84
85 //!
86 //! \brief Set states for each frame to prepare for GEN11 AVC decode
87 //! \return MOS_STATUS
88 //! MOS_STATUS_SUCCESS if success, else fail reason
89 //!
90 MOS_STATUS SetFrameStates() override;
91
92 //!
93 //! \brief AVC decoder state level function
94 //! \details State level function for GEN11 AVC decoder
95 //!
96 //! \return MOS_STATUS
97 //! MOS_STATUS_SUCCESS if success, else fail reason
98 //!
99 MOS_STATUS DecodeStateLevel() override;
100
101 //!
102 //! \brief AVC decoder primitive level function
103 //! \details Primitive level function for GEN specific AVC decoder
104 //!
105 //! \return MOS_STATUS
106 //! MOS_STATUS_SUCCESS if success, else fail reason
107 //!
108 MOS_STATUS DecodePrimitiveLevel() override;
109
110 protected:
111
112 //!
113 //! \brief Set up params for gpu context creation
114 //! \return MOS_STATUS
115 //! MOS_STATUS_SUCCESS if success, else fail reason
116 //!
117 MOS_STATUS SetGpuCtxCreatOption(CodechalSetting * settings) override;
118
119 PCODECHAL_DECODE_SINGLEPIPE_VIRTUALENGINE_STATE m_veState; //!< single pipe virtual engine state
120 };
121
122 #endif // __CODECHAL_DECODER_AVC_G11_H__
123