Commit 38fee4b6 authored by Kiran Misra's avatar Kiran Misra

WIP: JVET-O0637 Choose line0 and line3 for gradient computation when chroma is same size as luma

parent 2637b3c2
......@@ -1206,18 +1206,33 @@ void LoopFilter::xEdgeFilterChroma(const CodingUnit& cu, const DeblockEdgeDir ed
const int dp0 = xCalcDP(piTmpSrcChroma + iSrcStep*(iIdx*uiLoopLength + 0), iOffset);
const int dq0 = xCalcDQ(piTmpSrcChroma + iSrcStep*(iIdx*uiLoopLength + 0), iOffset);
#if JVET_O0637_CHROMA_GRADIENT_LINE_SELECTION
const int subSamplingShift = ( edgeDir == EDGE_VER ) ? m_shiftVer : m_shiftHor;
const int dp3 = ( subSamplingShift == 1 ) ? xCalcDP(piTmpSrcChroma + iSrcStep*(iIdx*uiLoopLength + 1), iOffset) : xCalcDP(piTmpSrcChroma + iSrcStep*(iIdx*uiLoopLength + 3), iOffset);
const int dq3 = ( subSamplingShift == 1 ) ? xCalcDQ(piTmpSrcChroma + iSrcStep*(iIdx*uiLoopLength + 1), iOffset) : xCalcDQ(piTmpSrcChroma + iSrcStep*(iIdx*uiLoopLength + 3), iOffset);
#else
const int dp1 = xCalcDP(piTmpSrcChroma + iSrcStep*(iIdx*uiLoopLength + 1), iOffset);
const int dq1 = xCalcDQ(piTmpSrcChroma + iSrcStep*(iIdx*uiLoopLength + 1), iOffset);
#endif
const int d0 = dp0 + dq0;
#if JVET_O0637_CHROMA_GRADIENT_LINE_SELECTION
const int d3 = dp3 + dq3;
const int d = d0 + d3;
#else
const int d1 = dp1 + dq1;
const int d = d0 + d1;
#endif
if (d < beta)
{
useLongFilter = true;
const bool sw = xUseStrongFiltering(piTmpSrcChroma + iSrcStep*(iIdx*uiLoopLength + 0), iOffset, 2 * d0, beta, iTc)
#if JVET_O0637_CHROMA_GRADIENT_LINE_SELECTION
&& xUseStrongFiltering(piTmpSrcChroma + iSrcStep*(iIdx*uiLoopLength + ( ( subSamplingShift == 1 ) ? 1 : 3 ) ), iOffset, 2 * d3, beta, iTc);
#else
&& xUseStrongFiltering(piTmpSrcChroma + iSrcStep*(iIdx*uiLoopLength + 1), iOffset, 2 * d1, beta, iTc);
#endif
for (unsigned step = 0; step < uiLoopLength; step++)
{
......
......@@ -52,6 +52,8 @@
#define JVET_O0247_ALF_CTB_CODING_REDUNDANCY_REMOVAL 1 // JVET-O0247: not signal APS index when number APS is 2
#define JVET_O0637_CHROMA_GRADIENT_LINE_SELECTION 1 // Choose line0 and line3 for gradient computation when chroma is same size as luma
#define JVET_O0288_UNIFY_ALF_SLICE_TYPE_REMOVAL 1 // JVET-O0288: remove slice type dependency in ALF
#define JVET_O0064_SIMP_ALF_CLIP_CODING 1 // JVET-O0047/O0058/O0064/O0067/O0290/O0301/O0430: use FLC for alf clipping indices, always signal alf clipping indices
......
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