[x265] [PATCH] compress: resetting CABAC contexts in lower rdLevels

deepthi at multicorewareinc.com deepthi at multicorewareinc.com
Wed Jul 9 13:16:06 CEST 2014


# HG changeset patch
# User Deepthi Nandakumar <deepthi at multicorewareinc.com>
# Date 1404904548 -19800
#      Wed Jul 09 16:45:48 2014 +0530
# Node ID faf9c816d7ef28d1217a2919d646caf4c68265da
# Parent  644773b8532929a30f910fd269f521e44621f2f7
compress: resetting CABAC contexts in lower rdLevels.

diff -r 644773b85329 -r faf9c816d7ef source/encoder/compress.cpp
--- a/source/encoder/compress.cpp	Wed Jul 09 13:55:42 2014 +0530
+++ b/source/encoder/compress.cpp	Wed Jul 09 16:45:48 2014 +0530
@@ -330,6 +330,7 @@
                 yuv = yuvReconBest;
                 yuvReconBest = m_tmpRecoYuv[depth];
                 m_tmpRecoYuv[depth] = yuv;
+                m_rdSbacCoders[depth][CI_TEMP_BEST]->store(m_rdSbacCoders[depth][CI_NEXT_BEST]);
             }
 
             //Encode with residue
@@ -346,6 +347,7 @@
                 yuv = yuvReconBest;
                 yuvReconBest = m_tmpRecoYuv[depth];
                 m_tmpRecoYuv[depth] = yuv;
+                m_rdSbacCoders[depth][CI_TEMP_BEST]->store(m_rdSbacCoders[depth][CI_NEXT_BEST]);
             }
         }
     }
@@ -514,6 +516,10 @@
                         m_bestRecoYuv[depth] = m_bestMergeRecoYuv[depth];
                         m_bestMergeRecoYuv[depth] = tempYuv;
                     }
+                    else
+                    {
+                        m_rdSbacCoders[depth][CI_TEMP_BEST]->store(m_rdSbacCoders[depth][CI_NEXT_BEST]);
+                    }
                 }
 
                 /* Check for Intra in inter frames only if its a P-slice*/


More information about the x265-devel mailing list