[x265] [PATCH 05 of 14] entropy: fix SAO enable detection (refs #80)

Steve Borho steve at borho.org
Sat Sep 20 18:46:04 CEST 2014


# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1411228349 -3600
#      Sat Sep 20 16:52:29 2014 +0100
# Node ID b3c73568b1836f34de4abb06ffff0176f5e223e4
# Parent  40252e734c76a865f938e9c01933f508fcfa6b70
entropy: fix SAO enable detection (refs #80)

Apparently our analysis never toggles luma separately from chroma because this
bug has not resulted in any bad bitstreams, that I know of. This bug was found
via static analysis

diff -r 40252e734c76 -r b3c73568b183 source/encoder/entropy.cpp
--- a/source/encoder/entropy.cpp	Sat Sep 20 16:51:07 2014 +0100
+++ b/source/encoder/entropy.cpp	Sat Sep 20 16:52:29 2014 +0100
@@ -434,7 +434,7 @@
     int code = slice->m_sliceQp - 26;
     WRITE_SVLC(code, "slice_qp_delta");
 
-    bool isSAOEnabled = slice->m_sps->bUseSAO ? saoParam->bSaoFlag[0] || saoParam->bSaoFlag[0] : false;
+    bool isSAOEnabled = slice->m_sps->bUseSAO ? saoParam->bSaoFlag[0] || saoParam->bSaoFlag[1] : false;
     bool isDBFEnabled = !slice->m_pps->bPicDisableDeblockingFilter;
 
     if (isSAOEnabled || isDBFEnabled)


More information about the x265-devel mailing list