[x265] [PATCH] framefilter: comment cleanups, use pixel data type

Steve Borho steve at borho.org
Fri Sep 13 08:29:05 CEST 2013


# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1379053732 18000
#      Fri Sep 13 01:28:52 2013 -0500
# Node ID 42faf1cb4d7b1cf6b0323fa4abc82a31c8eed270
# Parent  17d41a7563aaa090b47377dac317437d7733844a
framefilter: comment cleanups, use pixel data type

diff -r 17d41a7563aa -r 42faf1cb4d7b source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp	Thu Sep 12 16:49:29 2013 +0100
+++ b/source/encoder/frameencoder.cpp	Fri Sep 13 01:28:52 2013 -0500
@@ -937,14 +937,13 @@
             return;
         }
     }
+    // this row of CTUs has been encoded
 
-    // Active Loopfilter
+    // Run row-wise loop filters
     if (row >= m_filterRowDelay)
     {
         m_frameFilter.processRow(row - m_filterRowDelay);
     }
-
-    // this row of CTUs has been encoded
     if (row == m_numRows - 1)
     {
         for(int i = m_numRows - m_filterRowDelay; i < m_numRows; i++)
diff -r 17d41a7563aa -r 42faf1cb4d7b source/encoder/framefilter.cpp
--- a/source/encoder/framefilter.cpp	Thu Sep 12 16:49:29 2013 +0100
+++ b/source/encoder/framefilter.cpp	Fri Sep 13 01:28:52 2013 -0500
@@ -170,7 +170,7 @@
                 m_sao.processSaoUnitRow(saoParam->saoLcuParam[2], row - 1, 2);
             }
 
-            // TODO: this code is NOT VERIFY because TransformSkip and PCM mode have some bugs, they always not active!
+            // TODO: this code is NOT VERIFY because TransformSkip and PCM modes have some bugs, they are never enabled
             bool  bPCMFilter = (m_pic->getSlice()->getSPS()->getUsePCM() && m_pic->getSlice()->getSPS()->getPCMFilterDisableFlag()) ? true : false;
             if (bPCMFilter || m_pic->getSlice()->getPPS()->getTransquantBypassEnableFlag())
             {
@@ -187,8 +187,6 @@
 
     // this row of CTUs has been encoded
 
-    // TODO: extend margins for motion reference
-
     if (row > 0)
     {
         processRowPost(row - 1);
@@ -209,7 +207,7 @@
             m_sao.processSaoUnitRow(saoParam->saoLcuParam[2], row, 2);
         }
 
-        // TODO: this code is NOT VERIFY because TransformSkip and PCM mode have some bugs, they always not active!
+        // TODO: this code is NOT VERIFY because TransformSkip and PCM modes have some bugs, they are never enabled
         bool  bPCMFilter = (m_pic->getSlice()->getSPS()->getUsePCM() && m_pic->getSlice()->getSPS()->getPCMFilterDisableFlag()) ? true : false;
         if (bPCMFilter || m_pic->getSlice()->getPPS()->getTransquantBypassEnableFlag())
         {
@@ -228,18 +226,12 @@
 
 void FrameFilter::processRowPost(int row)
 {
-    PPAScopeEvent(Thread_filterCU);
-
     const uint32_t numCols = m_pic->getPicSym()->getFrameWidthInCU();
     const uint32_t lineStartCUAddr = row * numCols;
     TComPicYuv *recon = m_pic->getPicYuvRec();
     const int lastH = ((recon->getHeight() % g_maxCUHeight) ? (recon->getHeight() % g_maxCUHeight) : g_maxCUHeight);
     const int realH = (row != m_numRows - 1) ? g_maxCUHeight : lastH;
 
-    // TODO: Remove when we confirm below code is right
-    //recon->xExtendPicCompBorder(recon->getLumaAddr(), recon->getStride(), recon->getWidth(), recon->getHeight(), recon->m_lumaMarginX, recon->m_lumaMarginY);
-    //recon->xExtendPicCompBorder(recon->getCbAddr(), recon->getCStride(), recon->getWidth() >> 1, recon->getHeight() >> 1, recon->m_chromaMarginX, recon->m_chromaMarginY);
-    //recon->xExtendPicCompBorder(recon->getCrAddr(), recon->getCStride(), recon->getWidth() >> 1, recon->getHeight() >> 1, recon->m_chromaMarginX, recon->m_chromaMarginY);
     // Border extend Left and Right
     primitives.extendRowBorder(recon->getLumaAddr(lineStartCUAddr), recon->getStride(), recon->getWidth(), realH, recon->getLumaMarginX());
     primitives.extendRowBorder(recon->getCbAddr(lineStartCUAddr), recon->getCStride(), recon->getWidth() >> 1, realH >> 1, recon->getChromaMarginX());
@@ -250,9 +242,9 @@
     {
         const intptr_t stride = recon->getStride();
         const intptr_t strideC = recon->getCStride();
-        Pel *pixY = recon->getLumaAddr(lineStartCUAddr) - recon->getLumaMarginX();
-        Pel *pixU = recon->getCbAddr(lineStartCUAddr) - recon->getChromaMarginX();
-        Pel *pixV = recon->getCrAddr(lineStartCUAddr) - recon->getChromaMarginX();
+        pixel *pixY = recon->getLumaAddr(lineStartCUAddr) - recon->getLumaMarginX();
+        pixel *pixU = recon->getCbAddr(lineStartCUAddr) - recon->getChromaMarginX();
+        pixel *pixV = recon->getCrAddr(lineStartCUAddr) - recon->getChromaMarginX();
 
         for (int y = 0; y < recon->getLumaMarginY(); y++)
         {
@@ -271,9 +263,9 @@
     {
         const intptr_t stride = recon->getStride();
         const intptr_t strideC = recon->getCStride();
-        Pel *pixY = recon->getLumaAddr(lineStartCUAddr) - recon->getLumaMarginX() + (realH - 1) * stride;
-        Pel *pixU = recon->getCbAddr(lineStartCUAddr) - recon->getChromaMarginX() + ((realH >> 1) - 1) * strideC;
-        Pel *pixV = recon->getCrAddr(lineStartCUAddr) - recon->getChromaMarginX() + ((realH >> 1) - 1) * strideC;
+        pixel *pixY = recon->getLumaAddr(lineStartCUAddr) - recon->getLumaMarginX() + (realH - 1) * stride;
+        pixel *pixU = recon->getCbAddr(lineStartCUAddr) - recon->getChromaMarginX() + ((realH >> 1) - 1) * strideC;
+        pixel *pixV = recon->getCrAddr(lineStartCUAddr) - recon->getChromaMarginX() + ((realH >> 1) - 1) * strideC;
 
         for (int y = 0; y < recon->getLumaMarginY(); y++)
         {


More information about the x265-devel mailing list