Skip to content
Snippets Groups Projects
Commit 7a182416 authored by Vadim Seregin's avatar Vadim Seregin
Browse files

Merge branch 'JVET-Z0117_RPRfix' into 'master'

Fix: RPR fix for non 6-tap filters related to JVET-Z0117

See merge request !159
parents a0826d8e b00a8b8d
No related branches found
No related tags found
1 merge request!159Fix: RPR fix for non 6-tap filters related to JVET-Z0117
Pipeline #7376 passed
......@@ -815,6 +815,7 @@ static const int NTAPS_LUMA = 8; ///< Numb
#endif
#if JVET_Z0117_CHROMA_IF
static const int NTAPS_CHROMA = 6; ///< Number of taps for chroma
static const int NTAPS_CHROMA_RPR = 4; ///< Number of taps for chroma RPR
#else
static const int NTAPS_CHROMA = 4; ///< Number of taps for chroma
#endif
......
......@@ -458,7 +458,11 @@ const TFilterCoeff InterpolationFilter::m_chromaFilter[CHROMA_INTERPOLATION_FILT
#endif
#if INTRA_6TAP
#if JVET_Z0117_CHROMA_IF
const TFilterCoeff InterpolationFilter::m_weak4TapFilter[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][4] =
#else
const TFilterCoeff InterpolationFilter::m_weak4TapFilter[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_CHROMA] =
#endif
{
{ 0, 64, 0, 0},
{ -1, 64, 1, 0},
......@@ -603,7 +607,11 @@ const TFilterCoeff InterpolationFilter::m_lumaIntraFilterExt[CHROMA_INTERPOLATIO
#endif
#if JVET_W0123_TIMD_FUSION
#if JVET_Z0117_CHROMA_IF
const TFilterCoeff InterpolationFilter::g_aiExtIntraCubicFilter[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS << 1][4] = {
#else
const TFilterCoeff InterpolationFilter::g_aiExtIntraCubicFilter[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS<<1][NTAPS_CHROMA] = {
#endif
{ 0, 256, 0, 0 },
{ -1, 254, 4, -1 },
{ -3, 252, 8, -1 },
......@@ -669,7 +677,11 @@ const TFilterCoeff InterpolationFilter::g_aiExtIntraCubicFilter[CHROMA_INTERPOLA
{ -1, 8, 252, -3},
{ -1, 4, 254, -1},
};
#if JVET_Z0117_CHROMA_IF
const TFilterCoeff InterpolationFilter::g_aiExtIntraGaussFilter[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS << 1][4] = {
#else
const TFilterCoeff InterpolationFilter::g_aiExtIntraGaussFilter[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS<<1][NTAPS_CHROMA] = {
#endif
{ 47, 161, 47, 1 },
{ 45, 161, 49, 1 },
{ 43, 161, 51, 1 },
......@@ -738,7 +750,11 @@ const TFilterCoeff InterpolationFilter::g_aiExtIntraGaussFilter[CHROMA_INTERPOLA
#endif
//1.5x
#if JVET_Z0117_CHROMA_IF
const TFilterCoeff InterpolationFilter::m_chromaFilterRPR1[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_CHROMA_RPR] =
#else
const TFilterCoeff InterpolationFilter::m_chromaFilterRPR1[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_CHROMA] =
#endif
{
#if IF_12TAP
{ 12 * 4, 40 * 4, 12 * 4, 0 },
......@@ -810,7 +826,11 @@ const TFilterCoeff InterpolationFilter::m_chromaFilterRPR1[CHROMA_INTERPOLATION_
};
//2x
#if JVET_Z0117_CHROMA_IF
const TFilterCoeff InterpolationFilter::m_chromaFilterRPR2[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_CHROMA_RPR] =
#else
const TFilterCoeff InterpolationFilter::m_chromaFilterRPR2[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_CHROMA] =
#endif
{
#if IF_12TAP
{ 17 * 4, 30 * 4, 17 * 4, 0 },
......@@ -1717,11 +1737,19 @@ void InterpolationFilter::filterHor(const ComponentID compID, Pel const *src, in
CHECK( frac < 0 || csx >= 2 || ( frac << ( 1 - csx ) ) >= CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS, "Invalid fraction" );
if( nFilterIdx == 3 )
{
#if JVET_Z0117_CHROMA_IF
filterHor<NTAPS_CHROMA_RPR>(clpRng, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilterRPR1[frac << (1 - csx)], biMCForDMVR);
#else
filterHor<NTAPS_CHROMA>( clpRng, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilterRPR1[frac << ( 1 - csx )], biMCForDMVR );
#endif
}
else if( nFilterIdx == 4 )
{
#if JVET_Z0117_CHROMA_IF
filterHor<NTAPS_CHROMA_RPR>(clpRng, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilterRPR2[frac << (1 - csx)], biMCForDMVR);
#else
filterHor<NTAPS_CHROMA>( clpRng, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilterRPR2[frac << ( 1 - csx )], biMCForDMVR );
#endif
}
else
{
......@@ -1851,11 +1879,19 @@ void InterpolationFilter::filterVer(const ComponentID compID, Pel const *src, in
CHECK( frac < 0 || csy >= 2 || ( frac << ( 1 - csy ) ) >= CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS, "Invalid fraction" );
if( nFilterIdx == 3 )
{
#if JVET_Z0117_CHROMA_IF
filterVer<NTAPS_CHROMA_RPR>(clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilterRPR1[frac << (1 - csy)], biMCForDMVR);
#else
filterVer<NTAPS_CHROMA>( clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilterRPR1[frac << ( 1 - csy )], biMCForDMVR );
#endif
}
else if( nFilterIdx == 4 )
{
#if JVET_Z0117_CHROMA_IF
filterVer<NTAPS_CHROMA_RPR>(clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilterRPR2[frac << (1 - csy)], biMCForDMVR);
#else
filterVer<NTAPS_CHROMA>( clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilterRPR2[frac << ( 1 - csy )], biMCForDMVR );
#endif
}
else
{
......
......@@ -72,8 +72,13 @@ public:
#if JVET_Z0117_CHROMA_IF
static const TFilterCoeff m_chromaFilter4[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][4]; ///< Chroma filter taps
#endif
#if JVET_Z0117_CHROMA_IF
static const TFilterCoeff m_chromaFilterRPR1[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_CHROMA_RPR]; ///< Chroma filter taps 1.5x
static const TFilterCoeff m_chromaFilterRPR2[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_CHROMA_RPR]; ///< Chroma filter taps 2x
#else
static const TFilterCoeff m_chromaFilterRPR1[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_CHROMA]; ///< Chroma filter taps 1.5x
static const TFilterCoeff m_chromaFilterRPR2[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_CHROMA]; ///< Chroma filter taps 2x
#endif
#if IF_12TAP
static const TFilterCoeff m_lumaFilter12[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS + 1][12]; ///< Luma filter taps //+1 added by //kolya
static const TFilterCoeff m_lumaFilter[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][8]; ///< Luma filter taps, for affine
......@@ -96,14 +101,23 @@ private:
#endif
#if INTRA_6TAP
static const TFilterCoeff m_lumaIntraFilter[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][6]; ///< Chroma filter 6 taps
#if JVET_Z0117_CHROMA_IF
static const TFilterCoeff m_weak4TapFilter[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][4]; ///< Weak filter 4 taps
#else
static const TFilterCoeff m_weak4TapFilter[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_CHROMA]; ///< Weak filter 4 taps
#endif
#if JVET_W0123_TIMD_FUSION
static const TFilterCoeff m_lumaIntraFilterExt[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS << 1][6]; ///< Chroma filter 6 taps
#endif
#endif
#if JVET_W0123_TIMD_FUSION
#if JVET_Z0117_CHROMA_IF
static const TFilterCoeff g_aiExtIntraCubicFilter[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS << 1][4]; ///< Chroma filter taps
static const TFilterCoeff g_aiExtIntraGaussFilter[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS << 1][4]; ///< Chroma filter taps
#else
static const TFilterCoeff g_aiExtIntraCubicFilter[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS<<1][NTAPS_CHROMA]; ///< Chroma filter taps
static const TFilterCoeff g_aiExtIntraGaussFilter[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS<<1][NTAPS_CHROMA]; ///< Chroma filter taps
#endif
#endif
static const TFilterCoeff m_bilinearFilter[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_BILINEAR]; ///< bilinear filter taps
static const TFilterCoeff m_bilinearFilterPrec4[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_BILINEAR]; ///< bilinear filter taps
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment