[x265] [PATCH 1 of 2] TComPic: add m_qpAqOffset to store qp offsets per CU when Aq is enabled

aarthi at multicorewareinc.com aarthi at multicorewareinc.com
Wed Oct 16 19:55:08 CEST 2013


# HG changeset patch
# User Aarthi Thirumalai<aarthi at multicorewareinc.com>
# Date 1381945688 -19800
#      Wed Oct 16 23:18:08 2013 +0530
# Node ID 46cdbe43d903c23169593f70c28b5d32d8f397e9
# Parent  4b1716b232e56399cdc11abf5abb3c0b37d1c9ee
TComPic: add m_qpAqOffset to store qp offsets per CU when Aq is enabled

diff -r 4b1716b232e5 -r 46cdbe43d903 source/Lib/TLibCommon/TComPic.cpp
--- a/source/Lib/TLibCommon/TComPic.cpp	Wed Oct 16 02:35:57 2013 -0500
+++ b/source/Lib/TLibCommon/TComPic.cpp	Wed Oct 16 23:18:08 2013 +0530
@@ -61,6 +61,7 @@
     memset(&m_lowres, 0, sizeof(m_lowres));
     m_next = NULL;
     m_prev = NULL;
+    m_qpAqOffset = NULL;
     m_SSDY = 0;
     m_SSDU = 0;
     m_SSDV = 0;
@@ -114,6 +115,7 @@
     }
 
     m_lowres.destroy(bframes);
+    X265_FREE(m_qpAqOffset);
 }
 
 //! \}
diff -r 4b1716b232e5 -r 46cdbe43d903 source/Lib/TLibCommon/TComPic.h
--- a/source/Lib/TLibCommon/TComPic.h	Wed Oct 16 02:35:57 2013 -0500
+++ b/source/Lib/TLibCommon/TComPic.h	Wed Oct 16 23:18:08 2013 +0530
@@ -84,7 +84,7 @@
 
     TComPic*              m_next;
     TComPic*              m_prev;
-
+    double*               m_qpAqOffset;         // store qp offsets for AQ
     UInt64                m_SSDY;
     UInt64                m_SSDU;
     UInt64                m_SSDV;
diff -r 4b1716b232e5 -r 46cdbe43d903 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Wed Oct 16 02:35:57 2013 -0500
+++ b/source/encoder/encoder.cpp	Wed Oct 16 23:18:08 2013 +0530
@@ -174,6 +174,11 @@
                 // NOTE: the SAO pointer from m_frameEncoder for read m_maxSplitLevel, etc, we can remove it later
                 pic->getPicSym()->allocSaoParam(m_frameEncoder->getSAO());
             }
+
+            if (param.rc.aqMode)
+            {
+                CHECKED_MALLOC(pic->m_qpAqOffset, double, pic->getPicSym()->getNumberOfCUsInFrame());
+            }
         }
         else
             pic = m_freeList.popBack();
@@ -277,6 +282,8 @@
     }
 
     return ret;
+fail:
+    return 0;
 }
 
 double Encoder::printSummary()


More information about the x265-devel mailing list