Debian Codegraph @

media_softlet/agnostic/common/codec/hal/dec/shared/packet/decode_predication_packet.h

raw
1 /*
2 * Copyright (c) 2019, 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 decode_predication_packet.h
25 //! \brief Defines the common interface for decode predication sub packet
26 //! \details The decocode predication sub packet interface is further sub-divided by different
27 //! packet usages,this file is for the base interface which is shared by all decode packets.
28 //!
29
30 #ifndef __DECODE_PREDICATION_PACKET_H__
31 #define __DECODE_PREDICATION_PACKET_H__
32
33 #include "decode_sub_packet.h"
34 #include "codechal_setting.h"
35 #include "decode_pipeline.h"
36 #include "decode_predication.h"
37
38 namespace decode
39 {
40
41 class DecodePredicationPkt : public DecodeSubPacket
42 {
43 public:
44 //!
45 //! \brief Decode predication sub packet constructor
46 //!
47 DecodePredicationPkt(DecodePipeline *pipeline, CodechalHwInterfaceNext *hwInterface);
48
49 //!
50 //! \brief Decode predication sub packet destructor
51 //!
52 virtual ~DecodePredicationPkt() {};
53
54 //!
55 //! \brief Initialize the predication sub packet
56 //! \return MOS_STATUS
57 //! MOS_STATUS_SUCCESS if success, else fail reason
58 //!
59 virtual MOS_STATUS Init() override;
60
61 //!
62 //! \brief Update the parameters for predication sub packet
63 //! \return MOS_STATUS
64 //! MOS_STATUS_SUCCESS if success, else fail reason
65 //!
66 virtual MOS_STATUS Prepare() override;
67
68 //!
69 //! \brief Execute sub packet
70 //! \return MOS_STATUS
71 //! MOS_STATUS_SUCCESS if success, else fail reason
72 //!
73 virtual MOS_STATUS Execute(MOS_COMMAND_BUFFER& cmdBuffer);
74
75 //!
76 //! \brief Calculate Command Size
77 //!
78 //! \param [in, out] commandBufferSize
79 //! requested size
80 //! \param [in, out] requestedPatchListSize
81 //! requested size
82 //! \return MOS_STATUS
83 //! status
84 //!
85 MOS_STATUS CalculateCommandSize(
86 uint32_t &commandBufferSize,
87 uint32_t &requestedPatchListSize) override;
88
89 protected:
90 std::shared_ptr<mhw::mi::Itf> m_miItf = nullptr;
91 DecodePredication* m_predication = nullptr;
92
93 MEDIA_CLASS_DEFINE_END(decode__DecodePredicationPkt)
94 };
95
96 }
97
98 #endif // !__DECODE_PREDICATION_PACKET_H__