[x265] [PATCH] pps: remove last slice qp from pps qp calculation
Divya Manivannan
divya at multicorewareinc.com
Tue Jan 24 14:47:10 CET 2017
# HG changeset patch
# User Divya Manivannan <divya at multicorewareinc.com>
# Date 1485264553 -19800
# Tue Jan 24 18:59:13 2017 +0530
# Node ID b84d8a38de9c8f213a1392d578f60bd946edd046
# Parent 58dddcf01b7dbfd6aaa6858b5218e6166afe4def
pps: remove last slice qp from pps qp calculation
diff -r 58dddcf01b7d -r b84d8a38de9c source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp Mon Jan 23 09:50:33 2017 +0530
+++ b/source/encoder/encoder.cpp Tue Jan 24 18:59:13 2017 +0530
@@ -78,7 +78,6 @@
m_offsetEmergency = NULL;
m_iFrameNum = 0;
m_iPPSQpMinus26 = 0;
- m_iLastSliceQp = 0;
m_rpsInSpsCount = 0;
for (int i = 0; i < X265_MAX_FRAME_THREADS; i++)
m_frameEncoder[i] = NULL;
@@ -1008,7 +1007,7 @@
/* If last slice Qp is close to (26 + m_iPPSQpMinus26) or outputs is all I-frame video,
we don't need to change m_iPPSQpMinus26. */
- if ((abs(m_iLastSliceQp - (26 + m_iPPSQpMinus26)) > 1) && (m_iFrameNum > 1))
+ if (m_iFrameNum > 1)
m_iPPSQpMinus26 = (iLeastId + 1) - 26;
m_iFrameNum = 0;
}
diff -r 58dddcf01b7d -r b84d8a38de9c source/encoder/encoder.h
--- a/source/encoder/encoder.h Mon Jan 23 09:50:33 2017 +0530
+++ b/source/encoder/encoder.h Tue Jan 24 18:59:13 2017 +0530
@@ -162,7 +162,6 @@
Lock m_sliceQpLock;
int m_iFrameNum;
int m_iPPSQpMinus26;
- int m_iLastSliceQp;
int64_t m_iBitsCostSum[QP_MAX_MAX + 1];
Lock m_sliceRefIdxLock;
diff -r 58dddcf01b7d -r b84d8a38de9c source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp Mon Jan 23 09:50:33 2017 +0530
+++ b/source/encoder/frameencoder.cpp Tue Jan 24 18:59:13 2017 +0530
@@ -494,7 +494,6 @@
m_top->m_iBitsCostSum[i] += codeLength;
}
m_top->m_iFrameNum++;
- m_top->m_iLastSliceQp = slice->m_sliceQp;
}
m_initSliceContext.resetEntropy(*slice);
More information about the x265-devel
mailing list