Commit a45b614a authored by Xiang Li's avatar Xiang Li
Browse files

Merge branch 'fix1451' into 'master'

Fix #1451: Align SW with spec for RPR/4:4:4 combination

See merge request jvet/VVCSoftware_VTM!2006
parents 168aef47 ca1b33a8
......@@ -698,13 +698,22 @@ void InterPrediction::xPredInterBlk ( const ComponentID& compID, const Predictio
}
else
{
int xFrac = mv.hor & ((1 << shiftHor) - 1);
int yFrac = mv.ver & ((1 << shiftVer) - 1);
int xFrac, yFrac;
if (isIBC)
{
xFrac = yFrac = 0;
JVET_J0090_SET_CACHE_ENABLE(false);
}
else if (isLuma(compID))
{
xFrac = mv.hor & 15;
yFrac = mv.ver & 15;
}
else
{
xFrac = (mv.hor << (1 - ::getComponentScaleX(compID, chFmt))) & 31;
yFrac = (mv.ver << (1 - ::getComponentScaleY(compID, chFmt))) & 31;
}
PelBuf & dstBuf = dstPic.bufs[compID];
unsigned width = dstBuf.width;
......@@ -752,12 +761,12 @@ void InterPrediction::xPredInterBlk ( const ComponentID& compID, const Predictio
if (yFrac == 0)
{
m_if.filterHor(compID, (Pel *) refBuf.buf, refBuf.stride, dstBuf.buf, dstBuf.stride, backupWidth, backupHeight,
xFrac, rndRes, chFmt, clpRng, bilinearMC, bilinearMC, useAltHpelIf);
xFrac, rndRes, clpRng, bilinearMC, bilinearMC, useAltHpelIf);
}
else if (xFrac == 0)
{
m_if.filterVer(compID, (Pel *) refBuf.buf, refBuf.stride, dstBuf.buf, dstBuf.stride, backupWidth, backupHeight,
yFrac, true, rndRes, chFmt, clpRng, bilinearMC, bilinearMC, useAltHpelIf);
yFrac, true, rndRes, clpRng, bilinearMC, bilinearMC, useAltHpelIf);
}
else
{
......@@ -774,12 +783,12 @@ void InterPrediction::xPredInterBlk ( const ComponentID& compID, const Predictio
vFilterSize = NTAPS_BILINEAR;
}
m_if.filterHor(compID, (Pel *) refBuf.buf - ((vFilterSize >> 1) - 1) * refBuf.stride, refBuf.stride, tmpBuf.buf,
tmpBuf.stride, backupWidth, backupHeight + vFilterSize - 1, xFrac, false, chFmt, clpRng,
bilinearMC, bilinearMC, useAltHpelIf);
tmpBuf.stride, backupWidth, backupHeight + vFilterSize - 1, xFrac, false, clpRng, bilinearMC,
bilinearMC, useAltHpelIf);
JVET_J0090_SET_CACHE_ENABLE(false);
m_if.filterVer(compID, (Pel *) tmpBuf.buf + ((vFilterSize >> 1) - 1) * tmpBuf.stride, tmpBuf.stride, dstBuf.buf,
dstBuf.stride, backupWidth, backupHeight, yFrac, false, rndRes, chFmt, clpRng, bilinearMC,
bilinearMC, useAltHpelIf);
dstBuf.stride, backupWidth, backupHeight, yFrac, false, rndRes, clpRng, bilinearMC, bilinearMC,
useAltHpelIf);
}
JVET_J0090_SET_CACHE_ENABLE(
(srcPadStride == 0)
......@@ -1135,25 +1144,19 @@ void InterPrediction::xPredAffineBlk(const ComponentID &compID, const Prediction
// get the MV in high precision
int xFrac, yFrac, xInt, yInt;
if (!iScaleX)
if (isLuma(compID))
{
xInt = iMvScaleTmpHor >> 4;
xFrac = iMvScaleTmpHor & 15;
}
else
{
xInt = iMvScaleTmpHor >> 5;
xFrac = iMvScaleTmpHor & 31;
}
if (!iScaleY)
{
yInt = iMvScaleTmpVer >> 4;
yFrac = iMvScaleTmpVer & 15;
}
else
{
yInt = iMvScaleTmpVer >> 5;
yFrac = iMvScaleTmpVer & 31;
xInt = (iMvScaleTmpHor << (1 - iScaleX)) >> 5;
xFrac = (iMvScaleTmpHor << (1 - iScaleX)) & 31;
yInt = (iMvScaleTmpVer << (1 - iScaleY)) >> 5;
yFrac = (iMvScaleTmpVer << (1 - iScaleY)) & 31;
}
const CPelBuf refBuf = refPic->getRecoBuf(
......@@ -1176,19 +1179,19 @@ void InterPrediction::xPredAffineBlk(const ComponentID &compID, const Prediction
if (yFrac == 0)
{
m_if.filterHor(compID, (Pel *) ref, refStride, dst, dstStride, bw, bh, xFrac, isLast, chFmt, clpRng);
m_if.filterHor(compID, (Pel *) ref, refStride, dst, dstStride, bw, bh, xFrac, isLast, clpRng);
}
else if (xFrac == 0)
{
m_if.filterVer(compID, (Pel *) ref, refStride, dst, dstStride, bw, bh, yFrac, true, isLast, chFmt, clpRng);
m_if.filterVer(compID, (Pel *) ref, refStride, dst, dstStride, bw, bh, yFrac, true, isLast, clpRng);
}
else
{
m_if.filterHor(compID, (Pel *) ref - ((vFilterSize >> 1) - 1) * refStride, refStride, tmpBuf.buf,
tmpBuf.stride, bw, bh + vFilterSize - 1, xFrac, false, chFmt, clpRng);
tmpBuf.stride, bw, bh + vFilterSize - 1, xFrac, false, clpRng);
JVET_J0090_SET_CACHE_ENABLE(false);
m_if.filterVer(compID, tmpBuf.buf + ((vFilterSize >> 1) - 1) * tmpBuf.stride, tmpBuf.stride, dst, dstStride,
bw, bh, yFrac, false, isLast, chFmt, clpRng);
bw, bh, yFrac, false, isLast, clpRng);
JVET_J0090_SET_CACHE_ENABLE(true);
}
if (enablePROF)
......@@ -2314,8 +2317,8 @@ bool InterPrediction::xPredInterBlkRPR( const std::pair<int, int>& scalingRatio,
const ComponentID compID = blk.compID;
const bool rndRes = !bi;
int shiftHor = MV_FRACTIONAL_BITS_INTERNAL + ::getComponentScaleX( compID, chFmt );
int shiftVer = MV_FRACTIONAL_BITS_INTERNAL + ::getComponentScaleY( compID, chFmt );
int shiftHor = MV_FRACTIONAL_BITS_INTERNAL + (isLuma(compID) ? 0 : 1);
int shiftVer = MV_FRACTIONAL_BITS_INTERNAL + (isLuma(compID) ? 0 : 1);
int width = blk.width;
int height = blk.height;
......@@ -2464,7 +2467,9 @@ bool InterPrediction::xPredInterBlkRPR( const std::pair<int, int>& scalingRatio,
refBuf = refPic->getRecoBuf( CompArea( compID, chFmt, offset, Size( 1, refHeight ) ), wrapRef );
Pel* tempBuf = buffer + col;
m_if.filterHor( compID, (Pel*)refBuf.buf - ( ( vFilterSize >> 1 ) - 1 ) * refBuf.stride, refBuf.stride, tempBuf, tmpStride, 1, refHeight + vFilterSize - 1 + extSize, xFrac, false, chFmt, clpRng, xFilter, false, useAltHpelIf && scalingRatio.first == 1 << SCALE_RATIO_BITS );
m_if.filterHor(compID, (Pel *) refBuf.buf - ((vFilterSize >> 1) - 1) * refBuf.stride, refBuf.stride, tempBuf,
tmpStride, 1, refHeight + vFilterSize - 1 + extSize, xFrac, false, clpRng, xFilter, false,
useAltHpelIf && scalingRatio.first == 1 << SCALE_RATIO_BITS);
}
for( row = 0; row < height; row++ )
......@@ -2479,7 +2484,9 @@ bool InterPrediction::xPredInterBlkRPR( const std::pair<int, int>& scalingRatio,
Pel* tempBuf = buffer + ( yInt - yInt0 ) * tmpStride;
JVET_J0090_SET_CACHE_ENABLE( false );
m_if.filterVer( compID, tempBuf + ( ( vFilterSize >> 1 ) - 1 ) * tmpStride, tmpStride, dst + row * dstStride, dstStride, width, 1, yFrac, false, rndRes, chFmt, clpRng, yFilter, false, useAltHpelIf && scalingRatio.second == 1 << SCALE_RATIO_BITS );
m_if.filterVer(compID, tempBuf + ((vFilterSize >> 1) - 1) * tmpStride, tmpStride, dst + row * dstStride,
dstStride, width, 1, yFrac, false, rndRes, clpRng, yFilter, false,
useAltHpelIf && scalingRatio.second == 1 << SCALE_RATIO_BITS);
JVET_J0090_SET_CACHE_ENABLE( true );
}
}
......
......@@ -733,10 +733,11 @@ void InterpolationFilter::filterVer(const ClpRng& clpRng, Pel const *src, int sr
* \param height Height of block
* \param frac Fractional sample offset
* \param isLast Flag indicating whether it is the last filtering operation
* \param fmt Chroma format
* \param bitDepth Bit depth
*/
void InterpolationFilter::filterHor(const ComponentID compID, Pel const *src, int srcStride, Pel *dst, int dstStride, int width, int height, int frac, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng, int nFilterIdx, bool biMCForDMVR, bool useAltHpelIf)
void InterpolationFilter::filterHor(const ComponentID compID, Pel const *src, int srcStride, Pel *dst, int dstStride,
int width, int height, int frac, bool isLast, const ClpRng &clpRng, int nFilterIdx,
bool biMCForDMVR, bool useAltHpelIf)
{
if( frac == 0 && nFilterIdx < 2 )
{
......@@ -784,19 +785,21 @@ void InterpolationFilter::filterHor(const ComponentID compID, Pel const *src, in
}
else
{
const uint32_t csx = getComponentScaleX( compID, fmt );
CHECK( frac < 0 || csx >= 2 || ( frac << ( 1 - csx ) ) >= CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS, "Invalid fraction" );
CHECK(frac < 0 || frac >= CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS, "Invalid fraction");
if( nFilterIdx == 3 )
{
filterHor<NTAPS_CHROMA>( clpRng, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilterRPR1[frac << ( 1 - csx )], biMCForDMVR );
filterHor<NTAPS_CHROMA>(clpRng, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilterRPR1[frac],
biMCForDMVR);
}
else if( nFilterIdx == 4 )
{
filterHor<NTAPS_CHROMA>( clpRng, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilterRPR2[frac << ( 1 - csx )], biMCForDMVR );
filterHor<NTAPS_CHROMA>(clpRng, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilterRPR2[frac],
biMCForDMVR);
}
else
{
filterHor<NTAPS_CHROMA>( clpRng, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilter[frac << ( 1 - csx )], biMCForDMVR );
filterHor<NTAPS_CHROMA>(clpRng, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilter[frac],
biMCForDMVR);
}
}
}
......@@ -815,10 +818,11 @@ void InterpolationFilter::filterHor(const ComponentID compID, Pel const *src, in
* \param frac Fractional sample offset
* \param isFirst Flag indicating whether it is the first filtering operation
* \param isLast Flag indicating whether it is the last filtering operation
* \param fmt Chroma format
* \param bitDepth Bit depth
*/
void InterpolationFilter::filterVer(const ComponentID compID, Pel const *src, int srcStride, Pel *dst, int dstStride, int width, int height, int frac, bool isFirst, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng, int nFilterIdx, bool biMCForDMVR, bool useAltHpelIf)
void InterpolationFilter::filterVer(const ComponentID compID, Pel const *src, int srcStride, Pel *dst, int dstStride,
int width, int height, int frac, bool isFirst, bool isLast, const ClpRng &clpRng,
int nFilterIdx, bool biMCForDMVR, bool useAltHpelIf)
{
if( frac == 0 && nFilterIdx < 2 )
{
......@@ -866,19 +870,21 @@ void InterpolationFilter::filterVer(const ComponentID compID, Pel const *src, in
}
else
{
const uint32_t csy = getComponentScaleY( compID, fmt );
CHECK( frac < 0 || csy >= 2 || ( frac << ( 1 - csy ) ) >= CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS, "Invalid fraction" );
CHECK(frac < 0 || frac >= CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS, "Invalid fraction");
if( nFilterIdx == 3 )
{
filterVer<NTAPS_CHROMA>( clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilterRPR1[frac << ( 1 - csy )], biMCForDMVR );
filterVer<NTAPS_CHROMA>(clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast,
m_chromaFilterRPR1[frac], biMCForDMVR);
}
else if( nFilterIdx == 4 )
{
filterVer<NTAPS_CHROMA>( clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilterRPR2[frac << ( 1 - csy )], biMCForDMVR );
filterVer<NTAPS_CHROMA>(clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast,
m_chromaFilterRPR2[frac], biMCForDMVR);
}
else
{
filterVer<NTAPS_CHROMA>( clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilter[frac << ( 1 - csy )], biMCForDMVR );
filterVer<NTAPS_CHROMA>(clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast,
m_chromaFilter[frac], biMCForDMVR);
}
}
}
......
......@@ -102,8 +102,12 @@ public:
template <X86_VEXT vext>
void _initInterpolationFilterX86();
#endif
void filterHor(const ComponentID compID, Pel const* src, int srcStride, Pel *dst, int dstStride, int width, int height, int frac, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng, int nFilterIdx = 0, bool biMCForDMVR = false, bool useAltHpelIf = false);
void filterVer(const ComponentID compID, Pel const* src, int srcStride, Pel *dst, int dstStride, int width, int height, int frac, bool isFirst, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng, int nFilterIdx = 0, bool biMCForDMVR = false, bool useAltHpelIf = false);
void filterHor(const ComponentID compID, Pel const *src, int srcStride, Pel *dst, int dstStride, int width,
int height, int frac, bool isLast, const ClpRng &clpRng, int nFilterIdx = 0, bool biMCForDMVR = false,
bool useAltHpelIf = false);
void filterVer(const ComponentID compID, Pel const *src, int srcStride, Pel *dst, int dstStride, int width,
int height, int frac, bool isFirst, bool isLast, const ClpRng &clpRng, int nFilterIdx = 0,
bool biMCForDMVR = false, bool useAltHpelIf = false);
#if JVET_J0090_MEMORY_BANDWITH_MEASURE
void cacheAssign( CacheModel *cache ) { m_cacheModel = cache; }
#endif
......
......@@ -5904,17 +5904,18 @@ void InterSearch::xExtDIFUpSamplingH(CPelBuf* pattern, bool useAltHpelIf)
int halfFilterSize = (filterSize>>1);
const Pel *srcPtr = pattern->buf - halfFilterSize*srcStride - 1;
const ChromaFormat chFmt = m_currChromaFormat;
m_if.filterHor(COMPONENT_Y, srcPtr, srcStride, m_filteredBlockTmp[0][0], intStride, width + 1, height + filterSize, 0 << MV_FRACTIONAL_BITS_DIFF, false, chFmt, clpRng, 0, false, useAltHpelIf);
m_if.filterHor(COMPONENT_Y, srcPtr, srcStride, m_filteredBlockTmp[0][0], intStride, width + 1, height + filterSize,
0 << MV_FRACTIONAL_BITS_DIFF, false, clpRng, 0, false, useAltHpelIf);
if (!m_skipFracME)
{
m_if.filterHor(COMPONENT_Y, srcPtr, srcStride, m_filteredBlockTmp[2][0], intStride, width + 1, height + filterSize, 2 << MV_FRACTIONAL_BITS_DIFF, false, chFmt, clpRng, 0, false, useAltHpelIf);
m_if.filterHor(COMPONENT_Y, srcPtr, srcStride, m_filteredBlockTmp[2][0], intStride, width + 1, height + filterSize,
2 << MV_FRACTIONAL_BITS_DIFF, false, clpRng, 0, false, useAltHpelIf);
}
intPtr = m_filteredBlockTmp[0][0] + halfFilterSize * intStride + 1;
dstPtr = m_filteredBlock[0][0][0];
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width + 0, height + 0, 0 << MV_FRACTIONAL_BITS_DIFF, false, true, chFmt, clpRng, 0, false, useAltHpelIf);
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width + 0, height + 0, 0 << MV_FRACTIONAL_BITS_DIFF,
false, true, clpRng, 0, false, useAltHpelIf);
if (m_skipFracME)
{
return;
......@@ -5922,15 +5923,18 @@ void InterSearch::xExtDIFUpSamplingH(CPelBuf* pattern, bool useAltHpelIf)
intPtr = m_filteredBlockTmp[0][0] + (halfFilterSize - 1) * intStride + 1;
dstPtr = m_filteredBlock[2][0][0];
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width + 0, height + 1, 2 << MV_FRACTIONAL_BITS_DIFF, false, true, chFmt, clpRng, 0, false, useAltHpelIf);
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width + 0, height + 1, 2 << MV_FRACTIONAL_BITS_DIFF,
false, true, clpRng, 0, false, useAltHpelIf);
intPtr = m_filteredBlockTmp[2][0] + halfFilterSize * intStride;
dstPtr = m_filteredBlock[0][2][0];
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width + 1, height + 0, 0 << MV_FRACTIONAL_BITS_DIFF, false, true, chFmt, clpRng, 0, false, useAltHpelIf);
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width + 1, height + 0, 0 << MV_FRACTIONAL_BITS_DIFF,
false, true, clpRng, 0, false, useAltHpelIf);
intPtr = m_filteredBlockTmp[2][0] + (halfFilterSize - 1) * intStride;
dstPtr = m_filteredBlock[2][2][0];
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width + 1, height + 1, 2 << MV_FRACTIONAL_BITS_DIFF, false, true, chFmt, clpRng, 0, false, useAltHpelIf);
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width + 1, height + 1, 2 << MV_FRACTIONAL_BITS_DIFF,
false, true, clpRng, 0, false, useAltHpelIf);
}
......@@ -5959,8 +5963,6 @@ void InterSearch::xExtDIFUpSamplingQ( CPelBuf* pattern, Mv halfPelRef )
int extHeight = (halfPelRef.getVer() == 0) ? height + filterSize : height + filterSize-1;
const ChromaFormat chFmt = m_currChromaFormat;
// Horizontal filter 1/4
srcPtr = pattern->buf - halfFilterSize * srcStride - 1;
intPtr = m_filteredBlockTmp[1][0];
......@@ -5972,7 +5974,8 @@ void InterSearch::xExtDIFUpSamplingQ( CPelBuf* pattern, Mv halfPelRef )
{
srcPtr += 1;
}
m_if.filterHor(COMPONENT_Y, srcPtr, srcStride, intPtr, intStride, width, extHeight, 1 << MV_FRACTIONAL_BITS_DIFF, false, chFmt, clpRng);
m_if.filterHor(COMPONENT_Y, srcPtr, srcStride, intPtr, intStride, width, extHeight, 1 << MV_FRACTIONAL_BITS_DIFF,
false, clpRng);
// Horizontal filter 3/4
srcPtr = pattern->buf - halfFilterSize*srcStride - 1;
......@@ -5985,7 +5988,8 @@ void InterSearch::xExtDIFUpSamplingQ( CPelBuf* pattern, Mv halfPelRef )
{
srcPtr += 1;
}
m_if.filterHor(COMPONENT_Y, srcPtr, srcStride, intPtr, intStride, width, extHeight, 3 << MV_FRACTIONAL_BITS_DIFF, false, chFmt, clpRng);
m_if.filterHor(COMPONENT_Y, srcPtr, srcStride, intPtr, intStride, width, extHeight, 3 << MV_FRACTIONAL_BITS_DIFF,
false, clpRng);
// Generate @ 1,1
intPtr = m_filteredBlockTmp[1][0] + (halfFilterSize-1) * intStride;
......@@ -5994,12 +5998,14 @@ void InterSearch::xExtDIFUpSamplingQ( CPelBuf* pattern, Mv halfPelRef )
{
intPtr += intStride;
}
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 1 << MV_FRACTIONAL_BITS_DIFF, false, true, chFmt, clpRng);
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 1 << MV_FRACTIONAL_BITS_DIFF, false,
true, clpRng);
// Generate @ 3,1
intPtr = m_filteredBlockTmp[1][0] + (halfFilterSize-1) * intStride;
dstPtr = m_filteredBlock[3][1][0];
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 3 << MV_FRACTIONAL_BITS_DIFF, false, true, chFmt, clpRng);
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 3 << MV_FRACTIONAL_BITS_DIFF, false,
true, clpRng);
if (halfPelRef.getVer() != 0)
{
......@@ -6010,7 +6016,8 @@ void InterSearch::xExtDIFUpSamplingQ( CPelBuf* pattern, Mv halfPelRef )
{
intPtr += intStride;
}
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 2 << MV_FRACTIONAL_BITS_DIFF, false, true, chFmt, clpRng);
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 2 << MV_FRACTIONAL_BITS_DIFF,
false, true, clpRng);
// Generate @ 2,3
intPtr = m_filteredBlockTmp[3][0] + (halfFilterSize - 1) * intStride;
......@@ -6019,19 +6026,22 @@ void InterSearch::xExtDIFUpSamplingQ( CPelBuf* pattern, Mv halfPelRef )
{
intPtr += intStride;
}
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 2 << MV_FRACTIONAL_BITS_DIFF, false, true, chFmt, clpRng);
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 2 << MV_FRACTIONAL_BITS_DIFF,
false, true, clpRng);
}
else
{
// Generate @ 0,1
intPtr = m_filteredBlockTmp[1][0] + halfFilterSize * intStride;
dstPtr = m_filteredBlock[0][1][0];
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 0 << MV_FRACTIONAL_BITS_DIFF, false, true, chFmt, clpRng);
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 0 << MV_FRACTIONAL_BITS_DIFF,
false, true, clpRng);
// Generate @ 0,3
intPtr = m_filteredBlockTmp[3][0] + halfFilterSize * intStride;
dstPtr = m_filteredBlock[0][3][0];
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 0 << MV_FRACTIONAL_BITS_DIFF, false, true, chFmt, clpRng);
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 0 << MV_FRACTIONAL_BITS_DIFF,
false, true, clpRng);
}
if (halfPelRef.getHor() != 0)
......@@ -6047,7 +6057,8 @@ void InterSearch::xExtDIFUpSamplingQ( CPelBuf* pattern, Mv halfPelRef )
{
intPtr += intStride;
}
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 1 << MV_FRACTIONAL_BITS_DIFF, false, true, chFmt, clpRng);
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 1 << MV_FRACTIONAL_BITS_DIFF,
false, true, clpRng);
// Generate @ 3,2
intPtr = m_filteredBlockTmp[2][0] + (halfFilterSize - 1) * intStride;
......@@ -6060,7 +6071,8 @@ void InterSearch::xExtDIFUpSamplingQ( CPelBuf* pattern, Mv halfPelRef )
{
intPtr += intStride;
}
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 3 << MV_FRACTIONAL_BITS_DIFF, false, true, chFmt, clpRng);
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 3 << MV_FRACTIONAL_BITS_DIFF,
false, true, clpRng);
}
else
{
......@@ -6071,7 +6083,8 @@ void InterSearch::xExtDIFUpSamplingQ( CPelBuf* pattern, Mv halfPelRef )
{
intPtr += intStride;
}
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 1 << MV_FRACTIONAL_BITS_DIFF, false, true, chFmt, clpRng);
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 1 << MV_FRACTIONAL_BITS_DIFF,
false, true, clpRng);
// Generate @ 3,0
intPtr = m_filteredBlockTmp[0][0] + (halfFilterSize - 1) * intStride + 1;
......@@ -6080,7 +6093,8 @@ void InterSearch::xExtDIFUpSamplingQ( CPelBuf* pattern, Mv halfPelRef )
{
intPtr += intStride;
}
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 3 << MV_FRACTIONAL_BITS_DIFF, false, true, chFmt, clpRng);
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 3 << MV_FRACTIONAL_BITS_DIFF,
false, true, clpRng);
}
// Generate @ 1,3
......@@ -6090,12 +6104,14 @@ void InterSearch::xExtDIFUpSamplingQ( CPelBuf* pattern, Mv halfPelRef )
{
intPtr += intStride;
}
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 1 << MV_FRACTIONAL_BITS_DIFF, false, true, chFmt, clpRng);
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 1 << MV_FRACTIONAL_BITS_DIFF, false,
true, clpRng);
// Generate @ 3,3
intPtr = m_filteredBlockTmp[3][0] + (halfFilterSize - 1) * intStride;
dstPtr = m_filteredBlock[3][3][0];
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 3 << MV_FRACTIONAL_BITS_DIFF, false, true, chFmt, clpRng);
m_if.filterVer(COMPONENT_Y, intPtr, intStride, dstPtr, dstStride, width, height, 3 << MV_FRACTIONAL_BITS_DIFF, false,
true, clpRng);
}
......
Supports Markdown
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