| 1 |
/* |
| 2 |
* Copyright (c) 2018, 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_g11.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_G11_H__ |
| 29 |
#define __CODECHAL_ENCODER_JPEG_G11_H__ |
| 30 |
|
| 31 |
#include "codechal_encode_jpeg.h" |
| 32 |
#include "codechal_encode_singlepipe_virtualengine.h" |
| 33 |
|
| 34 |
class CodechalEncodeJpegStateG11 : public CodechalEncodeJpegState |
| 35 |
{ |
| 36 |
public: |
| 37 |
|
| 38 |
PCODECHAL_ENCODE_SINGLEPIPE_VIRTUALENGINE_STATE m_sinlgePipeVeState; //!< single pipe virtual engine state |
| 39 |
|
| 40 |
//! |
| 41 |
//! \brief Constructor |
| 42 |
//! |
| 43 |
CodechalEncodeJpegStateG11( |
| 44 |
CodechalHwInterface* hwInterface, |
| 45 |
CodechalDebugInterface* debugInterface, |
| 46 |
PCODECHAL_STANDARD_INFO standardInfo); |
| 47 |
|
| 48 |
//! |
| 49 |
//! \brief Destructor |
| 50 |
//! |
| 51 |
virtual ~CodechalEncodeJpegStateG11(); |
| 52 |
|
| 53 |
//derived from base class |
| 54 |
MOS_STATUS Initialize(CodechalSetting *settings) override; |
| 55 |
|
| 56 |
//! |
| 57 |
//! \brief Encode frame in slice level. |
| 58 |
//! \details Call related encode functions to encode |
| 59 |
//! one frame in slice level. |
| 60 |
//! |
| 61 |
//! \return MOS_STATUS |
| 62 |
//! MOS_STATUS_SUCCESS if success |
| 63 |
//! |
| 64 |
virtual MOS_STATUS ExecuteSliceLevel() override; |
| 65 |
|
| 66 |
//! |
| 67 |
//! \brief Set And Populate VE Hint parameters |
| 68 |
//! \details Set Virtual Engine hint parameter and populate it to primary cmd buffer attributes |
| 69 |
//! \param [in] cmdBuffer |
| 70 |
//! Pointer to primary cmd buffer |
| 71 |
//! \return MOS_STATUS |
| 72 |
//! MOS_STATUS_SUCCESS if success, else fail reason |
| 73 |
//! |
| 74 |
MOS_STATUS SetAndPopulateVEHintParams( |
| 75 |
PMOS_COMMAND_BUFFER cmdBuffer); |
| 76 |
|
| 77 |
//! |
| 78 |
//! \brief Encode User Feature Key Report. |
| 79 |
//! \details Report user feature values set by encode. |
| 80 |
//! |
| 81 |
//! \return MOS_STATUS |
| 82 |
//! MOS_STATUS_SUCCESS if success |
| 83 |
//! |
| 84 |
virtual MOS_STATUS UserFeatureKeyReport() override; |
| 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() override; |
| 92 |
|
| 93 |
}; |
| 94 |
#endif //__CODECHAL_ENCODER_JPEG_G11_H__ |