Debian Codegraph @

media_softlet/agnostic/common/codec/hal/enc/hevc/pipeline/encode_hevc_pipeline.h

raw
1 /*
2 * Copyright (c) 2018-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 //!
23 //! \file encode_hevc_pipeline.h
24 //! \brief Defines the interface for hevc encode pipeline
25 //!
26 #ifndef __ENCODE_HEVC_PIPELINE_H__
27 #define __ENCODE_HEVC_PIPELINE_H__
28 #include "encode_pipeline.h"
29 #include "encode_hevc_dfs.h"
30 #include "encode_hevc_vdenc_feature_manager.h"
31
32 namespace encode {
33
34 class HevcPipeline : public EncodePipeline
35 {
36 public:
37 //!
38 //! \brief EncodePipeline constructor
39 //! \param [in] hwInterface
40 //! Pointer to CodechalHwInterface
41 //! \param [in] debugInterface
42 //! Pointer to CodechalDebugInterface
43 //!
44 HevcPipeline(
45 CodechalHwInterfaceNext * hwInterface,
46 CodechalDebugInterface *debugInterface);
47
48 virtual ~HevcPipeline() {}
49
50 virtual MOS_STATUS Prepare(void *params) override;
51
52 enum PacketIds
53 {
54 HucBrcInit = CONSTRUCTPACKETID(PACKET_COMPONENT_ENCODE, PACKET_SUBCOMPONENT_HEVC, 0),
55 HucBrcUpdate,
56 hevcVdencPacket,
57 hevcPakIntegrate,
58 hevcVdencPicPacket,
59 hevcVdencTileRowPacket,
60 HucBrcTileRowUpdate,
61 HucLaInit,
62 HucLaUpdate,
63 hevcVdencPacket422,
64 EncodeCheckHucLoad,
65 hevcSaliencyPacket,
66 HucSLBBUpdate
67 #if ((_DEBUG || _RELEASE_INTERNAL) && _MEDIA_RESERVED)
68 ,
69 hevcVdencMvdumpPacket
70 #endif
71 };
72
73 protected:
74 virtual MOS_STATUS Initialize(void *settings) override;
75 virtual MOS_STATUS Uninitialize() override;
76 virtual MOS_STATUS UserFeatureReport() override;
77 virtual MOS_STATUS CreateBufferTracker() override;
78 virtual MOS_STATUS CreateStatusReport() override;
79 virtual MOS_STATUS InitUserSetting(MediaUserSettingSharedPtr userSettingPtr) override;
80
81 #if USE_CODECHAL_DEBUG_TOOL
82 //! \brief Dump the Sequense parameters
83 //!
84 //! \param [in] seqParams
85 //! Pointer to CODEC_HEVC_ENCODE_SEQUENCE_PARAMS
86 //!
87 //! \return MOS_STATUS
88 //! MOS_STATUS_SUCCESS if success, else fail reason
89 //!
90 MOS_STATUS DumpSeqParams(
91 const CODEC_HEVC_ENCODE_SEQUENCE_PARAMS *seqParams);
92
93 //! \brief Dump the picture parameters
94 //!
95 //! \param [in] picParams
96 //! Pointer to CODEC_HEVC_ENCODE_PICTURE_PARAMS
97 //!
98 //! \return MOS_STATUS
99 //! MOS_STATUS_SUCCESS if success, else fail reason
100 //!
101 MOS_STATUS DumpPicParams(
102 const CODEC_HEVC_ENCODE_PICTURE_PARAMS *picParams);
103
104 //! \brief Dump the slice parameters
105 //!
106 //! \param [in] sliceParams
107 //! Pointer to CODEC_HEVC_ENCODE_SLICE_PARAMS
108 //! \param [in] picParams
109 //! Pointer to CODEC_HEVC_ENCODE_PICTURE_PARAMS
110 //!
111 //! \return MOS_STATUS
112 //! MOS_STATUS_SUCCESS if success, else fail reason
113 //!
114 MOS_STATUS DumpSliceParams(
115 const CODEC_HEVC_ENCODE_SLICE_PARAMS *sliceParams,
116 const CODEC_HEVC_ENCODE_PICTURE_PARAMS *picParams);
117 #endif
118
119
120 MEDIA_CLASS_DEFINE_END(encode__HevcPipeline)
121 };
122
123 }
124 #endif // !__ENCODE_HEVC_PIPELINE_H__