| 1 |
/* |
| 2 |
* Copyright (c) 2011, 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 BRCIF.h |
| 24 |
//! \brief This modules implements the interface for BRC dll |
| 25 |
//! |
| 26 |
#ifndef _BRCIF_H__ |
| 27 |
#define _BRCIF_H__ |
| 28 |
|
| 29 |
//! |
| 30 |
//! \enum ErrorCode |
| 31 |
//! \brief Error code |
| 32 |
//! |
| 33 |
enum ErrorCode { |
| 34 |
SUCCEED = 0, |
| 35 |
NO_CURBE, |
| 36 |
NO_HISTORY, |
| 37 |
NO_CONSTANT, |
| 38 |
NO_DISTORTION, |
| 39 |
NO_PAK, |
| 40 |
NO_ENC, |
| 41 |
NO_IMGSTATE, |
| 42 |
NO_MBQP, |
| 43 |
UNKNOWN_PROCESSTYPE, |
| 44 |
UNKNOWN_BUFFERTYPE, |
| 45 |
UNKNOWN_ERROR |
| 46 |
}; |
| 47 |
|
| 48 |
//! |
| 49 |
//! \enum ProcessType |
| 50 |
//! \brief Process type |
| 51 |
//! |
| 52 |
enum ProcessType { |
| 53 |
UnknownProc = 0, |
| 54 |
BRCInit, |
| 55 |
BRCReset, |
| 56 |
BRCUpdate, |
| 57 |
BRCUpdateLD |
| 58 |
}; |
| 59 |
|
| 60 |
//! |
| 61 |
//! \enum BufferType |
| 62 |
//! \brief Buffer type |
| 63 |
//! |
| 64 |
enum BufferType { |
| 65 |
UnknownBuff = 0, |
| 66 |
CURBE, |
| 67 |
HISTORY, |
| 68 |
CONSTANT, |
| 69 |
DISTORTION, |
| 70 |
PAK, |
| 71 |
ENC, |
| 72 |
IMGSTATE, |
| 73 |
MBQP, |
| 74 |
STATISTICS |
| 75 |
}; |
| 76 |
|
| 77 |
//! |
| 78 |
//! \enum HEVCBufferType |
| 79 |
//! \brief HEVC buffer type |
| 80 |
//! |
| 81 |
enum HEVCBufferType { |
| 82 |
HEVC_UnknownBuff = 0, |
| 83 |
HEVC_CURBE, |
| 84 |
HEVC_HISTORY, |
| 85 |
HEVC_CONSTANT, |
| 86 |
HEVC_DISTORTION, |
| 87 |
HEVC_PAK, |
| 88 |
HEVC_ENC, |
| 89 |
HEVC_IMGSTATEI, |
| 90 |
HEVC_IMGSTATEO, |
| 91 |
HEVC_STATISTICS, |
| 92 |
HEVC_HMEINFO, |
| 93 |
HEVC_MBQP, |
| 94 |
HEVC_INITCURBE, |
| 95 |
HEVC_INTRADIST, |
| 96 |
HEVC_EXTD |
| 97 |
}; |
| 98 |
|
| 99 |
//! |
| 100 |
//! \enum HevcVdencBufferType |
| 101 |
//! \brief HEVC VDEnc Buffer type |
| 102 |
//! |
| 103 |
enum HevcVdencBufferType { |
| 104 |
HEVCVDENC_UnknownBuff = 0, |
| 105 |
HEVCVDENC_INLINE_DMEM, |
| 106 |
HEVCVDENC_HISTORY_BUFF, |
| 107 |
HEVCVDENC_VDENC_STATISTICS_BUFF, |
| 108 |
HEVCVDENC_PAK_STATISTICS_BUFF, |
| 109 |
HEVCVDENC_INPUT_SLBB_BUFF, |
| 110 |
HEVCVDENC_BRC_DATA_BUFF, |
| 111 |
HEVCVDENC_CONSTANT_DATA_BUFF, |
| 112 |
HEVCVDENC_OUTPUT_SLBB_BUFF, |
| 113 |
HEVCVDENC_PAKMMIO_BUFF, |
| 114 |
HEVCVDENC_SLICE_STATE_BUFF, |
| 115 |
HEVCVDENC_INPUT_STREAMIN_BUFF, |
| 116 |
HEVCVDENC_INPUT_DELTAQP_BUFF, |
| 117 |
HEVCVDENC_OUTPUT_STREAMIN_BUFF, |
| 118 |
HEVCVDENC_AUX_BUFF |
| 119 |
}; |
| 120 |
|
| 121 |
enum LAErrorCode |
| 122 |
{ |
| 123 |
LA_SUCCEED = 0, |
| 124 |
LA_NO_INLINE_DMEM, |
| 125 |
LA_NO_HISTORY, |
| 126 |
LA_NO_FRAME_STATISTICS, |
| 127 |
LA_NO_OUTPUT, |
| 128 |
LA_UNKNOWN_PROCESSTYPE, |
| 129 |
LA_UNKNOWN_BUFFERTYPE, |
| 130 |
LA_UNKNOWN_ERROR |
| 131 |
}; |
| 132 |
|
| 133 |
enum LAProcessType |
| 134 |
{ |
| 135 |
LookaheadUnknownProc = 0, |
| 136 |
LookaheadInit, |
| 137 |
LookaheadReset, |
| 138 |
LookaheadUpdate |
| 139 |
}; |
| 140 |
|
| 141 |
enum LABufferType |
| 142 |
{ |
| 143 |
LA_UnknownBuff = 0, |
| 144 |
LA_INLINE_DMEM, |
| 145 |
LA_HISTORY_BUFF, |
| 146 |
LA_FRAME_STATISTICS_BUFF, |
| 147 |
LA_OUTPUT_BUFF, |
| 148 |
LA_AUX_BUFF = 15 |
| 149 |
}; |
| 150 |
|
| 151 |
extern "C" void * MC_CreateInstance(ProcessType processor); |
| 152 |
|
| 153 |
extern "C" void MC_ReleaseInstance(void *obj); |
| 154 |
|
| 155 |
extern "C" int MC_Process(void *obj); |
| 156 |
|
| 157 |
extern "C" int MC_SetBuff(unsigned char *buf, BufferType type, void *obj); |
| 158 |
|
| 159 |
#endif |