| 1 |
/* |
| 2 |
* Copyright (c) 2011-2020, 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_setting.h |
| 24 |
//! \brief Defines class CodechalSetting |
| 25 |
//! |
| 26 |
#ifndef __CODECHAL_SETTING_H__ |
| 27 |
#define __CODECHAL_SETTING_H__ |
| 28 |
|
| 29 |
#include "codec_def_common.h" |
| 30 |
//! |
| 31 |
//! \class CodechalSetting |
| 32 |
//! \brief Settings used to finalize the creation of the CodecHal device |
| 33 |
//! |
| 34 |
class CodechalSetting |
| 35 |
{ |
| 36 |
public: |
| 37 |
CODECHAL_FUNCTION codecFunction = CODECHAL_FUNCTION_INVALID; //!< High level codec functionality requested. |
| 38 |
/*! \brief Width requested. |
| 39 |
* |
| 40 |
* For encode this width must be the maximum width for the entire stream to be encoded, for decode dynamic allocation is supported and this width is the largest width recieved. |
| 41 |
*/ |
| 42 |
uint32_t width = 0; |
| 43 |
/*! \brief Height requested. |
| 44 |
* |
| 45 |
* For encode this height must be the maximum height for the entire stream to be encoded, for decode dynamic allocation is supported and this height is the largest height recieved. |
| 46 |
*/ |
| 47 |
uint32_t height = 0; |
| 48 |
uint32_t mode = 0; //!< Mode requested (high level combination between Standard and CodecFunction). |
| 49 |
uint32_t standard = 0; //!< Codec standard requested. |
| 50 |
uint8_t lumaChromaDepth = 0; //!< Applies currently to HEVC only, specifies bit depth as either 8 or 10 bits. |
| 51 |
uint8_t chromaFormat = 0; //!< Applies currently to HEVC/VP9 only, specifies chromaformat as 420/422/444. |
| 52 |
bool intelEntrypointInUse = false; //!< Applies to decode only, application is using a Intel-specific entrypoint. |
| 53 |
bool shortFormatInUse = false; //!< Applies to decode only, application is passing short format slice data. |
| 54 |
|
| 55 |
bool disableDecodeSyncLock = false; //!< Flag to indicate if Decode O/P can be locked for sync. |
| 56 |
|
| 57 |
// Decode Downsampling |
| 58 |
bool downsamplingHinted = false; //!< Applies to decode only, application may request field scaling. |
| 59 |
|
| 60 |
bool disableUltraHME = false; //!< Applies currently to HEVC VDEnc only to disable UHME |
| 61 |
bool disableSuperHME = false; //!< Applies currently to HEVC VDEnc only to disable SHME |
| 62 |
void *cpParams = nullptr; //!< CP params |
| 63 |
bool isMfeEnabled = false; //!< Flag to indicate if Mfe is enabled. |
| 64 |
|
| 65 |
// Decode SFC enabling |
| 66 |
bool sfcEnablingHinted = false; //!< Applies to decode only, application may request field sfc. |
| 67 |
bool sfcInUseHinted = false; //!< Applies to decode only, application may request sfc engine. |
| 68 |
bool enableCodecMmc = true; //!< Applies to both of decode and encode, to indicate if codec MMC could be enabled by default |
| 69 |
bool secureMode = false; //!< secure decoder is required if enabled |
| 70 |
|
| 71 |
// HEVC Encode only |
| 72 |
bool isSCCEnabled = false; //!< Flag to indicate if HEVC SCC is enabled. |
| 73 |
|
| 74 |
bool isMmcEnabled = false; //!< Flag to indicate if Mmc is enabled |
| 75 |
|
| 76 |
bool isRenderHalNeeded = false; //!< Flag to indicate if RenderHal is needed |
| 77 |
|
| 78 |
uint32_t reservedMode = 0; |
| 79 |
|
| 80 |
bool isDualEncEnabled = false; //!< Flag to indicate if frame-split encoding in multi engies is needed |
| 81 |
|
| 82 |
|
| 83 |
//! |
| 84 |
//! \brief Destructor |
| 85 |
//! |
| 86 |
virtual ~CodechalSetting(){}; |
| 87 |
|
| 88 |
//! |
| 89 |
//! \brief Return the pointer to CP parameters |
| 90 |
//! |
| 91 |
void *GetCpParams() { return cpParams; }; |
| 92 |
|
| 93 |
//! |
| 94 |
//! \brief Return the indicate if cenc advance is used or not |
| 95 |
//! |
| 96 |
virtual bool CheckCencAdvance() {return false; }; |
| 97 |
|
| 98 |
//! |
| 99 |
//! \brief Create CodechalSetting instance |
| 100 |
//! |
| 101 |
static CodechalSetting *CreateCodechalSetting(); |
| 102 |
|
| 103 |
MEDIA_CLASS_DEFINE_END(CodechalSetting) |
| 104 |
}; |
| 105 |
|
| 106 |
#endif |