| 1 |
/* |
| 2 |
* Copyright (c) 2020-2024, 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 mhw_vdbox_avp_cmdpar.h |
| 24 |
//! \brief MHW command parameters |
| 25 |
//! \details |
| 26 |
//! |
| 27 |
|
| 28 |
#ifndef __MHW_VDBOX_AVP_CMDPAR_H__ |
| 29 |
#define __MHW_VDBOX_AVP_CMDPAR_H__ |
| 30 |
|
| 31 |
#include "codec_def_common_encode.h" |
| 32 |
#include "codec_def_common_av1.h" |
| 33 |
#include "codec_def_decode_av1.h" |
| 34 |
#include "mhw_vdbox.h" |
| 35 |
#include "mhw_vdbox_cmdpar.h" |
| 36 |
|
| 37 |
#ifdef _MEDIA_RESERVED |
| 38 |
#include "mhw_vdbox_avp_cmdpar_ext.h" |
| 39 |
#define __MHW_VDBOX_AVP_WRAPPER(STUFF) |
| 40 |
#define __MHW_VDBOX_AVP_WRAPPER_EXT(STUFF) STUFF |
| 41 |
#else |
| 42 |
#define __MHW_VDBOX_AVP_WRAPPER(STUFF) STUFF |
| 43 |
#define __MHW_VDBOX_AVP_WRAPPER_EXT(STUFF) |
| 44 |
#endif |
| 45 |
|
| 46 |
namespace mhw |
| 47 |
{ |
| 48 |
namespace vdbox |
| 49 |
{ |
| 50 |
namespace avp |
| 51 |
{ |
| 52 |
|
| 53 |
enum class SURFACE_FORMAT |
| 54 |
{ |
| 55 |
SURFACE_FORMAT_P010VARIANT = 3, |
| 56 |
SURFACE_FORMAT_PLANAR4208 = 4, |
| 57 |
SURFACE_FORMAT_P010 = 13, |
| 58 |
}; |
| 59 |
|
| 60 |
enum AvpBufferType |
| 61 |
{ |
| 62 |
segmentIdBuffer = 0, //!< segment ID temporal buffers |
| 63 |
mvTemporalBuffer, //!< MV temporal buffers of both current and collocated |
| 64 |
bsdLineBuffer, //!< bitstream decode line buffer |
| 65 |
bsdTileLineBuffer, //!< bitstream decode tile line buffer |
| 66 |
intraPredLineBuffer, //!< intra prediction line buffer |
| 67 |
intraPredTileLineBuffer, |
| 68 |
spatialMvLineBuffer, |
| 69 |
spatialMvTileLineBuffer, |
| 70 |
lrMetaTileColBuffer, //!< Loop Restoration Meta Tile Column Read/Write Buffer Address |
| 71 |
lrTileLineYBuffer, //!< Loop Restoration Filter Tile Read/Write Line Y Buffer Address |
| 72 |
lrTileLineUBuffer, //!< Loop Restoration Filter Tile Read/Write Line U Buffer Address |
| 73 |
lrTileLineVBuffer, //!< Loop Restoration Filter Tile Read/Write Line V Buffer Address |
| 74 |
deblockLineYBuffer, |
| 75 |
deblockLineUBuffer, |
| 76 |
deblockLineVBuffer, |
| 77 |
deblockTileLineYBuffer, |
| 78 |
deblockTileLineVBuffer, |
| 79 |
deblockTileLineUBuffer, |
| 80 |
deblockTileColYBuffer, |
| 81 |
deblockTileColUBuffer, |
| 82 |
deblockTileColVBuffer, |
| 83 |
cdefLineBuffer, |
| 84 |
cdefTileLineBuffer, |
| 85 |
cdefTileColBuffer, |
| 86 |
cdefMetaTileLineBuffer, |
| 87 |
cdefMetaTileColBuffer, |
| 88 |
cdefTopLeftCornerBuffer, |
| 89 |
superResTileColYBuffer, |
| 90 |
superResTileColUBuffer, |
| 91 |
superResTileColVBuffer, |
| 92 |
lrTileColYBuffer, |
| 93 |
lrTileColUBuffer, |
| 94 |
lrTileColVBuffer, |
| 95 |
frameStatusErrBuffer, |
| 96 |
dbdStreamoutBuffer, |
| 97 |
fgTileColBuffer, |
| 98 |
fgSampleTmpBuffer, |
| 99 |
lrTileColAlignBuffer, |
| 100 |
tileSzStreamOutBuffer, |
| 101 |
tileStatStreamOutBuffer, |
| 102 |
cuStreamoutBuffer, |
| 103 |
sseLineBuffer, |
| 104 |
sseTileLineBuffer, |
| 105 |
avpInternalBufferMax |
| 106 |
}; |
| 107 |
|
| 108 |
struct AvpBufferSizePar |
| 109 |
{ |
| 110 |
uint8_t bitDepthIdc; |
| 111 |
uint32_t width; |
| 112 |
uint32_t height; |
| 113 |
uint32_t tileWidth; |
| 114 |
uint32_t bufferSize; |
| 115 |
bool isSb128x128; |
| 116 |
uint32_t curFrameTileNum; |
| 117 |
uint32_t numTileCol; |
| 118 |
uint8_t numOfActivePipes; |
| 119 |
uint16_t chromaFormat; |
| 120 |
}; |
| 121 |
|
| 122 |
struct AvpVdboxRowStorePar |
| 123 |
{ |
| 124 |
uint32_t mode; |
| 125 |
uint32_t picWidth; |
| 126 |
uint32_t mbaff; |
| 127 |
bool isFrame; |
| 128 |
uint8_t bitDepthMinus8; |
| 129 |
uint8_t chromaFormat; |
| 130 |
uint8_t lcuSize; |
| 131 |
}; |
| 132 |
|
| 133 |
struct _MHW_PAR_T(AVP_PIPE_MODE_SELECT) |
| 134 |
{ |
| 135 |
uint8_t codecSelect = 0; |
| 136 |
bool cdefOutputStreamoutEnableFlag = false; |
| 137 |
bool lrOutputStreamoutEnableFlag = false; |
| 138 |
bool picStatusErrorReportEnable = false; |
| 139 |
uint8_t codecStandardSelect = 0; |
| 140 |
MHW_VDBOX_HCP_MULTI_ENGINE_MODE multiEngineMode = MHW_VDBOX_HCP_MULTI_ENGINE_MODE_FE_LEGACY; |
| 141 |
MHW_VDBOX_HCP_PIPE_WORK_MODE pipeWorkingMode = MHW_VDBOX_HCP_PIPE_WORK_MODE_LEGACY; |
| 142 |
bool tileBasedReplayMode = false; |
| 143 |
bool picStatusErrorReportId = false; |
| 144 |
uint8_t phaseIndicator = 0; |
| 145 |
bool frameReconDisable = false; |
| 146 |
bool vdencMode = false; |
| 147 |
bool tileStatsStreamoutEnable = false; |
| 148 |
bool motionCompMemTrackerCounterEnable = false; |
| 149 |
bool pakFrameLevelStreamOutEnable = false; |
| 150 |
bool motionCompMemoryTrackerCntEnable = false; |
| 151 |
uint8_t srcPixelPrefetchLen = 0; |
| 152 |
bool srcPixelPrefetchEnable = false; |
| 153 |
bool sseEnable = false; |
| 154 |
}; |
| 155 |
|
| 156 |
struct _MHW_PAR_T(AVP_PIC_STATE) |
| 157 |
{ |
| 158 |
uint32_t frameWidthMinus1 = 0; |
| 159 |
uint32_t frameHeightMinus1 = 0; |
| 160 |
|
| 161 |
uint8_t frameType = 0; |
| 162 |
uint8_t primaryRefFrame = 0; |
| 163 |
bool applyFilmGrainFlag = 0; |
| 164 |
bool deltaQPresentFlag = false; |
| 165 |
uint8_t log2DeltaQRes = 0; |
| 166 |
bool codedLossless = false; |
| 167 |
uint16_t baseQindex = 0; |
| 168 |
int8_t yDcDeltaQ = 0; |
| 169 |
int8_t uDcDeltaQ = 0; |
| 170 |
int8_t uAcDeltaQ = 0; |
| 171 |
int8_t vDcDeltaQ = 0; |
| 172 |
int8_t vAcDeltaQ = 0; |
| 173 |
bool allowHighPrecisionMV = false; |
| 174 |
bool referenceSelect = false; |
| 175 |
uint8_t interpFilter = 0; |
| 176 |
uint16_t currentOrderHint = 0; |
| 177 |
bool reducedTxSetUsed = false; |
| 178 |
uint8_t txMode = 0; |
| 179 |
bool skipModePresent = false; |
| 180 |
uint8_t globalMotionType[7] = {}; |
| 181 |
uint8_t refFrameIdx[8] = {}; |
| 182 |
|
| 183 |
CodecAv1SegmentsParams segmentParams = {}; |
| 184 |
|
| 185 |
uint8_t bitDepthIdc = 0; |
| 186 |
uint8_t chromaFormat = 0; |
| 187 |
uint32_t superblockSizeUsed = 0; |
| 188 |
uint8_t skipModeFrame[2] = {}; |
| 189 |
uint8_t refFrameSide = 0; |
| 190 |
uint8_t refFrameBiasFlag = 0; |
| 191 |
uint8_t frameLevelGlobalMotionInvalidFlags = 0; |
| 192 |
uint32_t warpParamsArrayProjection[21] = {}; |
| 193 |
uint32_t refFrameRes[8] = {}; |
| 194 |
uint32_t refScaleFactor[8] = {}; |
| 195 |
uint8_t refOrderHints[8] = {}; |
| 196 |
uint32_t errorResilientMode = 0; |
| 197 |
|
| 198 |
bool enableOrderHint = false; |
| 199 |
bool enableCDEF = false; |
| 200 |
bool enableSuperres = false; |
| 201 |
bool enableRestoration = false; |
| 202 |
bool enableFilterIntra = false; |
| 203 |
bool enableIntraEdgeFilter = false; |
| 204 |
bool enableDualFilter = false; |
| 205 |
bool enableInterIntraCompound = false; |
| 206 |
bool enableMaskedCompound = false; |
| 207 |
bool enableJointCompound = false; |
| 208 |
bool forceIntegerMv = false; |
| 209 |
bool allowWarpedMotion = false; |
| 210 |
bool enableLargeScaleTile = false; |
| 211 |
bool motionModeSwitchable = false; |
| 212 |
bool useReferenceFrameMvSet = false; |
| 213 |
|
| 214 |
uint8_t orderHintBitsMinus1 = 0; |
| 215 |
|
| 216 |
bool notFirstPass = false; |
| 217 |
bool vdencPackOnlyPass = false; |
| 218 |
bool frameBitRateMaxReportMask = false; |
| 219 |
bool frameBitRateMinReportMask = false; |
| 220 |
bool headerPresent = false; |
| 221 |
|
| 222 |
uint32_t frameBitRateMax = 0; |
| 223 |
uint32_t frameBitRateMaxUnit = 0; // select unit - 0 : 32B, 1 : 4KB |
| 224 |
uint32_t frameBitRateMin = 0; |
| 225 |
uint32_t frameBitRateMinUnit = 0; // select unit - 0 : 32B, 1 : 4KB |
| 226 |
|
| 227 |
uint32_t frameDeltaQindexMax[2] = {}; |
| 228 |
uint32_t frameDeltaQindexMin = 0; |
| 229 |
|
| 230 |
uint32_t frameDeltaLFMax[2] = {}; |
| 231 |
uint32_t frameDeltaLFMin = 0; |
| 232 |
|
| 233 |
uint32_t frameDeltaQindexLFMaxRange[2] = {}; |
| 234 |
uint32_t frameDeltaQindexLFMinRange = 0; |
| 235 |
|
| 236 |
uint32_t minFramSize = 0; |
| 237 |
uint32_t minFramSizeUnits = 0; |
| 238 |
|
| 239 |
uint32_t bitOffsetForFirstPartitionSize = 0; |
| 240 |
|
| 241 |
uint32_t class0_SSE_Threshold0 = 0; |
| 242 |
uint32_t class0_SSE_Threshold1 = 0; |
| 243 |
|
| 244 |
uint32_t rdmult = 0; |
| 245 |
|
| 246 |
int32_t sbMaxBitSizeAllowed = 0; |
| 247 |
bool sbMaxSizeReportMask = false; |
| 248 |
|
| 249 |
bool autoBistreamStitchingInHardware = false; |
| 250 |
|
| 251 |
bool postCdefReconPixelStreamoutEn = false; |
| 252 |
|
| 253 |
bool allowScreenContentTools = false; |
| 254 |
bool allowIntraBC = false; |
| 255 |
bool VdaqmEnable = false; |
| 256 |
|
| 257 |
__MHW_VDBOX_AVP_WRAPPER_EXT(AVP_PIC_STATE_CMDPAR_EXT); |
| 258 |
}; |
| 259 |
|
| 260 |
struct _MHW_PAR_T(AVP_INLOOP_FILTER_STATE) |
| 261 |
{ |
| 262 |
uint8_t loopFilterLevel[4] = {}; |
| 263 |
uint8_t loopFilterSharpness = 0; |
| 264 |
bool loopFilterDeltaEnabled = 0; |
| 265 |
uint8_t deltaLfRes = 0; |
| 266 |
uint8_t deltaLfMulti = 0; |
| 267 |
bool loopFilterDeltaUpdate = false; |
| 268 |
|
| 269 |
int8_t loopFilterRefDeltas[8] = {}; |
| 270 |
int8_t loopFilterModeDeltas[2] = {}; |
| 271 |
|
| 272 |
uint8_t cdefYStrength[8] = {}; |
| 273 |
uint8_t cdefUVStrength[8] = {}; |
| 274 |
uint8_t cdefBits = 0; |
| 275 |
uint8_t cdefDampingMinus3 = 0; |
| 276 |
|
| 277 |
//super-resolution; |
| 278 |
uint32_t superresUpscaledWidthMinus1 = 0; |
| 279 |
uint8_t superresDenom = 0; |
| 280 |
int32_t lumaPlaneXStepQn = 0; |
| 281 |
int32_t lumaPlaneX0Qn = 0; |
| 282 |
int32_t chromaPlaneXStepQn = 0; |
| 283 |
int32_t chromaPlaneX0Qn = 0; |
| 284 |
|
| 285 |
//loop restoration; |
| 286 |
uint8_t LoopRestorationType[3] = {}; |
| 287 |
uint8_t LoopRestorationSizeLuma = 0; |
| 288 |
bool UseSameLoopRestorationSizeForChroma = false; |
| 289 |
}; |
| 290 |
|
| 291 |
struct _MHW_PAR_T(AVP_TILE_CODING) |
| 292 |
{ |
| 293 |
uint16_t tileId = 0; |
| 294 |
uint16_t tgTileNum = 0; //!< Tile ID in its Tile group |
| 295 |
uint16_t tileGroupId = 0; |
| 296 |
|
| 297 |
uint16_t tileColPositionInSb = 0; |
| 298 |
uint16_t tileRowPositionInSb = 0; |
| 299 |
|
| 300 |
uint16_t tileWidthInSbMinus1 = 0; //!< Tile width minus 1 in SB unit |
| 301 |
uint16_t tileHeightInSbMinus1 = 0; //!< Tile height minus 1 in SB unit |
| 302 |
|
| 303 |
bool tileRowIndependentFlag = false; |
| 304 |
bool firstTileInAFrame = false; |
| 305 |
bool lastTileOfColumn = false; |
| 306 |
bool lastTileOfRow = false; |
| 307 |
bool firstTileOfTileGroup = false; |
| 308 |
bool lastTileOfTileGroup = false; |
| 309 |
bool lastTileOfFrame = false; |
| 310 |
bool disableCdfUpdateFlag = false; |
| 311 |
bool disableFrameContextUpdateFlag = false; |
| 312 |
#if (_DEBUG || _RELEASE_INTERNAL) |
| 313 |
bool enableAvpDebugMode = false; |
| 314 |
#endif |
| 315 |
|
| 316 |
uint8_t numOfActiveBePipes = 0; |
| 317 |
uint16_t numOfTileColumnsInFrame = 0; |
| 318 |
uint16_t numOfTileRowsInFrame = 0; |
| 319 |
uint16_t outputDecodedTileColPos = 0; |
| 320 |
uint16_t outputDecodedTileRowPos = 0; |
| 321 |
}; |
| 322 |
|
| 323 |
struct _MHW_PAR_T(AVP_SEGMENT_STATE) |
| 324 |
{ |
| 325 |
uint8_t numSegments = 1; |
| 326 |
CodecAv1SegmentsParams av1SegmentParams = {}; |
| 327 |
uint8_t currentSegmentId = 0; |
| 328 |
}; |
| 329 |
|
| 330 |
struct _MHW_PAR_T(AVP_PIPE_BUF_ADDR_STATE) |
| 331 |
{ |
| 332 |
PMOS_RESOURCE refs[8] = {}; |
| 333 |
MOS_MEMCOMP_STATE mmcStatePreDeblock = MOS_MEMCOMP_DISABLED; |
| 334 |
MOS_MEMCOMP_STATE mmcStateRawSurf = MOS_MEMCOMP_DISABLED; |
| 335 |
PMOS_SURFACE decodedPic = nullptr; |
| 336 |
PMOS_RESOURCE intrabcDecodedOutputFrameBuffer = nullptr; |
| 337 |
PMOS_RESOURCE cdfTableInitBuffer = nullptr; |
| 338 |
uint32_t cdfTableInitBufferOffset = 0; |
| 339 |
PMOS_RESOURCE cdfTableBwdAdaptBuffer = nullptr; |
| 340 |
PMOS_RESOURCE segmentIdReadBuffer = nullptr; |
| 341 |
PMOS_RESOURCE segmentIdWriteBuffer = nullptr; |
| 342 |
PMOS_RESOURCE colMvTempBuffer[9] = {}; |
| 343 |
PMOS_RESOURCE curMvTempBuffer = nullptr; |
| 344 |
PMOS_RESOURCE bsLineRowstoreBuffer = nullptr; |
| 345 |
PMOS_RESOURCE bsTileLineRowstoreBuffer = nullptr; |
| 346 |
PMOS_RESOURCE intraPredLineRowstoreBuffer = nullptr; |
| 347 |
PMOS_RESOURCE intraPredTileLineRowstoreBuffer = nullptr; |
| 348 |
PMOS_RESOURCE spatialMVLineBuffer = nullptr; |
| 349 |
PMOS_RESOURCE spatialMVCodingTileLineBuffer = nullptr; |
| 350 |
PMOS_RESOURCE lrMetaTileColumnBuffer = nullptr; |
| 351 |
PMOS_RESOURCE lrTileLineYBuffer = nullptr; |
| 352 |
PMOS_RESOURCE lrTileLineUBuffer = nullptr; |
| 353 |
PMOS_RESOURCE lrTileLineVBuffer = nullptr; |
| 354 |
PMOS_RESOURCE deblockLineYBuffer = nullptr; |
| 355 |
PMOS_RESOURCE deblockLineUBuffer = nullptr; |
| 356 |
PMOS_RESOURCE deblockLineVBuffer = nullptr; |
| 357 |
PMOS_RESOURCE deblockTileLineYBuffer = nullptr; |
| 358 |
PMOS_RESOURCE deblockTileLineVBuffer = nullptr; |
| 359 |
PMOS_RESOURCE deblockTileLineUBuffer = nullptr; |
| 360 |
PMOS_RESOURCE deblockTileColumnYBuffer = nullptr; |
| 361 |
PMOS_RESOURCE deblockTileColumnUBuffer = nullptr; |
| 362 |
PMOS_RESOURCE deblockTileColumnVBuffer = nullptr; |
| 363 |
PMOS_RESOURCE cdefLineBuffer = nullptr; |
| 364 |
PMOS_RESOURCE cdefTileLineBuffer = nullptr; |
| 365 |
PMOS_RESOURCE cdefTileColumnBuffer = nullptr; |
| 366 |
PMOS_RESOURCE cdefMetaTileLineBuffer = nullptr; |
| 367 |
PMOS_RESOURCE cdefMetaTileColumnBuffer = nullptr; |
| 368 |
PMOS_RESOURCE cdefTopLeftCornerBuffer = nullptr; |
| 369 |
PMOS_RESOURCE superResTileColumnYBuffer = nullptr; |
| 370 |
PMOS_RESOURCE superResTileColumnUBuffer = nullptr; |
| 371 |
PMOS_RESOURCE superResTileColumnVBuffer = nullptr; |
| 372 |
PMOS_RESOURCE lrTileColumnYBuffer = nullptr; |
| 373 |
PMOS_RESOURCE lrTileColumnUBuffer = nullptr; |
| 374 |
PMOS_RESOURCE lrTileColumnVBuffer = nullptr; |
| 375 |
PMOS_RESOURCE lrTileColumnAlignBuffer = nullptr; |
| 376 |
PMOS_RESOURCE decodedFrameStatusErrorBuffer = nullptr; |
| 377 |
PMOS_RESOURCE decodedBlockDataStreamoutBuffer = nullptr; |
| 378 |
PMOS_RESOURCE originalPicSourceBuffer = nullptr; |
| 379 |
PMOS_RESOURCE dsPictureSourceBuffer = nullptr; |
| 380 |
PMOS_RESOURCE tileSizeStreamoutBuffer = nullptr; |
| 381 |
uint32_t tileSizeStreamoutBufferOffset = 0; |
| 382 |
PMOS_RESOURCE tileStatisticsPakStreamoutBuffer = nullptr; |
| 383 |
PMOS_RESOURCE cuStreamoutBuffer = nullptr; |
| 384 |
PMOS_RESOURCE sseLineBuffer = nullptr; |
| 385 |
PMOS_RESOURCE sseTileLineBuffer = nullptr; |
| 386 |
PMOS_SURFACE postCDEFpixelsBuffer = nullptr; |
| 387 |
MOS_MEMCOMP_STATE postCdefSurfMmcState = MOS_MEMCOMP_DISABLED; |
| 388 |
|
| 389 |
PMOS_RESOURCE filmGrainTileColumnDataBuffer = nullptr; |
| 390 |
PMOS_RESOURCE filmGrainSampleTemplateBuffer = nullptr; |
| 391 |
PMOS_RESOURCE filmGrainOutputSurface = nullptr; |
| 392 |
}; |
| 393 |
|
| 394 |
struct _MHW_PAR_T(AVP_INTER_PRED_STATE) |
| 395 |
{ |
| 396 |
uint8_t savedRefOrderHints[7][7]; |
| 397 |
uint8_t refMaskMfProj; |
| 398 |
}; |
| 399 |
|
| 400 |
struct _MHW_PAR_T(AVP_IND_OBJ_BASE_ADDR_STATE) |
| 401 |
{ |
| 402 |
uint32_t Mode = 0; |
| 403 |
PMOS_RESOURCE dataBuffer = nullptr; |
| 404 |
uint32_t dataSize = 0; |
| 405 |
uint32_t dataOffset = 0; |
| 406 |
PMOS_RESOURCE mvObjectBuffer = nullptr; |
| 407 |
uint32_t mvObjectSize = 0; |
| 408 |
uint32_t mvObjectOffset = 0; |
| 409 |
PMOS_RESOURCE pakBaseObjectBuffer = nullptr; |
| 410 |
uint32_t pakBaseObjectSize = 0; |
| 411 |
uint32_t pakBaseObjectOffset = 0; |
| 412 |
PMOS_RESOURCE pakTileSizeStasBuffer = nullptr; |
| 413 |
uint32_t pakTileSizeStasBufferSize = 0; |
| 414 |
uint32_t pakTileSizeRecordOffset = 0; |
| 415 |
}; |
| 416 |
|
| 417 |
struct _MHW_PAR_T(AVP_SURFACE_STATE) |
| 418 |
{ |
| 419 |
uint32_t pitch = 0; |
| 420 |
uint32_t uOffset = 0; |
| 421 |
uint32_t vOffset = 0; |
| 422 |
uint8_t surfaceStateId = 0; |
| 423 |
uint8_t bitDepthLumaMinus8 = 0; |
| 424 |
MOS_MEMCOMP_STATE mmcState[av1TotalRefsPerFrame] = { MOS_MEMCOMP_DISABLED }; |
| 425 |
uint32_t compressionFormat = 0; |
| 426 |
SURFACE_FORMAT srcFormat = SURFACE_FORMAT::SURFACE_FORMAT_PLANAR4208; |
| 427 |
uint32_t uvPlaneAlignment = 0; |
| 428 |
}; |
| 429 |
|
| 430 |
struct _MHW_PAR_T(AVP_BSD_OBJECT) |
| 431 |
{ |
| 432 |
uint32_t bsdDataLength = 0; |
| 433 |
uint32_t bsdDataStartOffset = 0; |
| 434 |
}; |
| 435 |
|
| 436 |
struct _MHW_PAR_T(AVP_PAK_INSERT_OBJECT) |
| 437 |
{ |
| 438 |
PBSBuffer bsBuffer = nullptr; |
| 439 |
// also reuse dwBitSize for passing SrcDataEndingBitInclusion when (pEncoder->bLastPicInStream || pEncoder->bLastPicInSeq) |
| 440 |
uint32_t bitSize = 0; |
| 441 |
uint32_t offset = 0; |
| 442 |
uint32_t skipEmulationCheckCount = 0; |
| 443 |
bool lastPicInSeq = false; |
| 444 |
bool lastPicInStream = false; |
| 445 |
bool lastHeader = false; |
| 446 |
bool emulationByteBitsInsert = false; |
| 447 |
bool setLastPicInStreamData = false; |
| 448 |
bool sliceHeaderIndicator = false; |
| 449 |
bool headerLengthExcludeFrmSize = false; |
| 450 |
bool bResetBitstreamStartingPos = false; |
| 451 |
bool endOfHeaderInsertion = false; |
| 452 |
uint32_t lastPicInSeqData = 0; |
| 453 |
uint32_t lastPicInStreamData = 0; |
| 454 |
PMHW_BATCH_BUFFER batchBufferForPakSlices = nullptr; |
| 455 |
}; |
| 456 |
|
| 457 |
struct _MHW_PAR_T(AVP_FILM_GRAIN_STATE) |
| 458 |
{ |
| 459 |
uint16_t grainRandomSeed = 0; |
| 460 |
uint8_t clipToRestrictedRange = 0; |
| 461 |
uint8_t numOfYPoints = 0; |
| 462 |
uint8_t numOfCbPoints = 0; |
| 463 |
uint8_t numOfCrPoints = 0; |
| 464 |
uint8_t matrixCoefficients = 0; |
| 465 |
uint8_t grainScalingMinus8 = 0; |
| 466 |
uint8_t arCoeffLag = 0; |
| 467 |
uint32_t arCoeffShiftMinus6 = 0; |
| 468 |
uint32_t grainScaleShift = 0; |
| 469 |
uint32_t chromaScalingFromLuma = 0; |
| 470 |
uint32_t grainNoiseOverlap = 0; |
| 471 |
|
| 472 |
uint8_t pointYValue[14] = {}; |
| 473 |
uint8_t pointYScaling[14] = {}; |
| 474 |
uint8_t pointCbValue[10] = {}; |
| 475 |
uint8_t pointCbScaling[10] = {}; |
| 476 |
uint8_t pointCrValue[10] = {}; |
| 477 |
uint8_t pointCrScaling[10] = {}; |
| 478 |
|
| 479 |
int8_t arCoeffsY[24] = {}; |
| 480 |
int8_t arCoeffsCb[25] = {}; |
| 481 |
int8_t arCoeffsCr[25] = {}; |
| 482 |
|
| 483 |
uint8_t cbMult = 0; |
| 484 |
uint8_t cbLumaMult = 0; |
| 485 |
uint16_t cbOffset = 0; |
| 486 |
uint8_t crMult = 0; |
| 487 |
uint8_t crLumaMult = 0; |
| 488 |
uint16_t crOffset = 0; |
| 489 |
}; |
| 490 |
|
| 491 |
} // namespace avp |
| 492 |
} // namespace vdbox |
| 493 |
} // namespace mhw |
| 494 |
|
| 495 |
#endif // __MHW_VDBOX_AVP_CMDPAR_H__ |