Skip to content

Commit

Permalink
Experimental Film Grain Analysis implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjw24 committed Jun 27, 2024
1 parent e9fa712 commit 9969b5f
Show file tree
Hide file tree
Showing 21 changed files with 3,971 additions and 41 deletions.
5 changes: 3 additions & 2 deletions include/vvenc/vvencCfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ typedef struct vvenc_config
int m_explicitAPSid;

bool m_picReordering;
bool m_reservedFlag;
bool m_fga; // Film grain analysis configuration options, set to 0 to disable (default), or 1 to enable analysis.
bool m_poc0idr;
int8_t m_ifpLines;
bool m_blockImportanceMapping;
Expand All @@ -780,7 +780,8 @@ typedef struct vvenc_config
int8_t m_mtProfile; // Use a set of multi-threading boosters (0...3), set to -1 for automatic selection based on number of threads (default),
// or 0 to force only the usage basic picture and CTU parallelism. If set to 3, tiles (resolution dependent),
// IFP and WPP are all used. For 1 and 2, an optimal selection of tools is done based on resolution and CTU size.
int8_t m_reservedInt8[1];

int8_t m_reservedInt8;

int m_minIntraDist;
int m_reservedInt;
Expand Down
1 change: 1 addition & 0 deletions source/Lib/CommonLib/MCTF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ MCTF::MCTF()
#if defined( TARGET_SIMD_X86 ) && ENABLE_SIMD_OPT_MCTF
initMCTF_X86();
#endif

}

MCTF::~MCTF()
Expand Down
2 changes: 2 additions & 0 deletions source/Lib/CommonLib/MCTF.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ class NoMallocThreadPool;
//! \ingroup EncoderLib
//! \{

double calcVarCore( const Pel* org, const ptrdiff_t origStride, const int w, const int h );


struct MotionVector
{
Expand Down
11 changes: 6 additions & 5 deletions source/Lib/CommonLib/SEI.h
Original file line number Diff line number Diff line change
Expand Up @@ -552,15 +552,15 @@ class SEIUserDataRegistered : public SEI
std::vector<uint8_t> userData;
};

class SEIFilmGrainCharacteristics : public SEI
class SeiFgc : public SEI
{
public:
PayloadType payloadType() const { return FILM_GRAIN_CHARACTERISTICS; }

SEIFilmGrainCharacteristics() {}
virtual ~SEIFilmGrainCharacteristics() {}
SeiFgc() {}
virtual ~SeiFgc() {}

bool filmGrainCharacteristicsCancelFlag;
bool fgcCancelFlag;
uint8_t filmGrainModelId;
bool separateColourDescriptionPresent;
uint8_t filmGrainBitDepthLumaMinus8;
Expand All @@ -583,11 +583,12 @@ class SEIFilmGrainCharacteristics : public SEI
{
bool presentFlag;
uint8_t numModelValues;
uint8_t numIntensityIntervals;
std::vector<CompModelIntensityValues> intensityValues;
};

CompModel compModel[MAX_NUM_COMP];
bool filmGrainCharacteristicsPersistenceFlag;
bool fgcPersistenceFlag;
};

class SEIContentLightLevelInfo : public SEI
Expand Down
1 change: 1 addition & 0 deletions source/Lib/CommonLib/TypeDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ namespace vvenc {
#define ENABLE_SIMD_TRAFO ( 1 && ENABLE_SIMD_OPT ) ///< SIMD optimization for Transformation
#define ENABLE_SIMD_OPT_QUANT ( 1 && ENABLE_SIMD_OPT ) ///< SIMD optimization for Quantization
#define ENABLE_SIMD_LOG2 ( 1 && ENABLE_SIMD_OPT ) ///< use SIMD intrisic to calculate log2
#define ENABLE_SIMD_OPT_FGA ( 1 && ENABLE_SIMD_OPT ) ///< use SIMD intrisic for FGA

#if ENABLE_SIMD_OPT_BUFFER
#define ENABLE_SIMD_OPT_BCW 1 ///< SIMD optimization for GBi
Expand Down
Loading

0 comments on commit 9969b5f

Please sign in to comment.