Skip to content

Commit

Permalink
[Encode] AV1 videoencoder
Browse files Browse the repository at this point in the history
Add meta data related parameters
  • Loading branch information
WangLy-ada authored and intel-mediadev committed Sep 23, 2023
1 parent 8491d1f commit a999b6b
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 2 deletions.
5 changes: 4 additions & 1 deletion media_common/agnostic/common/codec/shared/codec_def_encode.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2021, Intel Corporation
* Copyright (c) 2018-2023, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -99,6 +99,9 @@ struct MetaDataOffset

uint32_t dwMetaDataSize = 0;
uint32_t dwMetaDataSubRegionSize = 0;

uint32_t dwTilePartitionSize = 0;
uint32_t dwPostFeatueSize = 0;
};

//!
Expand Down
68 changes: 67 additions & 1 deletion media_common/agnostic/common/codec/shared/codec_def_encode_av1.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2021, Intel Corporation
* Copyright (c) 2019-2023, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -650,10 +650,76 @@ struct EncodeAv1Par

};

struct AV1MetaDataOffset
{
//tile partition
uint32_t dwRowCount = 0;
uint32_t dwColCount = 0;
uint32_t dwRowHeights = 0;
uint32_t dwColWidths = 0;
uint32_t dwContextUpdateTileId = 0;
//post feature
uint32_t dwCompoundPredictionType = 0;
uint32_t dwLoopFilter = 0;
uint32_t dwLoopFilterDelta = 0;
uint32_t dwQuantization = 0;
uint32_t dwQuantizationDelta = 0;
uint32_t dwCDEF = 0;
uint32_t dwSegmentationConfig = 0;
uint32_t dwPrimaryRefFrame = 0;
uint32_t dwReferenceIndices = 0;
//loop filter
uint32_t dwLoopFilterLevel = 0;
uint32_t dwLoopFilterLevelU = 0;
uint32_t dwLoopFilterLevelV = 0;
uint32_t dwLoopFilterSharpnessLevel = 0;
uint32_t dwLoopFilterDeltaEnabled = 0;
uint32_t dwUpdateRefDelta = 0;
uint32_t dwRefDeltas = 0;
uint32_t dwUpdateModeDelta = 0;
uint32_t dwModeDeltas = 0;
//loop filter delta
uint32_t dwDeltaLFPresent = 0;
uint32_t dwDeltaLFMulti = 0;
uint32_t dwDeltaLFRes = 0;
//Quantization
uint32_t dwBaseQIndex = 0;
uint32_t dwYDCDeltaQ = 0;
uint32_t dwUDCDeltaQ = 0;
uint32_t dwUACDeltaQ = 0;
uint32_t dwVDCDeltaQ = 0;
uint32_t dwVACDeltaQ = 0;
uint32_t dwUsingQMatrix = 0;
uint32_t dwQMY = 0;
uint32_t dwQMU = 0;
uint32_t dwQMV = 0;
//QuantizationDelta
uint32_t dwDeltaQPresent = 0;
uint32_t dwDeltaQRes = 0;
//CDEF
uint32_t dwCdefBits = 0;
uint32_t dwCdefDampingMinus3 = 0;
uint32_t dwCdefYPriStrength = 0;
uint32_t dwCdefUVPriStrength = 0;
uint32_t dwCdefYSecStrength = 0;
uint32_t dwCdefUVSecStrength = 0;
//SegmentationConfig
uint32_t dwUpdateMap = 0;
uint32_t dwTemporalUpdate = 0;
uint32_t dwUpdateData = 0;
uint32_t dwNumSegments = 0;
uint32_t dwSegmentsData = 0;
//dwSegmentsData
uint32_t dwEnabledFeatures = 0;
uint32_t dwFeatureValue = 0;
uint32_t dwSegmentsDataSize = 0;
};

struct EncoderParamsAV1 : EncoderParams
{
uint32_t segmentMapDataSize = 0; //!< [AV1] size of data in segment map buffer
uint8_t *pSegmentMap = nullptr; //!< [AV1] pointer to segment map buffer from DDI
AV1MetaDataOffset AV1metaDataOffset = {}; //!< [AV1] AV1 Specific metadata offset
};

#endif // __CODEC_DEF_ENCODE_AV1_H__

0 comments on commit a999b6b

Please sign in to comment.