[x265-commits] [x265] slicetype: removed TComList(std::list) and used PicList t...

Gopu Govindaswamy gopu at multicorewareinc.com
Wed Oct 9 23:13:37 CEST 2013


details:   http://hg.videolan.org/x265/rev/497ef3556b12
branches:  
changeset: 4298:497ef3556b12
user:      Gopu Govindaswamy <gopu at multicorewareinc.com>
date:      Wed Oct 09 11:00:47 2013 +0530
description:
slicetype: removed TComList(std::list) and used PicList to store the TComPics
Subject: [x265] pull TEncTop code into Encoder class in encoder.cpp, encoder.h

details:   http://hg.videolan.org/x265/rev/47d92e8a8a41
branches:  
changeset: 4299:47d92e8a8a41
user:      Steve Borho <steve at borho.org>
date:      Wed Oct 09 00:52:30 2013 -0500
description:
pull TEncTop code into Encoder class in encoder.cpp, encoder.h

The TEncTop in our repo bears little resemblance to the original HM class, so I
think it is applicable to move this code into one of our files where it makes
the most sense.  Some methods were renamed to our naming style in the process.
Subject: [x265] pixel-sse3.cpp: Modified calcRecons4 function argument names. Removed hungarian prefixes.

details:   http://hg.videolan.org/x265/rev/87084e0f93f4
branches:  
changeset: 4300:87084e0f93f4
user:      Dnyaneshwar Gorade <dnyaneshwar at multicorewareinc.com>
date:      Wed Oct 09 12:18:52 2013 +0530
description:
pixel-sse3.cpp: Modified calcRecons4 function argument names. Removed hungarian prefixes.
Subject: [x265] pixel-sse3.cpp: Modified calcRecons8 function argument names. Removed hungarian prefixes.

details:   http://hg.videolan.org/x265/rev/a1a2233536d5
branches:  
changeset: 4301:a1a2233536d5
user:      Dnyaneshwar Gorade <dnyaneshwar at multicorewareinc.com>
date:      Wed Oct 09 12:26:17 2013 +0530
description:
pixel-sse3.cpp: Modified calcRecons8 function argument names. Removed hungarian prefixes.
Subject: [x265] pixel-sse3.cpp: Modified calcRecons function argument names. Removed hungarian prefixes.

details:   http://hg.videolan.org/x265/rev/9d534f295529
branches:  
changeset: 4302:9d534f295529
user:      Dnyaneshwar Gorade <dnyaneshwar at multicorewareinc.com>
date:      Wed Oct 09 12:31:10 2013 +0530
description:
pixel-sse3.cpp: Modified calcRecons function argument names. Removed hungarian prefixes.
Subject: [x265] pixel8.inc: Replace weightUnidirPixel vector class function with intrinsic.

details:   http://hg.videolan.org/x265/rev/9a20693c6ff2
branches:  
changeset: 4303:9a20693c6ff2
user:      Dnyaneshwar Gorade <dnyaneshwar at multicorewareinc.com>
date:      Wed Oct 09 14:14:20 2013 +0530
description:
pixel8.inc: Replace weightUnidirPixel vector class function with intrinsic.
Subject: [x265] sse.inc: Created comman macro PROCESS_SSE_SS4x1 for functions sse_ss4, sse_ss8, sse_ss16, sse_ss24, sse_ss32, sse_ss48, sse_ss64.

details:   http://hg.videolan.org/x265/rev/95da8fa18a2e
branches:  
changeset: 4304:95da8fa18a2e
user:      Dnyaneshwar Gorade <dnyaneshwar at multicorewareinc.com>
date:      Wed Oct 09 18:23:16 2013 +0530
description:
sse.inc: Created comman macro PROCESS_SSE_SS4x1 for functions sse_ss4, sse_ss8, sse_ss16, sse_ss24, sse_ss32, sse_ss48, sse_ss64.
Subject: [x265] pixel.inc: Modified sse_ss4 intrinsic function. Removed redundancy using comman macro PROCESS_SSE_SS4x1.

details:   http://hg.videolan.org/x265/rev/d1ca36034d9f
branches:  
changeset: 4305:d1ca36034d9f
user:      Dnyaneshwar Gorade <dnyaneshwar at multicorewareinc.com>
date:      Wed Oct 09 18:34:53 2013 +0530
description:
pixel.inc: Modified sse_ss4 intrinsic function. Removed redundancy using comman macro PROCESS_SSE_SS4x1.
Subject: [x265] sse.inc: Modified sse_ss8 intrinsic function. Removed redundancy using comman macro PROCESS_SSE_SS4x1.

details:   http://hg.videolan.org/x265/rev/1428dcddfa4d
branches:  
changeset: 4306:1428dcddfa4d
user:      Dnyaneshwar Gorade <dnyaneshwar at multicorewareinc.com>
date:      Wed Oct 09 18:41:19 2013 +0530
description:
sse.inc: Modified sse_ss8 intrinsic function. Removed redundancy using comman macro PROCESS_SSE_SS4x1.
Subject: [x265] sse.inc: Modified sse_ss12 intrinsic function. Removed redundancy using comman macro PROCESS_SSE_SS4x1.

details:   http://hg.videolan.org/x265/rev/3f5fe6d9a81d
branches:  
changeset: 4307:3f5fe6d9a81d
user:      Dnyaneshwar Gorade <dnyaneshwar at multicorewareinc.com>
date:      Wed Oct 09 18:46:12 2013 +0530
description:
sse.inc: Modified sse_ss12 intrinsic function. Removed redundancy using comman macro PROCESS_SSE_SS4x1.
Subject: [x265] sse.inc: Modified sse_ss16 intrinsic function. Removed redundancy using comman macro PROCESS_SSE_SS4x1.

details:   http://hg.videolan.org/x265/rev/aca490fa02d7
branches:  
changeset: 4308:aca490fa02d7
user:      Dnyaneshwar Gorade <dnyaneshwar at multicorewareinc.com>
date:      Wed Oct 09 18:51:33 2013 +0530
description:
sse.inc: Modified sse_ss16 intrinsic function. Removed redundancy using comman macro PROCESS_SSE_SS4x1.
Subject: [x265] sse.inc: Modified sse_ss24 intrinsic function. Removed redundancy using comman macro PROCESS_SSE_SS4x1.

details:   http://hg.videolan.org/x265/rev/9f1ec1c9cdb6
branches:  
changeset: 4309:9f1ec1c9cdb6
user:      Dnyaneshwar Gorade <dnyaneshwar at multicorewareinc.com>
date:      Wed Oct 09 18:53:52 2013 +0530
description:
sse.inc: Modified sse_ss24 intrinsic function. Removed redundancy using comman macro PROCESS_SSE_SS4x1.
Subject: [x265] sse.inc: Modified sse_ss32 intrinsic function. Removed redundancy using comman macro PROCESS_SSE_SS4x1.

details:   http://hg.videolan.org/x265/rev/363ff9b66afa
branches:  
changeset: 4310:363ff9b66afa
user:      Dnyaneshwar Gorade <dnyaneshwar at multicorewareinc.com>
date:      Wed Oct 09 18:56:02 2013 +0530
description:
sse.inc: Modified sse_ss32 intrinsic function. Removed redundancy using comman macro PROCESS_SSE_SS4x1.
Subject: [x265] sse.inc: Modified sse_ss48 intrinsic function. Removed redundancy using comman macro PROCESS_SSE_SS4x1.

details:   http://hg.videolan.org/x265/rev/50a2725a989d
branches:  
changeset: 4311:50a2725a989d
user:      Dnyaneshwar Gorade <dnyaneshwar at multicorewareinc.com>
date:      Wed Oct 09 18:57:52 2013 +0530
description:
sse.inc: Modified sse_ss48 intrinsic function. Removed redundancy using comman macro PROCESS_SSE_SS4x1.
Subject: [x265] sse.inc: Modified sse_ss64 intrinsic function. Removed redundancy using comman macro PROCESS_SSE_SS4x1.

details:   http://hg.videolan.org/x265/rev/756de900bae5
branches:  
changeset: 4312:756de900bae5
user:      Dnyaneshwar Gorade <dnyaneshwar at multicorewareinc.com>
date:      Wed Oct 09 18:59:32 2013 +0530
description:
sse.inc: Modified sse_ss64 intrinsic function. Removed redundancy using comman macro PROCESS_SSE_SS4x1.
Subject: [x265] pixel: replace sse_sp4 vector class with intrinsic

details:   http://hg.videolan.org/x265/rev/dc0bd9d959db
branches:  
changeset: 4313:dc0bd9d959db
user:      Yuvaraj Venkatesh <yuvaraj at multicorewareinc.com>
date:      Wed Oct 09 17:40:09 2013 +0530
description:
pixel: replace sse_sp4 vector class with intrinsic
Subject: [x265] pixel: replace sse_sp8 vector class with intrinsic

details:   http://hg.videolan.org/x265/rev/d9665d0ad277
branches:  
changeset: 4314:d9665d0ad277
user:      Yuvaraj Venkatesh <yuvaraj at multicorewareinc.com>
date:      Wed Oct 09 18:26:17 2013 +0530
description:
pixel: replace sse_sp8 vector class with intrinsic
Subject: [x265] pixel: replace sse_sp12 vector class with intrinsic

details:   http://hg.videolan.org/x265/rev/e828f98d388a
branches:  
changeset: 4315:e828f98d388a
user:      Yuvaraj Venkatesh <yuvaraj at multicorewareinc.com>
date:      Wed Oct 09 19:02:02 2013 +0530
description:
pixel: replace sse_sp12 vector class with intrinsic
Subject: [x265] pixel: Replace weightUnidir vector class function with intrinsic.

details:   http://hg.videolan.org/x265/rev/408ca7050bc7
branches:  
changeset: 4316:408ca7050bc7
user:      Yuvaraj Venkatesh <yuvaraj at multicorewareinc.com>
date:      Wed Oct 09 16:10:30 2013 +0530
description:
pixel: Replace weightUnidir vector class function with intrinsic.
Subject: [x265] pixel: fixup GCC builds, remove pixel8.inc and pixel.inc

details:   http://hg.videolan.org/x265/rev/271b02645979
branches:  
changeset: 4317:271b02645979
user:      Steve Borho <steve at borho.org>
date:      Wed Oct 09 11:54:35 2013 -0500
description:
pixel: fixup GCC builds, remove pixel8.inc and pixel.inc
Subject: [x265] Enabling weight prediction for half and full pel

details:   http://hg.videolan.org/x265/rev/b44fccc8e6ea
branches:  
changeset: 4318:b44fccc8e6ea
user:      Shazeb Nawaz Khan <shazeb at multicorewareinc.com>
date:      Wed Oct 09 13:23:44 2013 +0530
description:
Enabling weight prediction for half and full pel
Subject: [x265] dpb and TComSlice: replaced TComList with PicList

details:   http://hg.videolan.org/x265/rev/85c733f8a057
branches:  
changeset: 4319:85c733f8a057
user:      Gopu Govindaswamy <gopu at multicorewareinc.com>
date:      Wed Oct 09 16:20:15 2013 +0530
description:
dpb and TComSlice: replaced TComList with PicList
Subject: [x265] TLibCommon: Removed unused TComList

details:   http://hg.videolan.org/x265/rev/fd1d967972d0
branches:  
changeset: 4320:fd1d967972d0
user:      Gopu Govindaswamy <gopu at multicorewareinc.com>
date:      Wed Oct 09 16:37:18 2013 +0530
description:
TLibCommon: Removed unused TComList
Subject: [x265] TComSlice: remove unused ParameterSetMap and #include<map>

details:   http://hg.videolan.org/x265/rev/5a50663968f5
branches:  
changeset: 4321:5a50663968f5
user:      Steve Borho <steve at borho.org>
date:      Wed Oct 09 12:23:50 2013 -0500
description:
TComSlice: remove unused ParameterSetMap and #include<map>
Subject: [x265] TEncSBac: remove unused #include <map>

details:   http://hg.videolan.org/x265/rev/64b58c78dd68
branches:  
changeset: 4322:64b58c78dd68
user:      Steve Borho <steve at borho.org>
date:      Wed Oct 09 12:24:49 2013 -0500
description:
TEncSBac: remove unused #include <map>
Subject: [x265] remove a pile of unused STL includes, reorder includes for clarity

details:   http://hg.videolan.org/x265/rev/7c15a193cef9
branches:  
changeset: 4323:7c15a193cef9
user:      Steve Borho <steve at borho.org>
date:      Wed Oct 09 12:29:44 2013 -0500
description:
remove a pile of unused STL includes, reorder includes for clarity
Subject: [x265] cli: remove "using namespace std"

details:   http://hg.videolan.org/x265/rev/ddb9d884df8d
branches:  
changeset: 4324:ddb9d884df8d
user:      Steve Borho <steve at borho.org>
date:      Wed Oct 09 12:32:04 2013 -0500
description:
cli: remove "using namespace std"
Subject: [x265] remove unused unittest class (is not even compiled today)

details:   http://hg.videolan.org/x265/rev/882d6a2b329e
branches:  
changeset: 4325:882d6a2b329e
user:      Steve Borho <steve at borho.org>
date:      Wed Oct 09 12:33:24 2013 -0500
description:
remove unused unittest class (is not even compiled today)
Subject: [x265] NALwrite: remove "using namespace std"

details:   http://hg.videolan.org/x265/rev/05b6f86ebda6
branches:  
changeset: 4326:05b6f86ebda6
user:      Steve Borho <steve at borho.org>
date:      Wed Oct 09 12:35:03 2013 -0500
description:
NALwrite: remove "using namespace std"
Subject: [x265] ContextModel: replace <algorithm> with X265_MIN, X265_MAX

details:   http://hg.videolan.org/x265/rev/8cd4c7e800ed
branches:  
changeset: 4327:8cd4c7e800ed
user:      Steve Borho <steve at borho.org>
date:      Wed Oct 09 12:37:02 2013 -0500
description:
ContextModel: replace <algorithm> with X265_MIN, X265_MAX
Subject: [x265] TEncCu: replace <algorithm> with X265_MIN, X265_MAX

details:   http://hg.videolan.org/x265/rev/50d55737f6b0
branches:  
changeset: 4328:50d55737f6b0
user:      Steve Borho <steve at borho.org>
date:      Wed Oct 09 12:39:56 2013 -0500
description:
TEncCu: replace <algorithm> with X265_MIN, X265_MAX
Subject: [x265] remove more <algorithm> includes

details:   http://hg.videolan.org/x265/rev/e4369bb24ad7
branches:  
changeset: 4329:e4369bb24ad7
user:      Steve Borho <steve at borho.org>
date:      Wed Oct 09 13:21:39 2013 -0500
description:
remove more <algorithm> includes
Subject: [x265] no-rdo(early exit): update the memory with info from m_interCU_NxN

details:   http://hg.videolan.org/x265/rev/bd3f43f06dd4
branches:  
changeset: 4330:bd3f43f06dd4
user:      Sumalatha Polureddy
date:      Wed Oct 09 16:16:15 2013 +0530
description:
no-rdo(early exit): update the memory with info from m_interCU_NxN

The encoding and prediction details which are updated in the m_interCU_NxN in
NxN calculation are updated in the m_tempCU
Subject: [x265] TComSlice: linux build fix, include <cstring> for memcpy

details:   http://hg.videolan.org/x265/rev/80af6aaa16e2
branches:  
changeset: 4331:80af6aaa16e2
user:      Steve Borho <steve at borho.org>
date:      Wed Oct 09 14:33:04 2013 -0500
description:
TComSlice: linux build fix, include <cstring> for memcpy
Subject: [x265] cmake: add -ffast-math to GCC compile flags

details:   http://hg.videolan.org/x265/rev/4710e2b5e134
branches:  
changeset: 4332:4710e2b5e134
user:      Steve Borho <steve at borho.org>
date:      Wed Oct 09 15:54:54 2013 -0500
description:
cmake: add -ffast-math to GCC compile flags
Subject: [x265] cmake: bump minimum required version to 2.8.8

details:   http://hg.videolan.org/x265/rev/5dceef85c58c
branches:  
changeset: 4333:5dceef85c58c
user:      Steve Borho <steve at borho.org>
date:      Wed Oct 09 15:57:24 2013 -0500
description:
cmake: bump minimum required version to 2.8.8

diffstat:

 source/CMakeLists.txt                   |     4 +-
 source/Lib/TLibCommon/ContextModel.cpp  |     6 +-
 source/Lib/TLibCommon/NAL.h             |     1 -
 source/Lib/TLibCommon/SEI.h             |     2 -
 source/Lib/TLibCommon/TComBitStream.cpp |     7 +-
 source/Lib/TLibCommon/TComBitStream.h   |     4 +-
 source/Lib/TLibCommon/TComDataCU.h      |     5 +-
 source/Lib/TLibCommon/TComList.h        |   117 ---
 source/Lib/TLibCommon/TComSlice.cpp     |   110 +--
 source/Lib/TLibCommon/TComSlice.h       |   125 +---
 source/Lib/TLibEncoder/NALwrite.cpp     |     8 +-
 source/Lib/TLibEncoder/TEncCavlc.h      |     2 -
 source/Lib/TLibEncoder/TEncCu.cpp       |    14 +-
 source/Lib/TLibEncoder/TEncCu.h         |     4 +-
 source/Lib/TLibEncoder/TEncSbac.cpp     |     3 -
 source/Lib/TLibEncoder/TEncSbac.h       |     2 -
 source/Lib/TLibEncoder/TEncTop.cpp      |   863 ------------------------
 source/Lib/TLibEncoder/TEncTop.h        |   124 ---
 source/common/CMakeLists.txt            |     1 -
 source/common/reference.cpp             |    17 +-
 source/common/reference.h               |     3 +-
 source/common/vec/dct-ssse3.cpp         |     8 +-
 source/common/vec/pixel-sse3.cpp        |   154 +++-
 source/common/vec/pixel-sse41.cpp       |    99 ++-
 source/common/vec/pixel.inc             |   100 --
 source/common/vec/pixel8.inc            |    85 --
 source/common/vec/sse.inc               |   489 +++++--------
 source/encoder/CMakeLists.txt           |     5 +-
 source/encoder/bitcost.cpp              |     1 -
 source/encoder/compress.cpp             |     1 +
 source/encoder/cturow.cpp               |     4 +-
 source/encoder/cturow.h                 |     4 +-
 source/encoder/dpb.cpp                  |    73 +-
 source/encoder/dpb.h                    |     6 +-
 source/encoder/encoder.cpp              |  1080 ++++++++++++++++++++++++++----
 source/encoder/encoder.h                |   112 +++
 source/encoder/frameencoder.cpp         |    18 +-
 source/encoder/frameencoder.h           |     6 +-
 source/encoder/framefilter.cpp          |     4 +-
 source/encoder/framefilter.h            |     4 +-
 source/encoder/motion.cpp               |    76 +-
 source/encoder/motion.h                 |     3 +-
 source/encoder/slicetype.cpp            |    25 +-
 source/encoder/slicetype.h              |     6 +-
 source/test/unittest.cpp                |   262 -------
 source/test/unittest.h                  |    59 -
 source/x265.cpp                         |     7 +-
 47 files changed, 1610 insertions(+), 2503 deletions(-)

diffs (truncated from 5263 to 300 lines):

diff -r fc7fbdd18bc0 -r 5dceef85c58c source/CMakeLists.txt
--- a/source/CMakeLists.txt	Wed Oct 09 00:00:10 2013 -0500
+++ b/source/CMakeLists.txt	Wed Oct 09 15:57:24 2013 -0500
@@ -6,7 +6,7 @@ if(NOT CMAKE_BUILD_TYPE)
 endif()
 
 project (x265)
-cmake_minimum_required (VERSION 2.8)
+cmake_minimum_required (VERSION 2.8.8) # OBJECT libraries require 2.8.8
 
 SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}")
 
@@ -47,7 +47,7 @@ if("$ENV{CXX}" STREQUAL "icpc")
 elseif(CMAKE_COMPILER_IS_GNUCXX)
     execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
     set(GCC 1)
-    add_definitions(-Wall -Wextra -Wshadow -mstackrealign)
+    add_definitions(-Wall -Wextra -Wshadow -mstackrealign -ffast-math)
     if(NOT GCC_VERSION VERSION_LESS 4.7)
         # this is necessary to avoid name conflicts in vector class
         # library.  if vector classes are removed/replaced this can
diff -r fc7fbdd18bc0 -r 5dceef85c58c source/Lib/TLibCommon/ContextModel.cpp
--- a/source/Lib/TLibCommon/ContextModel.cpp	Wed Oct 09 00:00:10 2013 -0500
+++ b/source/Lib/TLibCommon/ContextModel.cpp	Wed Oct 09 15:57:24 2013 -0500
@@ -37,10 +37,8 @@
 
 #include "ContextModel.h"
 #include "TComRom.h"
+#include "common.h"
 
-#include <algorithm>
-
-using namespace std;
 using namespace x265;
 
 //! \ingroup TLibCommon
@@ -62,7 +60,7 @@ void ContextModel::init(int qp, int init
 
     int  slope      = (initValue >> 4) * 5 - 45;
     int  offset     = ((initValue & 15) << 3) - 16;
-    int  initState  =  min(max(1, (((slope * qp) >> 4) + offset)), 126);
+    int  initState  =  X265_MIN(X265_MAX(1, (((slope * qp) >> 4) + offset)), 126);
     UInt mpState    = (initState >= 64);
     m_state       = ((mpState ? (initState - 64) : (63 - initState)) << 1) + mpState;
 }
diff -r fc7fbdd18bc0 -r 5dceef85c58c source/Lib/TLibCommon/NAL.h
--- a/source/Lib/TLibCommon/NAL.h	Wed Oct 09 00:00:10 2013 -0500
+++ b/source/Lib/TLibCommon/NAL.h	Wed Oct 09 15:57:24 2013 -0500
@@ -36,7 +36,6 @@
 
 #include "CommonDef.h"
 #include "x265.h"
-#include <vector>
 #include <sstream>
 
 namespace x265 {
diff -r fc7fbdd18bc0 -r 5dceef85c58c source/Lib/TLibCommon/SEI.h
--- a/source/Lib/TLibCommon/SEI.h	Wed Oct 09 00:00:10 2013 -0500
+++ b/source/Lib/TLibCommon/SEI.h	Wed Oct 09 15:57:24 2013 -0500
@@ -34,8 +34,6 @@
 #ifndef X265_SEI_H
 #define X265_SEI_H
 
-#include <list>
-#include <vector>
 #include <cstring>
 
 namespace x265 {
diff -r fc7fbdd18bc0 -r 5dceef85c58c source/Lib/TLibCommon/TComBitStream.cpp
--- a/source/Lib/TLibCommon/TComBitStream.cpp	Wed Oct 09 00:00:10 2013 -0500
+++ b/source/Lib/TLibCommon/TComBitStream.cpp	Wed Oct 09 15:57:24 2013 -0500
@@ -35,14 +35,13 @@
     \brief    class for handling bitstream
 */
 
+#include "TComBitStream.h"
+#include "common.h"
+
 #include <stdint.h>
-#include <vector>
-#include "TComBitStream.h"
 #include <string.h>
 #include <memory.h>
-#include "common.h"
 
-using namespace std;
 using namespace x265;
 
 //! \ingroup TLibCommon
diff -r fc7fbdd18bc0 -r 5dceef85c58c source/Lib/TLibCommon/TComBitStream.h
--- a/source/Lib/TLibCommon/TComBitStream.h	Wed Oct 09 00:00:10 2013 -0500
+++ b/source/Lib/TLibCommon/TComBitStream.h	Wed Oct 09 15:57:24 2013 -0500
@@ -38,11 +38,11 @@
 #ifndef X265_COMBITSTREAM_H
 #define X265_COMBITSTREAM_H
 
+#include "CommonDef.h"
+
 #include <stdint.h>
-#include <vector>
 #include <stdio.h>
 #include <assert.h>
-#include "CommonDef.h"
 
 //! \ingroup TLibCommon
 //! \{
diff -r fc7fbdd18bc0 -r 5dceef85c58c source/Lib/TLibCommon/TComDataCU.h
--- a/source/Lib/TLibCommon/TComDataCU.h	Wed Oct 09 00:00:10 2013 -0500
+++ b/source/Lib/TLibCommon/TComDataCU.h	Wed Oct 09 15:57:24 2013 -0500
@@ -39,17 +39,14 @@
 #ifndef X265_TCOMDATACU_H
 #define X265_TCOMDATACU_H
 
-#include <assert.h>
-
-// Include files
 #include "CommonDef.h"
 #include "TComMotionInfo.h"
 #include "TComSlice.h"
 #include "TComRdCost.h"
 #include "TComPattern.h"
 
+#include <assert.h>
 #include <algorithm>
-#include <vector>
 
 namespace x265 {
 // private namespace
diff -r fc7fbdd18bc0 -r 5dceef85c58c source/Lib/TLibCommon/TComList.h
--- a/source/Lib/TLibCommon/TComList.h	Wed Oct 09 00:00:10 2013 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-/* The copyright in this software is being made available under the BSD
- * License, included below. This software may be subject to other third party
- * and contributor rights, including patent rights, and no such rights are
- * granted under this license.
- *
- * Copyright (c) 2010-2013, ITU/ISO/IEC
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  * Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- *  * Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *  * Neither the name of the ITU/ISO/IEC nor the names of its contributors may
- *    be used to endorse or promote products derived from this software without
- *    specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** \file     TComList.h
-    \brief    general list class (header)
-*/
-
-#ifndef X265_TCOMLIST_H
-#define X265_TCOMLIST_H
-
-#include "CommonDef.h"
-
-#include <list>
-#include <assert.h>
-#include <cstdlib>
-
-namespace x265 {
-// private namespace
-
-
-//! \ingroup TLibCommon
-//! \{
-
-// ====================================================================================================================
-// Class definition
-// ====================================================================================================================
-
-/// list template
-template<class C>
-class TComList : public std::list<C>
-{
-public:
-
-    typedef typename std::list<C>::iterator TComIterator;
-
-    TComList& operator +=(const TComList& rcTComList)
-    {
-        if (!rcTComList.empty())
-        {
-            insert(this->end(), rcTComList.begin(), rcTComList.end());
-        }
-        return *this;
-    } // leszek
-
-    C popBack()
-    {
-        C cT = this->back();
-
-        this->pop_back();
-        return cT;
-    }
-
-    C popFront()
-    {
-        C cT = this->front();
-
-        this->pop_front();
-        return cT;
-    }
-
-    void pushBack(const C& rcT)
-    {
-        /*assert( sizeof(C) == 4);*/
-        if (rcT != NULL)
-        {
-            this->push_back(rcT);
-        }
-    }
-
-    void pushFront(const C& rcT)
-    {
-        /*assert( sizeof(C) == 4);*/
-        if (rcT != NULL)
-        {
-            this->push_front(rcT);
-        }
-    }
-
-    TComIterator find(const C& rcT) // leszek
-    {
-        return find(this->begin(), this->end(), rcT);
-    }
-};
-}
-//! \}
-
-#endif // ifndef X265_TCOMLIST_H
diff -r fc7fbdd18bc0 -r 5dceef85c58c source/Lib/TLibCommon/TComSlice.cpp
--- a/source/Lib/TLibCommon/TComSlice.cpp	Wed Oct 09 00:00:10 2013 -0500
+++ b/source/Lib/TLibCommon/TComSlice.cpp	Wed Oct 09 15:57:24 2013 -0500
@@ -153,28 +153,28 @@ void  TComSlice::allocSubstreamSizes(UIn
     m_substreamSizes = new UInt[numSubstreams > 0 ? numSubstreams - 1 : 0];
 }
 
-TComPic* TComSlice::xGetRefPic(TComList<TComPic*>& picList, int poc)
+TComPic* TComSlice::xGetRefPic(PicList& picList, int poc)
 {
-    TComList<TComPic*>::iterator iterPic = picList.begin();
+    TComPic *iterPic = picList.first();
     TComPic* pic = NULL;
 
-    while (iterPic != picList.end())
+    while (iterPic)
     {
-        pic = *iterPic;
+        pic = iterPic;
         if (pic->getPOC() == poc)
         {
             break;
         }
-        iterPic++;
+        iterPic = iterPic->m_next;
     }
 
     return pic;
 }
 
-TComPic* TComSlice::xGetLongTermRefPic(TComList<TComPic*>& picList, int poc, bool pocHasMsb)
+TComPic* TComSlice::xGetLongTermRefPic(PicList& picList, int poc, bool pocHasMsb)
 {
-    TComList<TComPic*>::iterator  iterPic = picList.begin();
-    TComPic* pic = *(iterPic);
+    TComPic* iterPic = picList.first();
+    TComPic* pic = iterPic;
     TComPic* stPic = pic;
 
     int pocCycle = 1 << getSPS()->getBitsForPOC();
@@ -183,9 +183,9 @@ TComPic* TComSlice::xGetLongTermRefPic(T
         poc = poc % pocCycle;
     }
 
-    while (iterPic != picList.end())
+    while (iterPic)
     {
-        pic = *(iterPic);
+        pic = iterPic;
         if (pic && pic->getPOC() != this->getPOC() && pic->getSlice()->isReferenced())
         {


More information about the x265-commits mailing list