| 1 | /* |
| 2 | * Copyright (c) 2011-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_jpeg_g11.h |
| 24 | //! \brief Defines the decode interface extension for JPEG. |
| 25 | //! \details Defines all types, macros, and functions required by CodecHal for JPEG decoding. Definitions are not externally facing. |
| 26 | //! |
| 27 | |
| 28 | #ifndef __CODECHAL_DECODER_JPEG_G11_H__ |
| 29 | #define __CODECHAL_DECODER_JPEG_G11_H__ |
| 30 | |
| 31 | #include "codechal_decode_jpeg.h" |
| 32 | #include "codechal_decode_singlepipe_virtualengine.h" |
| 33 | |
| 34 | //! |
| 35 | //! \class CodechalDecodeJpegG11 |
| 36 | //! \brief This class defines the member fields, functions etc used by GEN11 JPEG decoder. |
| 37 | //! |
| 38 | class CodechalDecodeJpegG11 : public CodechalDecodeJpeg |
| 39 | { |
| 40 | public: |
| 41 | //! |
| 42 | //! \brief Constructor |
| 43 | //! \param [in] hwInterface |
| 44 | //! Hardware interface |
| 45 | //! \param [in] debugInterface |
| 46 | //! Debug interface |
| 47 | //! \param [in] standardInfo |
| 48 | //! The information of decode standard for this instance |
| 49 | //! |
| 50 | CodechalDecodeJpegG11( |
| 51 | CodechalHwInterface *hwInterface, |
| 52 | CodechalDebugInterface* debugInterface, |
| 53 | PCODECHAL_STANDARD_INFO standardInfo); |
| 54 | |
| 55 | //! |
| 56 | //! \brief Copy constructor |
| 57 | //! |
| 58 | CodechalDecodeJpegG11(const CodechalDecodeJpegG11&) = delete; |
| 59 | |
| 60 | //! |
| 61 | //! \brief Copy assignment operator |
| 62 | //! |
| 63 | CodechalDecodeJpegG11& operator=(const CodechalDecodeJpegG11&) = delete; |
| 64 | |
| 65 | //! |
| 66 | //! \brief Destructor |
| 67 | //! |
| 68 | ~CodechalDecodeJpegG11(); |
| 69 | |
| 70 | MOS_STATUS AllocateStandard ( |
| 71 | CodechalSetting * settings) override; |
| 72 | |
| 73 | //! |
| 74 | //! \brief Set states for each frame to prepare for GEN11 JPEG decode |
| 75 | //! \return MOS_STATUS |
| 76 | //! MOS_STATUS_SUCCESS if success, else fail reason |
| 77 | //! |
| 78 | MOS_STATUS SetFrameStates() override; |
| 79 | |
| 80 | MOS_STATUS DecodeStateLevel() override; |
| 81 | |
| 82 | MOS_STATUS DecodePrimitiveLevel() override; |
| 83 | |
| 84 | protected: |
| 85 | |
| 86 | //! |
| 87 | //! \brief Set up params for gpu context creation |
| 88 | //! \return MOS_STATUS |
| 89 | //! MOS_STATUS_SUCCESS if success, else fail reason |
| 90 | //! |
| 91 | MOS_STATUS SetGpuCtxCreatOption(CodechalSetting * settings) override; |
| 92 | |
| 93 | PCODECHAL_DECODE_SINGLEPIPE_VIRTUALENGINE_STATE m_veState = nullptr; //!< single pipe virtual engine state |
| 94 | }; |
| 95 | |
| 96 | #endif // __CODECHAL_DECODER_JPEG_G11_H__ |