Commit 53acbad3 authored by Xiang Li's avatar Xiang Li

Cleaned VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE. Defined more constants

parent e3196e60
...@@ -245,9 +245,12 @@ static const int LOG2_MAX_NUM_ROWS_MINUS1 = 7; ...@@ -245,9 +245,12 @@ static const int LOG2_MAX_NUM_ROWS_MINUS1 = 7;
static const int CABAC_INIT_PRESENT_FLAG = 1; static const int CABAC_INIT_PRESENT_FLAG = 1;
static const int LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS = 4; static const int MV_FRACTIONAL_BITS_INTERNAL = 4;
static const int CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS = 8; static const int MV_FRACTIONAL_BITS_SIGNAL = 2;
static const int VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE = 2; ///< additional precision bit for MV storage static const int MV_FRACTIONAL_BITS_DIFF = MV_FRACTIONAL_BITS_INTERNAL - MV_FRACTIONAL_BITS_SIGNAL;
static const int LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS_SIGNAL = 1 << MV_FRACTIONAL_BITS_SIGNAL;
static const int LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS = 1 << MV_FRACTIONAL_BITS_INTERNAL;
static const int CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS = 1 << (MV_FRACTIONAL_BITS_INTERNAL + 1);
static const int MAX_NUM_LONG_TERM_REF_PICS = 33; static const int MAX_NUM_LONG_TERM_REF_PICS = 33;
static const int NUM_LONG_TERM_REF_PIC_SPS = 0; static const int NUM_LONG_TERM_REF_PIC_SPS = 0;
......
...@@ -373,7 +373,7 @@ void MergeCtx::setMergeInfo( PredictionUnit& pu, int candIdx ) ...@@ -373,7 +373,7 @@ void MergeCtx::setMergeInfo( PredictionUnit& pu, int candIdx )
{ {
pu.cu->cpr = true; pu.cu->cpr = true;
pu.bv = pu.mv[REF_PIC_LIST_0]; pu.bv = pu.mv[REF_PIC_LIST_0];
pu.bv >>= (2 + VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE); // used for only integer resolution pu.bv.changePrecision(MV_PRECISION_INTERNAL, MV_PRECISION_INT); // used for only integer resolution
} }
#endif #endif
#if JVET_L0646_GBI #if JVET_L0646_GBI
...@@ -385,7 +385,7 @@ void MergeCtx::setMergeInfo( PredictionUnit& pu, int candIdx ) ...@@ -385,7 +385,7 @@ void MergeCtx::setMergeInfo( PredictionUnit& pu, int candIdx )
void MergeCtx::setMmvdMergeCandiInfo(PredictionUnit& pu, int candIdx) void MergeCtx::setMmvdMergeCandiInfo(PredictionUnit& pu, int candIdx)
{ {
const Slice &slice = *pu.cs->slice; const Slice &slice = *pu.cs->slice;
const int mvShift = VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE; const int mvShift = MV_FRACTIONAL_BITS_DIFF;
const int refMvdCands[8] = { 1 << mvShift , 2 << mvShift , 4 << mvShift , 8 << mvShift , 16 << mvShift , 32 << mvShift, 64 << mvShift , 128 << mvShift }; const int refMvdCands[8] = { 1 << mvShift , 2 << mvShift , 4 << mvShift , 8 << mvShift , 16 << mvShift , 32 << mvShift, 64 << mvShift , 128 << mvShift };
int fPosGroup = 0; int fPosGroup = 0;
int fPosBaseIdx = 0; int fPosBaseIdx = 0;
......
...@@ -76,9 +76,9 @@ InterPrediction::InterPrediction() ...@@ -76,9 +76,9 @@ InterPrediction::InterPrediction()
for( uint32_t c = 0; c < MAX_NUM_COMPONENT; c++ ) for( uint32_t c = 0; c < MAX_NUM_COMPONENT; c++ )
{ {
for( uint32_t i = 0; i < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS; i++ ) for( uint32_t i = 0; i < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS_SIGNAL; i++ )
{ {
for( uint32_t j = 0; j < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS; j++ ) for( uint32_t j = 0; j < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS_SIGNAL; j++ )
{ {
m_filteredBlock[i][j][c] = nullptr; m_filteredBlock[i][j][c] = nullptr;
} }
...@@ -107,9 +107,9 @@ void InterPrediction::destroy() ...@@ -107,9 +107,9 @@ void InterPrediction::destroy()
for( uint32_t c = 0; c < MAX_NUM_COMPONENT; c++ ) for( uint32_t c = 0; c < MAX_NUM_COMPONENT; c++ )
{ {
for( uint32_t i = 0; i < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS; i++ ) for( uint32_t i = 0; i < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS_SIGNAL; i++ )
{ {
for( uint32_t j = 0; j < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS; j++ ) for( uint32_t j = 0; j < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS_SIGNAL; j++ )
{ {
xFree( m_filteredBlock[i][j][c] ); xFree( m_filteredBlock[i][j][c] );
m_filteredBlock[i][j][c] = nullptr; m_filteredBlock[i][j][c] = nullptr;
...@@ -163,11 +163,11 @@ void InterPrediction::init( RdCost* pcRdCost, ChromaFormat chromaFormatIDC ) ...@@ -163,11 +163,11 @@ void InterPrediction::init( RdCost* pcRdCost, ChromaFormat chromaFormatIDC )
int extWidth = MAX_CU_SIZE + 16; int extWidth = MAX_CU_SIZE + 16;
int extHeight = MAX_CU_SIZE + 1; int extHeight = MAX_CU_SIZE + 1;
#endif #endif
for( uint32_t i = 0; i < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS; i++ ) for( uint32_t i = 0; i < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS_SIGNAL; i++ )
{ {
m_filteredBlockTmp[i][c] = ( Pel* ) xMalloc( Pel, ( extWidth + 4 ) * ( extHeight + 7 + 4 ) ); m_filteredBlockTmp[i][c] = ( Pel* ) xMalloc( Pel, ( extWidth + 4 ) * ( extHeight + 7 + 4 ) );
for( uint32_t j = 0; j < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS; j++ ) for( uint32_t j = 0; j < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS_SIGNAL; j++ )
{ {
m_filteredBlock[i][j][c] = ( Pel* ) xMalloc( Pel, extWidth * extHeight ); m_filteredBlock[i][j][c] = ( Pel* ) xMalloc( Pel, extWidth * extHeight );
} }
...@@ -637,10 +637,8 @@ void InterPrediction::xPredInterBlk ( const ComponentID& compID, const Predictio ...@@ -637,10 +637,8 @@ void InterPrediction::xPredInterBlk ( const ComponentID& compID, const Predictio
const ChromaFormat chFmt = pu.chromaFormat; const ChromaFormat chFmt = pu.chromaFormat;
const bool rndRes = !bi; const bool rndRes = !bi;
int iAddPrecShift = VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE; int shiftHor = MV_FRACTIONAL_BITS_INTERNAL + ::getComponentScaleX(compID, chFmt);
int shiftVer = MV_FRACTIONAL_BITS_INTERNAL + ::getComponentScaleY(compID, chFmt);
int shiftHor = 2 + iAddPrecShift + ::getComponentScaleX(compID, chFmt);
int shiftVer = 2 + iAddPrecShift + ::getComponentScaleY(compID, chFmt);
int xFrac = _mv.hor & ((1 << shiftHor) - 1); int xFrac = _mv.hor & ((1 << shiftHor) - 1);
int yFrac = _mv.ver & ((1 << shiftVer) - 1); int yFrac = _mv.ver & ((1 << shiftVer) - 1);
...@@ -651,8 +649,6 @@ void InterPrediction::xPredInterBlk ( const ComponentID& compID, const Predictio ...@@ -651,8 +649,6 @@ void InterPrediction::xPredInterBlk ( const ComponentID& compID, const Predictio
JVET_J0090_SET_CACHE_ENABLE( false ); JVET_J0090_SET_CACHE_ENABLE( false );
} }
#endif #endif
xFrac <<= VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE - iAddPrecShift;
yFrac <<= VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE - iAddPrecShift;
PelBuf &dstBuf = dstPic.bufs[compID]; PelBuf &dstBuf = dstPic.bufs[compID];
unsigned width = dstBuf.width; unsigned width = dstBuf.width;
...@@ -819,7 +815,7 @@ void InterPrediction::xPredAffineBlk( const ComponentID& compID, const Predictio ...@@ -819,7 +815,7 @@ void InterPrediction::xPredAffineBlk( const ComponentID& compID, const Predictio
PelBuf tmpBuf = PelBuf(m_filteredBlockTmp[0][compID], pu.blocks[compID]); PelBuf tmpBuf = PelBuf(m_filteredBlockTmp[0][compID], pu.blocks[compID]);
const int vFilterSize = isLuma(compID) ? NTAPS_LUMA : NTAPS_CHROMA; const int vFilterSize = isLuma(compID) ? NTAPS_LUMA : NTAPS_CHROMA;
const int shift = iBit - 4 + VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE + 2; const int shift = iBit - 4 + MV_FRACTIONAL_BITS_INTERNAL;
// get prediction block by block // get prediction block by block
for ( int h = 0; h < cxHeight; h += blockHeight ) for ( int h = 0; h < cxHeight; h += blockHeight )
......
...@@ -80,8 +80,8 @@ protected: ...@@ -80,8 +80,8 @@ protected:
InterpolationFilter m_if; InterpolationFilter m_if;
Pel* m_acYuvPred [NUM_REF_PIC_LIST_01][MAX_NUM_COMPONENT]; Pel* m_acYuvPred [NUM_REF_PIC_LIST_01][MAX_NUM_COMPONENT];
Pel* m_filteredBlock [LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][MAX_NUM_COMPONENT]; Pel* m_filteredBlock [LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS_SIGNAL][LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS_SIGNAL][MAX_NUM_COMPONENT];
Pel* m_filteredBlockTmp [LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][MAX_NUM_COMPONENT]; Pel* m_filteredBlockTmp [LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS_SIGNAL][MAX_NUM_COMPONENT];
ChromaFormat m_currChromaFormat; ChromaFormat m_currChromaFormat;
......
...@@ -55,7 +55,7 @@ CacheModel* InterpolationFilter::m_cacheModel; ...@@ -55,7 +55,7 @@ CacheModel* InterpolationFilter::m_cacheModel;
// Tables // Tables
// ==================================================================================================================== // ====================================================================================================================
const TFilterCoeff InterpolationFilter::m_lumaFilter[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS << VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE][NTAPS_LUMA] = const TFilterCoeff InterpolationFilter::m_lumaFilter[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_LUMA] =
{ {
{ 0, 0, 0, 64, 0, 0, 0, 0 }, { 0, 0, 0, 64, 0, 0, 0, 0 },
{ 0, 1, -3, 63, 4, -2, 1, 0 }, { 0, 1, -3, 63, 4, -2, 1, 0 },
...@@ -75,7 +75,7 @@ const TFilterCoeff InterpolationFilter::m_lumaFilter[LUMA_INTERPOLATION_FILTER_S ...@@ -75,7 +75,7 @@ const TFilterCoeff InterpolationFilter::m_lumaFilter[LUMA_INTERPOLATION_FILTER_S
{ 0, 1, -2, 4, 63, -3, 1, 0 } { 0, 1, -2, 4, 63, -3, 1, 0 }
}; };
const TFilterCoeff InterpolationFilter::m_chromaFilter[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS << VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE][NTAPS_CHROMA] = const TFilterCoeff InterpolationFilter::m_chromaFilter[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_CHROMA] =
{ {
{ 0, 64, 0, 0 }, { 0, 64, 0, 0 },
{ -1, 63, 2, 0 }, { -1, 63, 2, 0 },
...@@ -112,7 +112,7 @@ const TFilterCoeff InterpolationFilter::m_chromaFilter[CHROMA_INTERPOLATION_FILT ...@@ -112,7 +112,7 @@ const TFilterCoeff InterpolationFilter::m_chromaFilter[CHROMA_INTERPOLATION_FILT
}; };
#if JVET_L0256_BIO #if JVET_L0256_BIO
const TFilterCoeff InterpolationFilter::m_bilinearFilter[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS << VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE][NTAPS_BILINEAR] = const TFilterCoeff InterpolationFilter::m_bilinearFilter[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_BILINEAR] =
{ {
{ 64, 0, }, { 64, 0, },
{ 60, 4, }, { 60, 4, },
...@@ -477,7 +477,7 @@ void InterpolationFilter::filterHor( const ComponentID compID, Pel const *src, i ...@@ -477,7 +477,7 @@ void InterpolationFilter::filterHor( const ComponentID compID, Pel const *src, i
} }
else if( isLuma( compID ) ) else if( isLuma( compID ) )
{ {
CHECK( frac < 0 || frac >= ( LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS << VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE ), "Invalid fraction" ); CHECK( frac < 0 || frac >= LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS, "Invalid fraction" );
#if JVET_L0256_BIO #if JVET_L0256_BIO
if( nFilterIdx == 1 ) if( nFilterIdx == 1 )
{ {
...@@ -492,7 +492,7 @@ void InterpolationFilter::filterHor( const ComponentID compID, Pel const *src, i ...@@ -492,7 +492,7 @@ void InterpolationFilter::filterHor( const ComponentID compID, Pel const *src, i
else else
{ {
const uint32_t csx = getComponentScaleX( compID, fmt ); const uint32_t csx = getComponentScaleX( compID, fmt );
CHECK( frac < 0 || csx >= 2 || ( frac << ( 1 - csx ) ) >= ( CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS << VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE ), "Invalid fraction" ); CHECK( frac < 0 || csx >= 2 || ( frac << ( 1 - csx ) ) >= CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS, "Invalid fraction" );
filterHor<NTAPS_CHROMA>( clpRng, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilter[frac << ( 1 - csx )] ); filterHor<NTAPS_CHROMA>( clpRng, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilter[frac << ( 1 - csx )] );
} }
} }
...@@ -526,7 +526,7 @@ void InterpolationFilter::filterVer( const ComponentID compID, Pel const *src, i ...@@ -526,7 +526,7 @@ void InterpolationFilter::filterVer( const ComponentID compID, Pel const *src, i
} }
else if( isLuma( compID ) ) else if( isLuma( compID ) )
{ {
CHECK( frac < 0 || frac >= ( LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS << VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE ), "Invalid fraction" ); CHECK( frac < 0 || frac >= LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS, "Invalid fraction" );
#if JVET_L0256_BIO #if JVET_L0256_BIO
if (nFilterIdx == 1) if (nFilterIdx == 1)
{ {
...@@ -541,7 +541,7 @@ void InterpolationFilter::filterVer( const ComponentID compID, Pel const *src, i ...@@ -541,7 +541,7 @@ void InterpolationFilter::filterVer( const ComponentID compID, Pel const *src, i
else else
{ {
const uint32_t csy = getComponentScaleY( compID, fmt ); const uint32_t csy = getComponentScaleY( compID, fmt );
CHECK( frac < 0 || csy >= 2 || ( frac << ( 1 - csy ) ) >= ( CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS << VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE ), "Invalid fraction" ); CHECK( frac < 0 || csy >= 2 || ( frac << ( 1 - csy ) ) >= CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS, "Invalid fraction" );
filterVer<NTAPS_CHROMA>( clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilter[frac << ( 1 - csy )] ); filterVer<NTAPS_CHROMA>( clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilter[frac << ( 1 - csy )] );
} }
} }
......
...@@ -54,10 +54,10 @@ ...@@ -54,10 +54,10 @@
*/ */
class InterpolationFilter class InterpolationFilter
{ {
static const TFilterCoeff m_lumaFilter[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS << VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE][NTAPS_LUMA]; ///< Luma filter taps static const TFilterCoeff m_lumaFilter[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_LUMA]; ///< Luma filter taps
static const TFilterCoeff m_chromaFilter[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS << VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE][NTAPS_CHROMA]; ///< Chroma filter taps static const TFilterCoeff m_chromaFilter[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_CHROMA]; ///< Chroma filter taps
#if JVET_L0256_BIO #if JVET_L0256_BIO
static const TFilterCoeff m_bilinearFilter[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS << VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE][NTAPS_BILINEAR]; ///< bilinear filter taps static const TFilterCoeff m_bilinearFilter[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_BILINEAR]; ///< bilinear filter taps
#endif #endif
public: public:
template<bool isFirst, bool isLast> template<bool isFirst, bool isLast>
......
...@@ -485,7 +485,7 @@ unsigned LoopFilter::xGetBoundaryStrengthSingle ( const CodingUnit& cu, const De ...@@ -485,7 +485,7 @@ unsigned LoopFilter::xGetBoundaryStrengthSingle ( const CodingUnit& cu, const De
if( 0 <= miQ.refIdx[0] ) { mvQ0 = miQ.mv[0]; } if( 0 <= miQ.refIdx[0] ) { mvQ0 = miQ.mv[0]; }
if( 0 <= miQ.refIdx[1] ) { mvQ1 = miQ.mv[1]; } if( 0 <= miQ.refIdx[1] ) { mvQ1 = miQ.mv[1]; }
int nThreshold = 4 << VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE; int nThreshold = 1 << MV_FRACTIONAL_BITS_INTERNAL;
unsigned uiBs = 0; unsigned uiBs = 0;
//th can be optimized //th can be optimized
...@@ -538,7 +538,7 @@ unsigned LoopFilter::xGetBoundaryStrengthSingle ( const CodingUnit& cu, const De ...@@ -538,7 +538,7 @@ unsigned LoopFilter::xGetBoundaryStrengthSingle ( const CodingUnit& cu, const De
Mv mvP0 = miP.mv[0]; Mv mvP0 = miP.mv[0];
Mv mvQ0 = miQ.mv[0]; Mv mvQ0 = miQ.mv[0];
int nThreshold = 4 << VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE; int nThreshold = 1 << MV_FRACTIONAL_BITS_INTERNAL;
return ( ( abs( mvQ0.getHor() - mvP0.getHor() ) >= nThreshold ) || ( abs( mvQ0.getVer() - mvP0.getVer() ) >= nThreshold ) ) ? 1 : 0; return ( ( abs( mvQ0.getHor() - mvP0.getHor() ) >= nThreshold ) || ( abs( mvQ0.getVer() - mvP0.getVer() ) >= nThreshold ) ) ? 1 : 0;
} }
......
...@@ -55,7 +55,7 @@ void clipMv( Mv& rcMv, const Position& pos, ...@@ -55,7 +55,7 @@ void clipMv( Mv& rcMv, const Position& pos,
#endif #endif
const SPS& sps ) const SPS& sps )
{ {
int iMvShift = 2 + VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE; int iMvShift = MV_FRACTIONAL_BITS_INTERNAL;
int iOffset = 8; int iOffset = 8;
int iHorMax = ( sps.getPicWidthInLumaSamples() + iOffset - ( int ) pos.x - 1 ) << iMvShift; int iHorMax = ( sps.getPicWidthInLumaSamples() + iOffset - ( int ) pos.x - 1 ) << iMvShift;
int iHorMin = ( -( int ) sps.getMaxCUWidth() - iOffset - ( int ) pos.x + 1 ) << iMvShift; int iHorMin = ( -( int ) sps.getMaxCUWidth() - iOffset - ( int ) pos.x + 1 ) << iMvShift;
......
...@@ -4107,7 +4107,7 @@ bool PU::getInterMergeSubPuMvpCand(const PredictionUnit &pu, MergeCtx& mrgCtx, b ...@@ -4107,7 +4107,7 @@ bool PU::getInterMergeSubPuMvpCand(const PredictionUnit &pu, MergeCtx& mrgCtx, b
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
//////// GET Initial Temporal Vector //////// //////// GET Initial Temporal Vector ////////
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
int mvPrec = 2 + VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE; int mvPrec = MV_FRACTIONAL_BITS_INTERNAL;
#if !JVET_L0257_ATMVP_COLBLK_CLIP #if !JVET_L0257_ATMVP_COLBLK_CLIP
int mvRndOffs = (1 << mvPrec) >> 1; int mvRndOffs = (1 << mvPrec) >> 1;
#endif #endif
......
...@@ -409,7 +409,7 @@ void getAndStoreBlockStatistics(const CodingStructure& cs, const UnitArea& ctuAr ...@@ -409,7 +409,7 @@ void getAndStoreBlockStatistics(const CodingStructure& cs, const UnitArea& ctuAr
void writeAllData(const CodingStructure& cs, const UnitArea& ctuArea) void writeAllData(const CodingStructure& cs, const UnitArea& ctuArea)
{ {
const int maxNumChannelType = cs.pcv->chrFormat != CHROMA_400 && CS::isDualITree( cs ) ? 2 : 1; const int maxNumChannelType = cs.pcv->chrFormat != CHROMA_400 && CS::isDualITree( cs ) ? 2 : 1;
const int nShift = VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE; const int nShift = MV_FRACTIONAL_BITS_DIFF;
const int nOffset = 1 << (nShift - 1); const int nOffset = 1 << (nShift - 1);
for( int ch = 0; ch < maxNumChannelType; ch++ ) for( int ch = 0; ch < maxNumChannelType; ch++ )
{ {
...@@ -682,7 +682,7 @@ void writeAllData(const CodingStructure& cs, const UnitArea& ctuArea) ...@@ -682,7 +682,7 @@ void writeAllData(const CodingStructure& cs, const UnitArea& ctuArea)
void writeAllCodedData(const CodingStructure & cs, const UnitArea & ctuArea) void writeAllCodedData(const CodingStructure & cs, const UnitArea & ctuArea)
{ {
const int nShift = VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE; const int nShift = MV_FRACTIONAL_BITS_DIFF;
const int nOffset = 1 << (nShift - 1); const int nOffset = 1 << (nShift - 1);
const int maxNumChannelType = cs.pcv->chrFormat != CHROMA_400 && CS::isDualITree(cs) ? 2 : 1; const int maxNumChannelType = cs.pcv->chrFormat != CHROMA_400 && CS::isDualITree(cs) ? 2 : 1;
......
This diff is collapsed.
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