Commit b38a1848 authored by Karsten Suehring's avatar Karsten Suehring

update to changes of BMS 2.0, add missing dot-filss

parent 9ef615ae
......@@ -772,99 +772,6 @@ void IntraPrediction::xPredIntraAng( const CPelBuf &pSrc, PelBuf &pDst, const Ch
}
}
void IntraPrediction::xReferenceFilter(
#if JVET_K0500_WAIP
const int doubleHSize,
#endif
const int doubleSize, const int origWeight, const int filterOrder, Pel *piRefVector, Pel *piLowPassRef )
{
const int imCoeff[3][4] =
{
{ 20, 15, 6, 1 },
{ 16, 14, 7, 3 },
{ 14, 12, 9, 4 }
};
const int * piFc;
int binBuff[4 * MAX_CU_SIZE + 9];
int * piTmp = &binBuff[2 * MAX_CU_SIZE + 4]; // to use negative indexes
Pel * piDat = piRefVector;
Pel * piRes = piLowPassRef;
#if JVET_K0500_WAIP
for( int k = -doubleHSize; k <= doubleSize; k++ )
#else
for( int k = -doubleSize; k <= doubleSize; k++ )
#endif
piTmp[k] = piDat[k];
for( int n = 1; n <= 3; n++ )
{
#if JVET_K0500_WAIP
piTmp[-doubleHSize - n] = piTmp[-doubleHSize - 1 + n];
#else
piTmp[-doubleSize - n] = piTmp[-doubleSize - 1 + n];
#endif
piTmp[ doubleSize + n] = piTmp[ doubleSize + 1 - n];
}
switch( filterOrder )
{
case 0:
break;
case 1:
#if JVET_K0500_WAIP
for( int k = -doubleHSize; k <= doubleSize; k++ )
#else
for( int k = -doubleSize; k <= doubleSize; k++ )
#endif
piRes[k] = (Pel)(((piTmp[k] << 1) + piTmp[k - 1] + piTmp[k + 1] + 2) >> 2);
break;
case 2:
#if JVET_K0500_WAIP
for( int k = -doubleHSize; k <= doubleSize; k++ )
#else
for( int k = -doubleSize; k <= doubleSize; k++ )
#endif
piRes[k] = (Pel)(((piTmp[k] << 1) + ((piTmp[k] + piTmp[k - 1] + piTmp[k + 1]) << 2) + piTmp[k - 2] + piTmp[k + 2] + 8) >> 4);
break;
case 3:
case 5:
case 7:
piFc = imCoeff[(filterOrder - 3) >> 1];
#if JVET_K0500_WAIP
for( int k = -doubleHSize; k <= doubleSize; k++ )
#else
for( int k = -doubleSize; k <= doubleSize; k++ )
#endif
{
int s = 32 + piFc[0] * piTmp[k];
for( int n = 1; n < 4; n++ )
s += piFc[n] * (piTmp[k - n] + piTmp[k + n]);
piRes[k] = (Pel)(s >> 6);
}
break;
default:
EXIT( "Invalid intra prediction reference filter order" );
}
int ParShift = 6; //normalization factor
int ParScale = 1 << ParShift;
int ParOffset = 1 << (ParShift - 1);
if( origWeight != 0 )
{
int iCmptWeight = ParScale - origWeight;
#if JVET_K0500_WAIP
for (int k = -doubleHSize; k <= doubleSize; k++)
#else
for( int k = -doubleSize; k <= doubleSize; k++ )
#endif
piLowPassRef[k] = (origWeight * piRefVector[k] + iCmptWeight * piLowPassRef[k] + ParOffset) >> ParShift;
}
}
bool IntraPrediction::useDPCMForFirstPassIntraEstimation(const PredictionUnit &pu, const uint32_t &uiDirMode)
{
......
......@@ -108,11 +108,6 @@ protected:
static int getWideAngle ( int width, int height, int predMode );
void setReferenceArrayLengths ( const CompArea &area );
#endif
void xReferenceFilter (
#if JVET_K0500_WAIP
const int doubleHSize,
#endif
const int doubleSize, const int origWeight, const int filterOrder, Pel *piRefVector, Pel *piLowPassRef );
void destroy ();
......
#if ! defined( NEXT_SOFTWARE_VERSION )
#define NEXT_SOFTWARE_VERSION "2.0rc2"
#define NEXT_SOFTWARE_VERSION "2.0"
#endif
......@@ -197,7 +197,7 @@ bool CABACReader::coding_tree_unit( CodingStructure& cs, const UnitArea& area, i
#if JVET_K0230_DUAL_CODING_TREE_UNDER_64x64_BLOCK
bool isLast = false;
if (CS::isDualITree(cs) && cs.pcv->chrFormat != CHROMA_400)
if ( CS::isDualITree(cs) && cs.pcv->chrFormat != CHROMA_400 && cs.pcv->maxCUWidth > 64 )
{
Partitioner *chromaPartitioner = PartitionerFactory::get(*cs.slice);
chromaPartitioner->initCtu(area, CH_C, *cs.slice);
......@@ -210,10 +210,9 @@ bool CABACReader::coding_tree_unit( CodingStructure& cs, const UnitArea& area, i
else
{
isLast = coding_tree(cs, *partitioner, cuCtx);
qps[CH_L] = cuCtx.qp;
}
#else
bool isLast = coding_tree( cs, *partitioner, cuCtx );
#endif
qps[CH_L] = cuCtx.qp;
if( !isLast && CS::isDualITree( cs ) && cs.pcv->chrFormat != CHROMA_400 )
{
......@@ -222,6 +221,8 @@ bool CABACReader::coding_tree_unit( CodingStructure& cs, const UnitArea& area, i
isLast = coding_tree( cs, *partitioner, cuCtxChroma );
qps[CH_C] = cuCtxChroma.qp;
}
#if JVET_K0230_DUAL_CODING_TREE_UNDER_64x64_BLOCK
}
#endif
DTRACE_COND( ctuRsAddr == 0, g_trace_ctx, D_QP_PER_CTU, "\n%4d %2d", cs.picture->poc, cs.slice->getSliceQpBase() );
......
......@@ -176,7 +176,7 @@ void CABACWriter::coding_tree_unit( CodingStructure& cs, const UnitArea& area, i
#endif
#if JVET_K0230_DUAL_CODING_TREE_UNDER_64x64_BLOCK
if (CS::isDualITree(cs) && cs.pcv->chrFormat != CHROMA_400)
if ( CS::isDualITree(cs) && cs.pcv->chrFormat != CHROMA_400 && cs.pcv->maxCUWidth > 64 )
{
CUCtx chromaCuCtx(qps[CH_C]);
Partitioner *chromaPartitioner = PartitionerFactory::get(*cs.slice);
......@@ -192,9 +192,6 @@ void CABACWriter::coding_tree_unit( CodingStructure& cs, const UnitArea& area, i
#endif
coding_tree( cs, *partitioner, cuCtx );
qps[CH_L] = cuCtx.qp;
#if JVET_K0230_DUAL_CODING_TREE_UNDER_64x64_BLOCK
}
#else
if( CS::isDualITree( cs ) && cs.pcv->chrFormat != CHROMA_400 )
{
CUCtx cuCtxChroma( qps[CH_C] );
......@@ -202,6 +199,8 @@ void CABACWriter::coding_tree_unit( CodingStructure& cs, const UnitArea& area, i
coding_tree( cs, *partitioner, cuCtxChroma );
qps[CH_C] = cuCtxChroma.qp;
}
#if JVET_K0230_DUAL_CODING_TREE_UNDER_64x64_BLOCK
}
#endif
delete partitioner;
......
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