Debian Codegraph @

media_driver/agnostic/gen12/codec/hal/codechal_encode_jpeg_g12.h

raw
1 /*
2 * Copyright (c) 2017-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 //! \file codechal_encode_jpeg_g12.h
24 //! \brief Defines the encode interface extension for JPEG.
25 //! \details Defines all types, macros, and functions required by CodecHal for JPEG encoding. Definitions are not externally facing.
26 //!
27
28 #ifndef __CODECHAL_ENCODER_JPEG_G12_H__
29 #define __CODECHAL_ENCODER_JPEG_G12_H__
30
31 #include "codechal_encode_jpeg.h"
32 #include "codechal_encode_singlepipe_virtualengine.h"
33
34 class CodechalEncodeJpegStateG12: public CodechalEncodeJpegState
35 {
36 public:
37 PCODECHAL_ENCODE_SINGLEPIPE_VIRTUALENGINE_STATE m_sinlgePipeVeState; //!< single pipe virtual engine state
38 //!
39 //! \brief Constructor
40 //!
41 CodechalEncodeJpegStateG12(
42 CodechalHwInterface* hwInterface,
43 CodechalDebugInterface* debugInterface,
44 PCODECHAL_STANDARD_INFO standardInfo);
45 //!
46 //! \brief Destructor
47 //!
48 ~CodechalEncodeJpegStateG12();
49
50 //!
51 //! \brief Help function to send prolog with frame tracking information
52 //!
53 //! \param [in] cmdBuffer
54 //! Pointer to command buffer
55 //! \param [in] frameTrackingRequested
56 //! True if frame tracking info is needed, false otherwise
57 //!
58 //! \return MOS_STATUS
59 //! MOS_STATUS_SUCCESS if success, else fail reason
60 //!
61 MOS_STATUS SendPrologWithFrameTracking(
62 PMOS_COMMAND_BUFFER cmdBuffer,
63 bool frameTrackingRequested,
64 MHW_MI_MMIOREGISTERS *mmioRegister = nullptr) override;
65
66 //!
67 //! \brief Create and Initialize MMC state
68 //!
69 MOS_STATUS InitMmcState();
70
71 //derived from base class
72 MOS_STATUS Initialize(CodechalSetting *settings) override;
73
74 MOS_STATUS SubmitCommandBuffer(
75 PMOS_COMMAND_BUFFER cmdBuffer,
76 bool bNullRendering) override;
77
78 //!
79 //! \brief Set And Populate VE Hint parameters
80 //! \details Set Virtual Engine hint parameter and populate it to primary cmd buffer attributes
81 //! \param [in] cmdBuffer
82 //! Pointer to primary cmd buffer
83 //! \return MOS_STATUS
84 //! MOS_STATUS_SUCCESS if success, else fail reason
85 //!
86 MOS_STATUS SetAndPopulateVEHintParams(
87 PMOS_COMMAND_BUFFER cmdBuffer);
88
89 //!
90 //! \brief Encode User Feature Key Report.
91 //! \details Report user feature values set by encode.
92 //!
93 //! \return MOS_STATUS
94 //! MOS_STATUS_SUCCESS if success
95 //!
96 virtual MOS_STATUS UserFeatureKeyReport() override;
97
98 //!
99 //! \brief Set up params for gpu context creation
100 //! \return MOS_STATUS
101 //! MOS_STATUS_SUCCESS if success, else fail reason
102 //!
103 MOS_STATUS SetGpuCtxCreatOption() override;
104 };
105 #endif //__CODECHAL_ENCODER_JPEG_G12_H__