Debian Codegraph @

media_softlet/agnostic/common/codec/hal/enc/jpeg/pipeline/encode_jpeg_pipeline.h

raw
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 //! \file encode_jpeg_pipeline.h
24 //! \brief Defines the interface for jpeg encode pipeline
25 //!
26 #ifndef __ENCODE_JPEG_PIPELINE_H__
27 #define __ENCODE_JPEG_PIPELINE_H__
28
29 #include "encode_pipeline.h"
30
31 namespace encode {
32
33 class JpegPipeline : public EncodePipeline
34 {
35 public:
36 //!
37 //! \brief JpegPipeline constructor
38 //! \param [in] hwInterface
39 //! Pointer to CodechalHwInterface
40 //! \param [in] debugInterface
41 //! Pointer to CodechalDebugInterface
42 //!
43 JpegPipeline(
44 CodechalHwInterfaceNext * hwInterface,
45 CodechalDebugInterface *debugInterface);
46
47 virtual ~JpegPipeline() {}
48
49 virtual MOS_STATUS Prepare(void *params) override;
50
51 virtual MOS_STATUS Execute() override;
52
53 virtual MOS_STATUS GetStatusReport(void *status, uint16_t numStatus) override;
54
55 virtual MOS_STATUS Destroy() override;
56
57 virtual MOS_STATUS Init(void *settings) override;
58
59 virtual MOS_STATUS InitMmcState();
60
61 protected:
62 virtual MOS_STATUS Initialize(void *settings) override;
63 virtual MOS_STATUS Uninitialize() override;
64 virtual MOS_STATUS UserFeatureReport() override;
65 virtual MOS_STATUS CreateBufferTracker() override;
66 virtual MOS_STATUS CreateStatusReport() override;
67 virtual MOS_STATUS CreateFeatureManager() override;
68 virtual MOS_STATUS InitUserSetting(MediaUserSettingSharedPtr userSettingPtr) override;
69
70 //!
71 //! \brief Activate necessary packets
72 //!
73 //! \return MOS_STATUS
74 //! MOS_STATUS_SUCCESS if success, else fail reason
75 //!
76 virtual MOS_STATUS ActivateVideoPackets();
77
78 //!
79 //! \brief Reset parameters after execute active packets
80 //!
81 //! \return MOS_STATUS
82 //! MOS_STATUS_SUCCESS if success, else fail reason
83 //!
84 virtual MOS_STATUS ResetParams();
85
86 enum PacketIds
87 {
88 baseJpegPacket = CONSTRUCTPACKETID(PACKET_COMPONENT_ENCODE, PACKET_SUBCOMPONENT_JPEG, 0)
89 };
90
91 MEDIA_CLASS_DEFINE_END(encode__JpegPipeline)
92 };
93
94 }
95 #endif // !__ENCODE_JPEG_PIPELINE_H__