Commit 830c89c5 authored by Xiang Ma's avatar Xiang Ma

add CCLM only; turnoff Cb-to-Cr residual prediction, K0190 Test4.1.8;

parent 3d44ffc3
......@@ -111,7 +111,7 @@ HighPrecMv : 1
ALF : 2
SubPuMvp : 1
MaxNumMergeCand : 6
LMChroma : 4
LMChroma : 1
DMVR : 1
IMV : 2
DepQuant : 1
......
......@@ -103,6 +103,8 @@ MaxBTDepthISliceC : 3
MTT : 1
DepQuant : 1
LMChroma : 1 # use CCLM only
# Fast tools
PBIntraFast : 1
FastMrg : 1
......
......@@ -127,7 +127,7 @@ HighPrecMv : 1
ALF : 2
SubPuMvp : 1
MaxNumMergeCand : 6
LMChroma : 4
LMChroma : 1
DMVR : 1
IMV : 2
DepQuant : 1
......
......@@ -119,6 +119,7 @@ MaxBTDepthISliceC : 3
MTT : 1
DepQuant : 1
LMChroma : 1 # use CCLM only
# Fast tools
PBIntraFast : 1
FastMrg : 1
......
......@@ -127,7 +127,7 @@ HighPrecMv : 1
ALF : 2
SubPuMvp : 1
MaxNumMergeCand : 6
LMChroma : 4
LMChroma : 1
DMVR : 1
IMV : 2
DepQuant : 1
......
......@@ -119,6 +119,7 @@ MaxBTDepthISliceC : 3
MTT : 1
DepQuant : 1
LMChroma : 1 # use CCLM only
# Fast tools
PBIntraFast : 1
FastMrg : 1
......
......@@ -141,7 +141,7 @@ HighPrecMv : 1
ALF : 2
SubPuMvp : 1
MaxNumMergeCand : 6
LMChroma : 4
LMChroma : 1
DMVR : 1
IMV : 2
DepQuant : 1
......
......@@ -133,6 +133,8 @@ MaxBTDepthISliceC : 3
MTT : 1
DepQuant : 1
LMChroma : 1 # use CCLM only
# Fast tools
PBIntraFast : 1
FastMrg : 1
......
......@@ -57,24 +57,24 @@
namespace po = df::program_options_lite;
void* cache_mem_align_malloc(int size, int alignSize)
{
unsigned char *alignBuf;
unsigned char *buf = (unsigned char *)malloc(size + 2 * alignSize + sizeof(void **));
if (buf)
{
alignBuf = buf + alignSize + sizeof(void **);
alignBuf -= (intptr_t)alignBuf & (alignSize - 1);
*((void **)(alignBuf - sizeof(void **))) = buf;
return alignBuf;
}
return nullptr; // memory keep fail
}
void cache_mem_align_free(void *ptr)
{
free(*(((void **)ptr) - 1));
}
void* cache_mem_align_malloc(int size, int alignSize)
{
unsigned char *alignBuf;
unsigned char *buf = (unsigned char *)malloc(size + 2 * alignSize + sizeof(void **));
if (buf)
{
alignBuf = buf + alignSize + sizeof(void **);
alignBuf -= (intptr_t)alignBuf & (alignSize - 1);
*((void **)(alignBuf - sizeof(void **))) = buf;
return alignBuf;
}
return nullptr; // memory keep fail
}
void cache_mem_align_free(void *ptr)
{
free(*(((void **)ptr) - 1));
}
CacheModel::CacheModel()
{
......
This source diff could not be displayed because it is too large. You can view the blob instead.
#pragma once
#include "CommonDef.h"
#include "Contexts.h"
#include "Slice.h"
#include "Unit.h"
#include "UnitPartitioner.h"
#include "QuantRDOQ.h"
#if JVET_K0072
class DepQuant : public QuantRDOQ
{
public:
DepQuant( const Quant* other, bool enc );
virtual ~DepQuant();
virtual void quant ( TransformUnit &tu, const ComponentID &compID, const CCoeffBuf &pSrc, TCoeff &uiAbsSum, const QpParam &cQP, const Ctx& ctx );
virtual void dequant( const TransformUnit &tu, CoeffBuf &dstCoeff, const ComponentID &compID, const QpParam &cQP );
private:
void* p;
};
#endif
#pragma once
#include "CommonDef.h"
#include "Contexts.h"
#include "Slice.h"
#include "Unit.h"
#include "UnitPartitioner.h"
#include "QuantRDOQ.h"
#if JVET_K0072
class DepQuant : public QuantRDOQ
{
public:
DepQuant( const Quant* other, bool enc );
virtual ~DepQuant();
virtual void quant ( TransformUnit &tu, const ComponentID &compID, const CCoeffBuf &pSrc, TCoeff &uiAbsSum, const QpParam &cQP, const Ctx& ctx );
virtual void dequant( const TransformUnit &tu, CoeffBuf &dstCoeff, const ComponentID &compID, const QpParam &cQP );
private:
void* p;
};
#endif
......@@ -446,7 +446,7 @@ Void IntraPrediction::predIntraChromaLM(const ComponentID compID, PelBuf &piPred
piPred.linearTransform(a, iShift, b, true, pu.cs->slice->clpRng(compID));
}
}
#if !JVET_K0190_CCLM_ONLY
Void IntraPrediction::addCrossColorResi(const ComponentID compID, PelBuf &piPred, const TransformUnit &tu, const CPelBuf &pResiCb)
{
const CompArea& chromaArea = tu.block(compID);
......@@ -481,7 +481,7 @@ Void IntraPrediction::addCrossColorResi(const ComponentID compID, PelBuf &piPred
pResi += uiResiStride;
}
}
#endif
#endif
Void IntraPrediction::xFilterGroup(Pel* pMulDst[], Int i, Pel const * const piSrc, Int iRecStride, Bool bAboveAvaillable, Bool bLeftAvaillable)
......
......@@ -149,8 +149,9 @@ public:
// Cross-component Chroma
Void predIntraChromaLM (const ComponentID compID, PelBuf &piPred, const PredictionUnit &pu, const CompArea& chromaArea, Int intraDir);
Void xGetLumaRecPixels (const PredictionUnit &pu, CompArea chromaArea);
#if !JVET_K0190_CCLM_ONLY
Void addCrossColorResi (const ComponentID compID, PelBuf &piPred, const TransformUnit &tu, const CPelBuf &pResiCb);
#endif
#endif
/// set parameters from CU data for accessing intra data
Void initIntraPatternChType (const CodingUnit &cu, const CompArea &area, const Bool bFilterRefSamples = false );
......
......@@ -51,6 +51,7 @@
#include <cassert>
#define JVET_K0190_CCLM_ONLY 1 //JVET-K0190, Test4.1.8. (turn off Cb-to-Cr residual prediction)
#define JVET_K0072 1
#define JVET_K0220_ENC_CTRL 1 // remove HM_NO_ADDITIONAL_SPEEDUPS when adopting
......
......@@ -157,12 +157,13 @@ Void DecCu::xIntraRecBlk( TransformUnit& tu, const ComponentID compID )
{
m_pcIntraPred->predIntraAng( compID, piPred, pu, bUseFilteredPredictions );
#if JEM_TOOLS
#if !JVET_K0190_CCLM_ONLY
if( compID == COMPONENT_Cr && sps.getSpsNext().getUseLMChroma() )
{
const CPelBuf pResiCb = cs.getResiBuf( tu.Cb() );
m_pcIntraPred->addCrossColorResi( compID, piPred, tu, pResiCb );
}
#endif
#endif
}
......
......@@ -1455,11 +1455,13 @@ Void IntraSearch::xIntraCodingTUBlock(TransformUnit &tu, const ComponentID &comp
{
predIntraAng( compID, piPred, pu, bUseFilteredPredictions );
#if JEM_TOOLS
#if !JVET_K0190_CCLM_ONLY
if( compID == COMPONENT_Cr && sps.getSpsNext().getUseLMChroma() )
{
const CPelBuf pResiCb = cs.getResiBuf( tu.Cb() );
addCrossColorResi( compID, piPred, tu, pResiCb );
}
#endif
#endif
}
......
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