[x265] [PATCH] fix every execute output different bitstream when SAO enabled
Min Chen
chenm003 at 163.com
Mon Jan 6 06:41:34 CET 2014
# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1388986878 -28800
# Node ID 99f28c405b5c04af137717ac55df373ef3c0969a
# Parent f96c85f03b77c2c5987ff4754cd69244a13f67b1
fix every execute output different bitstream when SAO enabled
diff -r f96c85f03b77 -r 99f28c405b5c source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp Fri Jan 03 12:22:38 2014 -0600
+++ b/source/encoder/frameencoder.cpp Mon Jan 06 13:41:18 2014 +0800
@@ -342,8 +342,6 @@
m_rows[row].m_rdCost.setLambda(lambda);
m_rows[row].m_rdCost.setCbDistortionWeight(cbWeight);
m_rows[row].m_rdCost.setCrDistortionWeight(crWeight);
- m_frameFilter.m_sao.lumaLambda = lambda;
- m_frameFilter.m_sao.chromaLambda = chromaLambda;
}
void FrameEncoder::compressFrame()
@@ -377,6 +375,10 @@
double crWeight = pow(2.0, (qp - g_chromaScale[qpc])); // takes into account of the chroma qp mapping and chroma qp Offset
double chromaLambda = lambda / crWeight;
+ // NOTE: set SAO lambda every Frame
+ m_frameFilter.m_sao.lumaLambda = lambda;
+ m_frameFilter.m_sao.chromaLambda = chromaLambda;
+
TComPicYuv *fenc = slice->getPic()->getPicYuvOrg();
for (int i = 0; i < m_numRows; i++)
{
More information about the x265-devel
mailing list