Commit e9ffb8d9 authored by Taoran Lu's avatar Taoran Lu

address discussion points and rebase

parent 65c52d71
......@@ -131,6 +131,7 @@ MHIntra : 1
IBC : 0 # turned off in CTC
AllowDisFracMMVD : 1
AffineAmvr : 0
LumaReshapeEnable : 1 # luma reshaping. 0: disable 1:enable
# Fast tools
PBIntraFast : 1
......
......@@ -418,17 +418,10 @@ static constexpr int MV_MANTISSA_LIMIT = (1 << (MV_MANTISSA_BITCOUNT - 1))
static constexpr int MV_EXPONENT_MASK = ((1 << MV_EXPONENT_BITCOUNT) - 1);
#endif
#if JVET_M0427_INLOOP_RESHAPER
static const int MAX_LUMA_RESHAPING_LUT_SIZE = 1024;
static const int CSCALE_FP_PREC = 11;
static const int PIC_ANALYZE_CW_BINS = 32;
static const int FP_PREC = 14;
static const int log2_MAX_LUMA_RESHAPING_LUT_SIZE = 10;
static const int log2_PIC_ANALYZE_CW_BINS = 5;
static const int PIC_ANALYZE_WIN_SIZE = 5;
static const int CW_NUMS = 3;
static const int MAX_FRAME_RATE = 128;
static const int PIC_CODE_CW_BINS = 16;
static const int log2_PIC_CODE_CW_BINS = 4;
static const int FP_PREC = 14;
static const int CSCALE_FP_PREC = 11;
#endif
// ====================================================================================================================
// Macro functions
......
......@@ -2881,18 +2881,6 @@ void RdCost::saveUnadjustedLambda()
void RdCost::initLumaLevelToWeightTable()
{
#if JVET_M0427_INLOOP_RESHAPER
if (m_iSignalType == RESHAPE_SIGNAL_SDR)
{
double weight = 1.0;
for (int i = 0; i < LUMA_LEVEL_TO_DQP_LUT_MAXSIZE; i++)
{
m_lumaLevelToWeightPLUT[i] = weight;
}
return;
}
#endif
for (int i = 0; i < LUMA_LEVEL_TO_DQP_LUT_MAXSIZE; i++) {
double x = i;
double y;
......@@ -2914,9 +2902,6 @@ void RdCost::initLumaLevelToWeightTable()
m_lumaLevelToWeightPLUT[i] = pow(2.0, y / 3.0); // or power(10, dQp/10) they are almost equal
}
#if JVET_M0427_INLOOP_RESHAPER
memcpy(m_reshapeLumaLevelToWeightPLUT, m_lumaLevelToWeightPLUT, LUMA_LEVEL_TO_DQP_LUT_MAXSIZE * sizeof(double));
#endif
}
#if JVET_M0427_INLOOP_RESHAPER
......
......@@ -115,10 +115,6 @@ private:
static int m_lumaBD;
#else
static double m_lumaLevelToWeightPLUT[LUMA_LEVEL_TO_DQP_LUT_MAXSIZE];
#if JVET_M0427_INLOOP_RESHAPER
static double m_reshapeLumaLevelToWeightPLUT[LUMA_LEVEL_TO_DQP_LUT_MAXSIZE];
static uint32_t m_iSignalType;
static double m_chroma_weight;
#endif
#endif
double m_DistScale;
......
......@@ -186,15 +186,16 @@ void EncGOP::init ( EncLib* pcEncLib )
}
else if (m_pcCfg->getLumaLevelToDeltaQPMapping().mode)
{
#endif
pcEncLib->getRdCost()->initLumaLevelToWeightTable();
#if JVET_M0427_INLOOP_RESHAPER
memcpy(pcEncLib->getALF()->getLumaLevelWeightTable(), pcEncLib->getRdCost()->getLumaLevelWeightTable(), LUMA_LEVEL_TO_DQP_LUT_MAXSIZE * sizeof(double));
}
pcEncLib->getALF()->getLumaLevelWeightTable() = pcEncLib->getRdCost()->getLumaLevelWeightTable();
int alfWSSD = 0;
if (m_pcCfg->getReshaper() && m_pcCfg->getReshapeSignalType() == RESHAPE_SIGNAL_PQ )
{
alfWSSD = 1;
}
pcEncLib->getALF()->setAlfWSSD(alfWSSD);
#endif
pcEncLib->getRdCost()->initLumaLevelToWeightTable();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment