| 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_vdenc_avc_g9.cpp |
| 24 |
//! \brief This file implements the C++ class/interface for Gen9 platform's AVC |
| 25 |
//! VDEnc encoding to be used CODECHAL components. |
| 26 |
//! |
| 27 |
|
| 28 |
#include "codechal_vdenc_avc_g9.h" |
| 29 |
#include "codeckrnheader.h" |
| 30 |
#if defined(ENABLE_KERNELS) && !defined(_FULL_OPEN_SOURCE) |
| 31 |
#include "igcodeckrn_g9.h" |
| 32 |
#endif |
| 33 |
#if USE_CODECHAL_DEBUG_TOOL |
| 34 |
#include "codechal_debug_encode_par_g9.h" |
| 35 |
#endif |
| 36 |
|
| 37 |
CodechalVdencAvcStateG9::CodechalVdencAvcStateG9( |
| 38 |
CodechalHwInterface * hwInterface, |
| 39 |
CodechalDebugInterface *debugInterface, |
| 40 |
PCODECHAL_STANDARD_INFO standardInfo) : CodechalVdencAvcState(hwInterface, debugInterface, standardInfo) |
| 41 |
{ |
| 42 |
#if defined(ENABLE_KERNELS) && !defined(_FULL_OPEN_SOURCE) |
| 43 |
m_kernelBase = (uint8_t*)IGCODECKRN_G9; |
| 44 |
#endif |
| 45 |
m_kuid = IDR_CODEC_AllAVCEnc; |
| 46 |
AddIshSize(m_kuid, m_kernelBase); |
| 47 |
|
| 48 |
m_cmKernelEnable = true; |
| 49 |
m_mbStatsSupported = true; //Starting from GEN9 |
| 50 |
|
| 51 |
m_needCheckCpEnabled = true; |
| 52 |
|
| 53 |
m_hmeSupported = true; |
| 54 |
m_16xMeSupported = true; |
| 55 |
m_32xMeSupported = true; |
| 56 |
|
| 57 |
CODECHAL_DEBUG_TOOL( |
| 58 |
CODECHAL_ENCODE_CHK_NULL_NO_STATUS_RETURN(m_encodeParState = MOS_New(CodechalDebugEncodeParG9, this)); |
| 59 |
CreateAvcPar(); |
| 60 |
) |
| 61 |
} |
| 62 |
|
| 63 |
CodechalVdencAvcStateG9::~CodechalVdencAvcStateG9() |
| 64 |
{ |
| 65 |
CODECHAL_ENCODE_FUNCTION_ENTER; |
| 66 |
|
| 67 |
CODECHAL_DEBUG_TOOL( |
| 68 |
DestroyAvcPar(); |
| 69 |
MOS_Delete(m_encodeParState); |
| 70 |
) |
| 71 |
} |