[x265] [PATCH] tenccfg : removed unused setpad() and getpad() methods

Gopu Govindaswamy gopu at multicorewareinc.com
Mon Oct 21 10:53:07 CEST 2013


# HG changeset patch
# User Gopu Govindaswamy <gopu at multicorewareinc.com>
# Date 1382345569 -19800
# Node ID 6c0df3f74cc7c3d2dcff2e022609531d5d569b15
# Parent  7171863830432dbdbfaab8e9803a7526c3500088
tenccfg : removed unused setpad() and getpad() methods

diff -r 717186383043 -r 6c0df3f74cc7 source/Lib/TLibEncoder/TEncCfg.h
--- a/source/Lib/TLibEncoder/TEncCfg.h	Mon Oct 21 14:12:11 2013 +0530
+++ b/source/Lib/TLibEncoder/TEncCfg.h	Mon Oct 21 14:22:49 2013 +0530
@@ -72,7 +72,6 @@
     bool      m_interlacedSourceFlag;
     bool      m_nonPackedConstraintFlag;
     bool      m_frameOnlyConstraintFlag;
-    int       m_pad[2];
 
     //====== Coding Structure ========
     int       m_maxDecPicBuffering[MAX_TLAYER];
@@ -158,6 +157,8 @@
     /* copy of parameters used to create encoder */
     x265_param_t param;
 
+    int       m_pad[2];
+
     TEncCfg()
     {}
 
@@ -168,10 +169,6 @@
 
     Window &getConformanceWindow() { return m_conformanceWindow; }
 
-    void setPad(int* iPad) { for (int i = 0; i < 2; i++) { m_pad[i] = iPad[i]; } }
-
-    int getPad(int i) { assert(i < 2); return m_pad[i]; }
-
     //====== Coding Structure ========
 
     int getMaxRefPicNum() { return m_maxRefPicNum; }
diff -r 717186383043 -r 6c0df3f74cc7 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Mon Oct 21 14:12:11 2013 +0530
+++ b/source/encoder/encoder.cpp	Mon Oct 21 14:22:49 2013 +0530
@@ -401,8 +401,8 @@
     TComPicYuv* recon = pic->getPicYuvRec();
 
     //===== calculate PSNR =====
-    int width  = recon->getWidth() - getPad(0);
-    int height = recon->getHeight() - getPad(1);
+    int width  = recon->getWidth() - m_pad[0];
+    int height = recon->getHeight() - m_pad[1];
     int size = width * height;
 
     int maxvalY = 255 << (X265_DEPTH - 8);
diff -r 717186383043 -r 6c0df3f74cc7 source/encoder/framefilter.cpp
--- a/source/encoder/framefilter.cpp	Mon Oct 21 14:12:11 2013 +0530
+++ b/source/encoder/framefilter.cpp	Mon Oct 21 14:22:49 2013 +0530
@@ -406,7 +406,7 @@
     //===== calculate PSNR =====
     int stride = recon->getStride();
 
-    int width  = recon->getWidth() - m_cfg->getPad(0);
+    int width  = recon->getWidth() - m_cfg->m_pad[0];
     int height;
 
     if (row == m_numRows - 1)


More information about the x265-devel mailing list