Skip to content
Snippets Groups Projects
Commit f8007289 authored by Frank Bossen's avatar Frank Bossen
Browse files

remove macro JVET_T0091_LMCS_ENC_OVERFLOW_FIX

parent 49b76c70
No related branches found
No related tags found
1 merge request!1980Remove macros from previous cycle
...@@ -56,7 +56,6 @@ ...@@ -56,7 +56,6 @@
#define FIX_TICKET_1442_PTL_IN_VPS 1 // Fix PTL signalling in VPS such that also the sublayer with the second highest TemporalID is signalled #define FIX_TICKET_1442_PTL_IN_VPS 1 // Fix PTL signalling in VPS such that also the sublayer with the second highest TemporalID is signalled
#define JVET_S0078_NOOUTPUTPRIORPICFLAG 0 // JVET-S0078: Handling of NoOutputOfPriorPicsFlag in output process #define JVET_S0078_NOOUTPUTPRIORPICFLAG 0 // JVET-S0078: Handling of NoOutputOfPriorPicsFlag in output process
#define JVET_T0091_LMCS_ENC_OVERFLOW_FIX 1 // JVET-T0091: LMCS encoder overflow fix at high bit-depth for SDR
#define JVET_S0163_ON_TARGETOLS_SUBLAYERS 1 // JVET-S0163: On target OLS and sublayers for decoding (OPI NAL Unit) #define JVET_S0163_ON_TARGETOLS_SUBLAYERS 1 // JVET-S0163: On target OLS and sublayers for decoding (OPI NAL Unit)
#define JVET_R0266_GCI 1 // JVET-R0266 #5: Specify that no_gdr_constraint_flag equal to 1 specifies that sps_gdr_enabled_flag shall be equal to 0 #define JVET_R0266_GCI 1 // JVET-R0266 #5: Specify that no_gdr_constraint_flag equal to 1 specifies that sps_gdr_enabled_flag shall be equal to 0
#define JVET_S0084_S0110_RADL 1 // When the current picture is a RADL picture, allow RASL pictures with pps_mixed_nalu_types_in_pic_flag is equal to 1 in active entries in RefPicList[ 0 ] or RefPicList[ 1 ] #define JVET_S0084_S0110_RADL 1 // When the current picture is a RADL picture, allow RASL pictures with pps_mixed_nalu_types_in_pic_flag is equal to 1 in active entries in RefPicList[ 0 ] or RefPicList[ 1 ]
......
...@@ -228,11 +228,7 @@ void EncReshape::calcSeqStats(Picture *pcPic, SeqInfo &stats) ...@@ -228,11 +228,7 @@ void EncReshape::calcSeqStats(Picture *pcPic, SeqInfo &stats)
{ {
for (bx = x1; bx <= x2; bx++) for (bx = x1; bx <= x2; bx++)
{ {
#if JVET_T0091_LMCS_ENC_OVERFLOW_FIX
tempSq = (int64_t)pWinY[bx] * (int64_t)pWinY[bx]; tempSq = (int64_t)pWinY[bx] * (int64_t)pWinY[bx];
#else
tempSq = pWinY[bx] * pWinY[bx];
#endif
leftSum += pWinY[bx]; leftSum += pWinY[bx];
leftSumSq += tempSq; leftSumSq += tempSq;
leftColSum[bx] += pWinY[bx]; leftColSum[bx] += pWinY[bx];
...@@ -259,11 +255,7 @@ void EncReshape::calcSeqStats(Picture *pcPic, SeqInfo &stats) ...@@ -259,11 +255,7 @@ void EncReshape::calcSeqStats(Picture *pcPic, SeqInfo &stats)
for (bx = x1; bx <= x2; bx++) for (bx = x1; bx <= x2; bx++)
{ {
topRowSum[y + winLens] += pWinY[bx]; topRowSum[y + winLens] += pWinY[bx];
#if JVET_T0091_LMCS_ENC_OVERFLOW_FIX
topRowSumSq[y + winLens] += (int64_t)pWinY[bx] * (int64_t)pWinY[bx]; topRowSumSq[y + winLens] += (int64_t)pWinY[bx] * (int64_t)pWinY[bx];
#else
topRowSumSq[y + winLens] += pWinY[bx] * pWinY[bx];
#endif
} }
topSum += topRowSum[y + winLens]; topSum += topRowSum[y + winLens];
topSumSq += topRowSumSq[y + winLens]; topSumSq += topRowSumSq[y + winLens];
...@@ -282,11 +274,7 @@ void EncReshape::calcSeqStats(Picture *pcPic, SeqInfo &stats) ...@@ -282,11 +274,7 @@ void EncReshape::calcSeqStats(Picture *pcPic, SeqInfo &stats)
for (bx = x1; bx <= x2; bx++) for (bx = x1; bx <= x2; bx++)
{ {
leftColSum[bx] += pWinY[bx]; leftColSum[bx] += pWinY[bx];
#if JVET_T0091_LMCS_ENC_OVERFLOW_FIX
leftColSumSq[bx] += (int64_t)pWinY[bx] * (int64_t)pWinY[bx]; leftColSumSq[bx] += (int64_t)pWinY[bx] * (int64_t)pWinY[bx];
#else
leftColSumSq[bx] += pWinY[bx] * pWinY[bx];
#endif
} }
pWinY += stride; pWinY += stride;
} }
...@@ -307,11 +295,7 @@ void EncReshape::calcSeqStats(Picture *pcPic, SeqInfo &stats) ...@@ -307,11 +295,7 @@ void EncReshape::calcSeqStats(Picture *pcPic, SeqInfo &stats)
for (by = y1; by <= y2; by++) for (by = y1; by <= y2; by++)
{ {
leftColSum[x + winLens] += pWinY[x + winLens]; leftColSum[x + winLens] += pWinY[x + winLens];
#if JVET_T0091_LMCS_ENC_OVERFLOW_FIX
leftColSumSq[x + winLens] += (int64_t)pWinY[x + winLens] * (int64_t)pWinY[x + winLens]; leftColSumSq[x + winLens] += (int64_t)pWinY[x + winLens] * (int64_t)pWinY[x + winLens];
#else
leftColSumSq[x + winLens] += pWinY[x + winLens] * pWinY[x + winLens];
#endif
pWinY += stride; pWinY += stride;
} }
} }
...@@ -324,22 +308,14 @@ void EncReshape::calcSeqStats(Picture *pcPic, SeqInfo &stats) ...@@ -324,22 +308,14 @@ void EncReshape::calcSeqStats(Picture *pcPic, SeqInfo &stats)
pWinY = &picY.buf[0]; pWinY = &picY.buf[0];
pWinY += winLens * stride; pWinY += winLens * stride;
leftColSum[x + winLens] += pWinY[x + winLens]; leftColSum[x + winLens] += pWinY[x + winLens];
#if JVET_T0091_LMCS_ENC_OVERFLOW_FIX
leftColSumSq[x + winLens] += (int64_t)pWinY[x + winLens] * (int64_t)pWinY[x + winLens]; leftColSumSq[x + winLens] += (int64_t)pWinY[x + winLens] * (int64_t)pWinY[x + winLens];
#else
leftColSumSq[x + winLens] += pWinY[x + winLens] * pWinY[x + winLens];
#endif
} }
if (y > winLens) if (y > winLens)
{ {
pWinY = &picY.buf[0]; pWinY = &picY.buf[0];
pWinY -= (winLens + 1) * stride; pWinY -= (winLens + 1) * stride;
leftColSum[x + winLens] -= pWinY[x + winLens]; leftColSum[x + winLens] -= pWinY[x + winLens];
#if JVET_T0091_LMCS_ENC_OVERFLOW_FIX
leftColSumSq[x + winLens] -= (int64_t)pWinY[x + winLens] * (int64_t)pWinY[x + winLens]; leftColSumSq[x + winLens] -= (int64_t)pWinY[x + winLens] * (int64_t)pWinY[x + winLens];
#else
leftColSumSq[x + winLens] -= pWinY[x + winLens] * pWinY[x + winLens];
#endif
} }
} }
topColSum[x + winLens] = leftColSum[x + winLens]; topColSum[x + winLens] = leftColSum[x + winLens];
...@@ -423,11 +399,7 @@ void EncReshape::calcSeqStats(Picture *pcPic, SeqInfo &stats) ...@@ -423,11 +399,7 @@ void EncReshape::calcSeqStats(Picture *pcPic, SeqInfo &stats)
for (int x = 0; x < width; x++) for (int x = 0; x < width; x++)
{ {
avgY += picY.buf[x]; avgY += picY.buf[x];
#if JVET_T0091_LMCS_ENC_OVERFLOW_FIX
varY += (double)picY.buf[x] * (double)picY.buf[x]; varY += (double)picY.buf[x] * (double)picY.buf[x];
#else
varY += picY.buf[x] * picY.buf[x];
#endif
} }
picY.buf += stride; picY.buf += stride;
} }
...@@ -449,13 +421,8 @@ void EncReshape::calcSeqStats(Picture *pcPic, SeqInfo &stats) ...@@ -449,13 +421,8 @@ void EncReshape::calcSeqStats(Picture *pcPic, SeqInfo &stats)
{ {
avgU += picU.buf[x]; avgU += picU.buf[x];
avgV += picV.buf[x]; avgV += picV.buf[x];
#if JVET_T0091_LMCS_ENC_OVERFLOW_FIX
varU += (int64_t)picU.buf[x] * (int64_t)picU.buf[x]; varU += (int64_t)picU.buf[x] * (int64_t)picU.buf[x];
varV += (int64_t)picV.buf[x] * (int64_t)picV.buf[x]; varV += (int64_t)picV.buf[x] * (int64_t)picV.buf[x];
#else
varU += picU.buf[x] * picU.buf[x];
varV += picV.buf[x] * picV.buf[x];
#endif
} }
picU.buf += strideC; picU.buf += strideC;
picV.buf += strideC; picV.buf += strideC;
......
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