[x265-commits] [x265] encoder: avoid int64_t to int conversions, avoid more MSV...

Steve Borho steve at borho.org
Thu Jul 3 08:20:34 CEST 2014


details:   http://hg.videolan.org/x265/rev/50291ad2cfe8
branches:  
changeset: 7232:50291ad2cfe8
user:      Steve Borho <steve at borho.org>
date:      Thu Jul 03 01:18:58 2014 -0500
description:
encoder: avoid int64_t to int conversions, avoid more MSVC warnings
Subject: [x265] y4m: avoid implicit size_t to int conversion, avoid more MSVC warnings

details:   http://hg.videolan.org/x265/rev/1dc27824bde1
branches:  
changeset: 7233:1dc27824bde1
user:      Steve Borho <steve at borho.org>
date:      Thu Jul 03 01:20:11 2014 -0500
description:
y4m: avoid implicit size_t to int conversion, avoid more MSVC warnings

diffstat:

 source/encoder/encoder.h        |  2 +-
 source/encoder/frameencoder.cpp |  2 +-
 source/input/y4m.cpp            |  2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diffs (43 lines):

diff -r e8ebfa3cf395 -r 1dc27824bde1 source/encoder/encoder.h
--- a/source/encoder/encoder.h	Thu Jul 03 01:00:38 2014 -0500
+++ b/source/encoder/encoder.h	Thu Jul 03 01:20:11 2014 -0500
@@ -73,6 +73,7 @@ private:
 
     bool               m_aborted;          // fatal error detected
     int                m_pocLast;          ///< time index (POC)
+    int                m_encodedFrameNum;
     int                m_outputCount;
 
     int                m_bframeDelay;
@@ -142,7 +143,6 @@ public:
     int                m_maxCuDQPDepth;    //  Max. depth for a minimum CuDQP (0:default)
 
     //====== Tool list ========
-    int64_t            m_encodedFrameNum;
     int                m_lastBPSEI;
 
     uint32_t           m_log2ParallelMergeLevelMinus2; ///< Parallel merge estimation region
diff -r e8ebfa3cf395 -r 1dc27824bde1 source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp	Thu Jul 03 01:00:38 2014 -0500
+++ b/source/encoder/frameencoder.cpp	Thu Jul 03 01:20:11 2014 -0500
@@ -324,7 +324,7 @@ void FrameEncoder::compressFrame()
     int64_t      startCompressTime = x265_mdate();
     TEncEntropy* entropyCoder      = getEntropyCoder(0);
     TComSlice*   slice             = m_frame->getSlice();
-    int          totalCoded        = (int)m_top->m_encodedFrameNum - 1;
+    int          totalCoded        = m_rce.encodeOrder;
 
     entropyCoder->setEntropyCoder(&m_sbacCoder, NULL);
 
diff -r e8ebfa3cf395 -r 1dc27824bde1 source/input/y4m.cpp
--- a/source/input/y4m.cpp	Thu Jul 03 01:00:38 2014 -0500
+++ b/source/input/y4m.cpp	Thu Jul 03 01:20:11 2014 -0500
@@ -110,7 +110,7 @@ Y4MInput::Y4MInput(InputFileInfo& info)
     info.depth = depth;
     info.frameCount = -1;
 
-    int estFrameSize = framesize + strlen(header) + 1; /* assume basic FRAME\n headers */
+    size_t estFrameSize = framesize + strlen(header) + 1; /* assume basic FRAME\n headers */
 
     /* try to estimate frame count, if this is not stdin */
     if (ifs != &cin)


More information about the x265-commits mailing list