[x265-commits] [x265] slicetype: pass bools as bool literals

Steve Borho steve at borho.org
Fri Feb 14 02:04:19 CET 2014


details:   http://hg.videolan.org/x265/rev/07b5d6b82f5f
branches:  
changeset: 6075:07b5d6b82f5f
user:      Steve Borho <steve at borho.org>
date:      Mon Feb 10 15:05:04 2014 -0600
description:
slicetype: pass bools as bool literals
Subject: [x265] api: improve documentation of x265_picture dts, pts

details:   http://hg.videolan.org/x265/rev/973ad4575a27
branches:  
changeset: 6076:973ad4575a27
user:      Steve Borho <steve at borho.org>
date:      Tue Feb 11 12:37:13 2014 -0600
description:
api: improve documentation of x265_picture dts, pts
Subject: [x265] cmake: set X265_LATEST_TAG from latesttag: line of .hg_archival.txt

details:   http://hg.videolan.org/x265/rev/d6fdfa9f4938
branches:  
changeset: 6077:d6fdfa9f4938
user:      Steve Borho <steve at borho.org>
date:      Tue Feb 11 12:57:32 2014 -0600
description:
cmake: set X265_LATEST_TAG from latesttag: line of .hg_archival.txt

The net effect of this is that non-tagged release bundles will be capable of
installing shared libraries with effective sonames.
Subject: [x265] encoder: protect public APIs against NULL pointer arguments

details:   http://hg.videolan.org/x265/rev/3dd1f72225e6
branches:  
changeset: 6078:3dd1f72225e6
user:      Steve Borho <steve at borho.org>
date:      Tue Feb 11 20:23:34 2014 -0600
description:
encoder: protect public APIs against NULL pointer arguments
Subject: [x265] testbench: Added stress test cases for chroma_pp, chroma_ps and chroma_hps filter functions

details:   http://hg.videolan.org/x265/rev/43d6027b977b
branches:  
changeset: 6079:43d6027b977b
user:      Nabajit Deka
date:      Mon Feb 03 16:37:23 2014 +0530
description:
testbench: Added stress test cases for chroma_pp, chroma_ps and chroma_hps filter functions
Subject: [x265] asm: Optimizations and cleaups on ipfilter functions

details:   http://hg.videolan.org/x265/rev/4e5ab7003f23
branches:  
changeset: 6080:4e5ab7003f23
user:      Murugan Vairavel <murugan at multicorewareinc.com>
date:      Tue Feb 11 18:53:23 2014 +0530
description:
asm: Optimizations and cleaups on ipfilter functions
Subject: [x265] testbench: Added stress test cases for check_IPFilterLuma_ps_primitive, check_IPFilterLuma_hps_primitive and check_IPFilterLumaHV_primitive filter functions

details:   http://hg.videolan.org/x265/rev/eb19b59558c0
branches:  
changeset: 6081:eb19b59558c0
user:      Nabajit Deka
date:      Mon Feb 03 16:06:24 2014 +0530
description:
testbench: Added stress test cases for check_IPFilterLuma_ps_primitive, check_IPFilterLuma_hps_primitive and check_IPFilterLumaHV_primitive filter functions
Subject: [x265] asm : Optimisations in blockcopy_sp asm routines(2x4, 2x8, 6x8)

details:   http://hg.videolan.org/x265/rev/bf2f60a2d425
branches:  
changeset: 6082:bf2f60a2d425
user:      Nabajit Deka
date:      Tue Feb 11 15:20:54 2014 +0530
description:
asm : Optimisations in blockcopy_sp asm routines(2x4, 2x8, 6x8)
Subject: [x265] rc: Don't do resetABR in CRF.

details:   http://hg.videolan.org/x265/rev/c11f0459464c
branches:  
changeset: 6083:c11f0459464c
user:      Santhoshini Sekar <santhoshini at multicorewareinc.com>
date:      Tue Feb 11 15:55:58 2014 +0530
description:
rc: Don't do resetABR in CRF.
Subject: [x265] vbv: set vbvminrate

details:   http://hg.videolan.org/x265/rev/a8b2456aabef
branches:  
changeset: 6084:a8b2456aabef
user:      Santhoshini Sekar <santhoshini at multicorewareinc.com>
date:      Tue Feb 11 13:06:43 2014 +0530
description:
vbv: set vbvminrate
Subject: [x265] asm: fix bug in cvt16to32_shl

details:   http://hg.videolan.org/x265/rev/eedfa574e07e
branches:  
changeset: 6085:eedfa574e07e
user:      Min Chen <chenm003 at 163.com>
date:      Wed Feb 12 14:47:12 2014 +0800
description:
asm: fix bug in cvt16to32_shl
Subject: [x265] slicetype: cast mvmin/mvmax indices to signed 16bit values

details:   http://hg.videolan.org/x265/rev/a3df372438a4
branches:  
changeset: 6086:a3df372438a4
user:      Steve Borho <steve at borho.org>
date:      Wed Feb 12 01:51:47 2014 -0600
description:
slicetype: cast mvmin/mvmax indices to signed 16bit values
Subject: [x265] weightp: clip lowres MV before using for motion compensation

details:   http://hg.videolan.org/x265/rev/19d7752a4f9c
branches:  
changeset: 6087:19d7752a4f9c
user:      Steve Borho <steve at borho.org>
date:      Wed Feb 12 00:35:27 2014 -0600
description:
weightp: clip lowres MV before using for motion compensation

Even the lowres MVs with very restricted merange can go beyond the available
pixels.  This was causing memory access exceptions on some clips.
Subject: [x265] cmake: a few fixes for building on ARM (Rapsbery Pi in particular)

details:   http://hg.videolan.org/x265/rev/5ddbdaefb783
branches:  
changeset: 6088:5ddbdaefb783
user:      Steve Borho <steve at borho.org>
date:      Wed Feb 12 11:18:36 2014 -0600
description:
cmake: a few fixes for building on ARM (Rapsbery Pi in particular)

Next step will be bringing over ARM cpu detect assembly functions:
  x265_cpu_neon_test()
  x265_cpu_fast_neon_mrc_test()
Subject: [x265] api: mark externed variables for import from Windows shared library

details:   http://hg.videolan.org/x265/rev/c9fc8dab7b9a
branches:  
changeset: 6089:c9fc8dab7b9a
user:      Steve Borho <steve at borho.org>
date:      Wed Feb 12 12:02:23 2014 -0600
description:
api: mark externed variables for import from Windows shared library
Subject: [x265] api: we don't need stuttering header guards

details:   http://hg.videolan.org/x265/rev/817f5bf391d2
branches:  
changeset: 6090:817f5bf391d2
user:      Steve Borho <steve at borho.org>
date:      Wed Feb 12 12:02:46 2014 -0600
description:
api: we don't need stuttering header guards
Subject: [x265] weightp: fix hash mismatch

details:   http://hg.videolan.org/x265/rev/51c86499d3bd
branches:  
changeset: 6091:51c86499d3bd
user:      Kavitha Sampath <kavitha at multicorewareinc.com>
date:      Wed Feb 12 19:09:39 2014 +0530
description:
weightp: fix hash mismatch

all references should have same luma and chroma denominator
Subject: [x265] ratecontrol: to set B-ref frame QP as Lower then B-Frame QP for RC with CQP mode

details:   http://hg.videolan.org/x265/rev/1894c1c35bac
branches:  
changeset: 6092:1894c1c35bac
user:      Gopu Govindaswamy
date:      Thu Feb 13 17:16:22 2014 -0800
description:
ratecontrol: to set B-ref frame QP as Lower then B-Frame QP for RC with CQP mode
Subject: [x265] asm: 16bpp asm code for intra_pred_ang8 - all modes

details:   http://hg.videolan.org/x265/rev/5457f23edb5d
branches:  
changeset: 6093:5457f23edb5d
user:      Yuvaraj Venkatesh <yuvaraj at multicorewareinc.com>
date:      Wed Feb 12 13:44:25 2014 +0530
description:
asm: 16bpp asm code for intra_pred_ang8 - all modes
Subject: [x265] Test bench : Stress test cases for remaining filter functions.

details:   http://hg.videolan.org/x265/rev/3eb456f69e34
branches:  
changeset: 6094:3eb456f69e34
user:      Nabajit Deka
date:      Wed Feb 12 15:50:15 2014 +0530
description:
Test bench : Stress test cases for remaining filter functions.
Subject: [x265] asm : Clean up and minor modifications in pixel_sub_ps asm functions(2x4, 2x8, 6x8)

details:   http://hg.videolan.org/x265/rev/d83f25c4ae1d
branches:  
changeset: 6095:d83f25c4ae1d
user:      Nabajit Deka
date:      Wed Feb 12 18:08:20 2014 +0530
description:
asm : Clean up and minor modifications in pixel_sub_ps asm functions(2x4, 2x8, 6x8)
Subject: [x265] asm-16bpp: assembly code for IntraAng32x32 all modes

details:   http://hg.videolan.org/x265/rev/cca149489a6f
branches:  
changeset: 6096:cca149489a6f
user:      Dnyaneshwar G <dnyaneshwar at multicorewareinc.com>
date:      Wed Feb 12 17:28:09 2014 +0530
description:
asm-16bpp: assembly code for IntraAng32x32 all modes
Subject: [x265] vbv: lookahead

details:   http://hg.videolan.org/x265/rev/adee518df8ab
branches:  
changeset: 6097:adee518df8ab
user:      Santhoshini Sekar <santhoshini at multicorewareinc.com>
date:      Wed Feb 12 13:51:44 2014 +0530
description:
vbv: lookahead
Subject: [x265] encoder: remember abort condition and stop accepting input frames

details:   http://hg.videolan.org/x265/rev/f894b457aca8
branches:  
changeset: 6098:f894b457aca8
user:      Steve Borho <steve at borho.org>
date:      Wed Feb 12 14:15:06 2014 -0600
description:
encoder: remember abort condition and stop accepting input frames
Subject: [x265] encoder: remove two completed TODOs

details:   http://hg.videolan.org/x265/rev/21c2724dfcd1
branches:  
changeset: 6099:21c2724dfcd1
user:      Steve Borho <steve at borho.org>
date:      Wed Feb 12 14:15:19 2014 -0600
description:
encoder: remove two completed TODOs
Subject: [x265] cleanup TEncSbac

details:   http://hg.videolan.org/x265/rev/d22564466556
branches:  
changeset: 6100:d22564466556
user:      Satoshi Nakagawa <nakagawa424 at oki.com>
date:      Wed Feb 12 10:29:42 2014 +0900
description:
cleanup TEncSbac
Subject: [x265] fix bug on TSKIP

details:   http://hg.videolan.org/x265/rev/d6774d83f39c
branches:  
changeset: 6101:d6774d83f39c
user:      Min Chen <chenm003 at 163.com>
date:      Wed Feb 12 18:58:49 2014 +0800
description:
fix bug on TSKIP
Subject: [x265] cli: use real log commands

details:   http://hg.videolan.org/x265/rev/218f8304978e
branches:  
changeset: 6102:218f8304978e
user:      Steve Borho <steve at borho.org>
date:      Wed Feb 12 15:34:07 2014 -0600
description:
cli: use real log commands
Subject: [x265] cmake: add resource file for Windows version info on DLL and EXE

details:   http://hg.videolan.org/x265/rev/54189fefdc51
branches:  
changeset: 6103:54189fefdc51
user:      Steve Borho <steve at borho.org>
date:      Wed Feb 12 17:16:17 2014 -0600
description:
cmake: add resource file for Windows version info on DLL and EXE

This sadly doesn't work when compiling under MinGW; cmake has an unresolved bug
that passes all CFLAGS to windres, which pukes on them.
Subject: [x265] cmake: change name of MSVC built shared library to avoid filename conflicts

details:   http://hg.videolan.org/x265/rev/21832083908f
branches:  
changeset: 6104:21832083908f
user:      Steve Borho <steve at borho.org>
date:      Wed Feb 12 17:39:50 2014 -0600
description:
cmake: change name of MSVC built shared library to avoid filename conflicts

the shared library and CLI exe were both trying to write x265.pdb and x265.ilk
with unhelpful results.
Subject: [x265] cmake: workaround for MinGW windres

details:   http://hg.videolan.org/x265/rev/0fcc87d05d10
branches:  
changeset: 6105:0fcc87d05d10
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 13 00:12:50 2014 -0600
description:
cmake: workaround for MinGW windres
Subject: [x265] cmake: use findGit.cmake, which was available in cmake 2.8.8, our min version

details:   http://hg.videolan.org/x265/rev/726323914cd2
branches:  
changeset: 6106:726323914cd2
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 13 00:35:02 2014 -0600
description:
cmake: use findGit.cmake, which was available in cmake 2.8.8, our min version
Subject: [x265] cmake: simplify version detection, use single set of variables

details:   http://hg.videolan.org/x265/rev/e1088cae157c
branches:  
changeset: 6107:e1088cae157c
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 13 01:02:46 2014 -0600
description:
cmake: simplify version detection, use single set of variables
Subject: [x265] cmake: be quiet about missing optional packages

details:   http://hg.videolan.org/x265/rev/f0d82bf20584
branches:  
changeset: 6108:f0d82bf20584
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 13 01:04:35 2014 -0600
description:
cmake: be quiet about missing optional packages
Subject: [x265] threading: fix compile when XP support is enabled

details:   http://hg.videolan.org/x265/rev/7c24e5a920b2
branches:  
changeset: 6109:7c24e5a920b2
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 13 01:47:10 2014 -0600
description:
threading: fix compile when XP support is enabled
Subject: [x265] weightp: pad width passed to weight_pp(), it requires 16byte alignment

details:   http://hg.videolan.org/x265/rev/9dffa4473096
branches:  
changeset: 6110:9dffa4473096
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 13 02:33:58 2014 -0600
description:
weightp: pad width passed to weight_pp(), it requires 16byte alignment
Subject: [x265] weightp: add assert to protect assembly limitiation

details:   http://hg.videolan.org/x265/rev/df4531a24c4d
branches:  
changeset: 6111:df4531a24c4d
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 13 02:48:38 2014 -0600
description:
weightp: add assert to protect assembly limitiation
Subject: [x265] compress: improve rd 2 performance (Patch from Sumalatha)

details:   http://hg.videolan.org/x265/rev/313e42bdd4ea
branches:  
changeset: 6112:313e42bdd4ea
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Thu Feb 13 15:14:03 2014 +0530
description:
compress: improve rd 2 performance (Patch from Sumalatha)

a. Always allow intra mode for mode decision
b. increase more skips at each depth(do encode of best merge candidates initially and
if the merge is skipped, dont do inter modes)

Bitrate increase compared to rd 3 (4-6%) on most HD clips, quality maintained. Performance impact
to be measured in regression tests.

Sintel 720p clip needs to be investigated further. Poor show here.
Subject: [x265] Merge

details:   http://hg.videolan.org/x265/rev/5e104ed219c3
branches:  
changeset: 6113:5e104ed219c3
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Thu Feb 13 15:14:28 2014 +0530
description:
Merge
Subject: [x265] testbench: added stress test cases for all functions in mbdstharness.cpp

details:   http://hg.videolan.org/x265/rev/5e4e4bda0e7e
branches:  
changeset: 6114:5e4e4bda0e7e
user:      Murugan Vairavel <murugan at multicorewareinc.com>
date:      Thu Feb 13 19:28:30 2014 +0530
description:
testbench: added stress test cases for all functions in mbdstharness.cpp
Subject: [x265] api: improve documentation of x265_picture, properly initialize pic.colorSpace

details:   http://hg.videolan.org/x265/rev/1420cb397447
branches:  
changeset: 6115:1420cb397447
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 13 15:25:57 2014 -0600
description:
api: improve documentation of x265_picture, properly initialize pic.colorSpace
Subject: [x265] cmake: more general fix for CFLAGS breaking resource compiles

details:   http://hg.videolan.org/x265/rev/8fdcf1ba38f3
branches:  
changeset: 6116:8fdcf1ba38f3
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 13 15:49:41 2014 -0600
description:
cmake: more general fix for CFLAGS breaking resource compiles

There are some versions of rc.exe that also balk at being given cl.exe flags
Subject: [x265] compress: fix gcc warning, make array const

details:   http://hg.videolan.org/x265/rev/d9e6f16baa29
branches:  
changeset: 6117:d9e6f16baa29
user:      Steve Borho <steve at borho.org>
date:      Thu Feb 13 15:51:41 2014 -0600
description:
compress: fix gcc warning, make array const

c:/mcw/x265/source/encoder/compress.cpp:414:22: warning: variable 'bestMergePred' set but not used [-Wunused-but-set-variable]
             TComYuv* bestMergePred;
Subject: [x265] fix bug on TSKIP

details:   http://hg.videolan.org/x265/rev/402b11d9df80
branches:  
changeset: 6118:402b11d9df80
user:      Satoshi Nakagawa <nakagawa424 at oki.com>
date:      Thu Feb 13 09:59:42 2014 +0900
description:
fix bug on TSKIP

diffstat:

 source/CMakeLists.txt                        |    34 +-
 source/Lib/TLibCommon/TComDataCU.cpp         |     4 +
 source/Lib/TLibCommon/TComDataCU.h           |     1 +
 source/Lib/TLibCommon/TComTrQuant.cpp        |     4 +-
 source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp |     5 -
 source/Lib/TLibEncoder/TEncBinCoderCABAC.h   |     1 -
 source/Lib/TLibEncoder/TEncEntropy.cpp       |    13 +-
 source/Lib/TLibEncoder/TEncEntropy.h         |    12 +-
 source/Lib/TLibEncoder/TEncSbac.cpp          |   125 +-
 source/Lib/TLibEncoder/TEncSbac.h            |    16 +-
 source/Lib/TLibEncoder/TEncSearch.cpp        |    12 +-
 source/cmake/version.cmake                   |    63 +-
 source/common/common.cpp                     |     2 +
 source/common/cpu.cpp                        |     4 +-
 source/common/lowres.h                       |     2 +
 source/common/pixel.cpp                      |     1 +
 source/common/threading.h                    |     6 +-
 source/common/x86/asm-primitives.cpp         |    70 +
 source/common/x86/blockcopy8.asm             |   220 +-
 source/common/x86/intrapred.h                |    14 +
 source/common/x86/intrapred16.asm            |  7755 +++++++++++++++++++++++++-
 source/common/x86/ipfilter8.asm              |  1197 +--
 source/common/x86/pixel-util8.asm            |   309 +-
 source/encoder/compress.cpp                  |   106 +-
 source/encoder/encoder.cpp                   |    45 +-
 source/encoder/encoder.h                     |     1 +
 source/encoder/ratecontrol.cpp               |    79 +-
 source/encoder/ratecontrol.h                 |     5 +-
 source/encoder/slicetype.cpp                 |    65 +-
 source/encoder/slicetype.h                   |     2 +
 source/encoder/weightPrediction.cpp          |    36 +-
 source/test/ipfilterharness.cpp              |   468 +-
 source/test/ipfilterharness.h                |     2 +-
 source/test/mbdstharness.cpp                 |    93 +-
 source/test/mbdstharness.h                   |     5 +-
 source/x265.cpp                              |     4 +-
 source/x265.h                                |    65 +-
 source/x265.rc.in                            |    32 +
 38 files changed, 9425 insertions(+), 1453 deletions(-)

diffs (truncated from 13132 to 300 lines):

diff -r 2316e8e33512 -r 402b11d9df80 source/CMakeLists.txt
--- a/source/CMakeLists.txt	Tue Feb 11 13:03:34 2014 +0900
+++ b/source/CMakeLists.txt	Thu Feb 13 09:59:42 2014 +0900
@@ -37,7 +37,7 @@ if("${SYSPROC}" STREQUAL "i386"   OR "${
         set(X64 1)
         add_definitions(-DX86_64=1)
     endif()
-elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "arm")
+elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv6l")
     message(STATUS "Detected ARM system processor")
     set(ARM 1)
     add_definitions(-DX265_ARCH_ARM=1)
@@ -123,6 +123,9 @@ if (GCC)
     if(X86 AND NOT X64)
         add_definitions(-march=i686)
     endif()
+    if(ARM)
+        add_definitions(-march=armv6 -mfloat-abi=hard -mfpu=vfp)
+    endif()
 endif(GCC)
 
 find_package(Yasm)
@@ -172,7 +175,7 @@ endif(ENABLE_PPA)
 
 if (WIN32)
     # Visual leak detector
-    find_package(VLD)
+    find_package(VLD QUIET)
     if(VLD_FOUND)
         add_definitions(-DHAVE_VLD)
         include_directories(${VLD_INCLUDE_DIRS})
@@ -239,12 +242,32 @@ install(TARGETS x265-static
         ARCHIVE DESTINATION lib)
 install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include)
 
+if(CMAKE_RC_COMPILER)
+    # The resource compiler does not need CFLAGS or macro defines. It
+    # often breaks them
+    string(REPLACE "<FLAGS>" "" CMAKE_RC_COMPILE_OBJECT "${CMAKE_RC_COMPILE_OBJECT}")
+    string(REPLACE "<DEFINES>" "" CMAKE_RC_COMPILE_OBJECT "${CMAKE_RC_COMPILE_OBJECT}")
+
+    # convert X265_LATEST_TAG (ex: 0.7) and X265_TAG_DISTANCE (ex: 103) to
+    # @X265_VERSION_MAJOR@, at X265_VERSION_MINOR@, at X265_BRANCH_ID@, at X265_TAG_DISTANCE@
+    string(REPLACE "." ";" VERSION_LIST "${X265_LATEST_TAG}")
+    list(GET VERSION_LIST 0 X265_VERSION_MAJOR)
+    list(GET VERSION_LIST 1 X265_VERSION_MINOR)
+    set(X265_BRANCH_ID 0) # TODO: 0 - stable, 1 - default or other
+    set(X265_RC_FILE "${CMAKE_CURRENT_BINARY_DIR}/x265.rc")
+    configure_file("${CMAKE_CURRENT_SOURCE_DIR}/x265.rc.in" "${X265_RC_FILE}" @ONLY)
+endif()
+
 option(ENABLE_SHARED "Build shared library" ON)
 if(ENABLE_SHARED)
     add_library(x265-shared SHARED dllmain.cpp "${PROJECT_BINARY_DIR}/x265.def" ${YASM_OBJS}
-                                   $<TARGET_OBJECTS:encoder> $<TARGET_OBJECTS:common>)
+                ${X265_RC_FILE} $<TARGET_OBJECTS:encoder> $<TARGET_OBJECTS:common>)
     target_link_libraries(x265-shared ${PLATFORM_LIBS})
-    set_target_properties(x265-shared PROPERTIES OUTPUT_NAME x265)
+    if(MSVC)
+        set_target_properties(x265-shared PROPERTIES OUTPUT_NAME libx265)
+    else()
+        set_target_properties(x265-shared PROPERTIES OUTPUT_NAME x265)
+    endif()
     if(UNIX AND NOT APPLE)
         set_target_properties(x265-shared PROPERTIES LINK_FLAGS "-Wl,-Bsymbolic")
     endif()
@@ -298,7 +321,8 @@ if(ENABLE_CLI)
         add_executable(cli ../COPYING ${InputFiles} ${OutputFiles} ${GETOPT} x265.cpp x265.h
                            $<TARGET_OBJECTS:encoder> $<TARGET_OBJECTS:common> ${YASM_OBJS} ${YASM_SRCS})
     else()
-        add_executable(cli ../COPYING ${InputFiles} ${OutputFiles} ${GETOPT} x265.cpp x265.h)
+        add_executable(cli ../COPYING ${InputFiles} ${OutputFiles} ${GETOPT} ${X265_RC_FILE}
+                           x265.cpp x265.h)
         target_link_libraries(cli x265-static ${PLATFORM_LIBS})
     endif()
     set_target_properties(cli PROPERTIES OUTPUT_NAME x265)
diff -r 2316e8e33512 -r 402b11d9df80 source/Lib/TLibCommon/TComDataCU.cpp
--- a/source/Lib/TLibCommon/TComDataCU.cpp	Tue Feb 11 13:03:34 2014 +0900
+++ b/source/Lib/TLibCommon/TComDataCU.cpp	Thu Feb 13 09:59:42 2014 +0900
@@ -230,6 +230,7 @@ void TComDataCU::initCU(TComPic* pic, ui
     m_cuPelY           = (cuAddr / pic->getFrameWidthInCU()) * g_maxCUHeight;
     m_absIdxInLCU      = 0;
     m_totalCost        = MAX_INT64;
+    m_sa8dCost         = MAX_INT64;
     m_totalDistortion  = 0;
     m_totalBits        = 0;
     m_numPartitions    = pic->getNumPartInCU();
@@ -333,6 +334,7 @@ void TComDataCU::initCU(TComPic* pic, ui
 void TComDataCU::initEstData(uint32_t depth, int qp)
 {
     m_totalCost        = MAX_INT64;
+    m_sa8dCost         = MAX_INT64;
     m_totalDistortion  = 0;
     m_totalBits        = 0;
 
@@ -386,6 +388,7 @@ void TComDataCU::initSubCU(TComDataCU* c
     m_cuPelY           = cu->getCUPelY() + (g_maxCUHeight >> depth) * (partUnitIdx >> 1);
 
     m_totalCost        = MAX_INT64;
+    m_sa8dCost         = MAX_INT64;
     m_totalDistortion  = 0;
     m_totalBits        = 0;
     m_numPartitions    = cu->getTotalNumPart() >> 2;
@@ -458,6 +461,7 @@ void TComDataCU::copyToSubCU(TComDataCU*
     m_cuPelY           = cu->getCUPelY() + (g_maxCUHeight >> depth) * (partUnitIdx >> 1);
 
     m_totalCost        = MAX_INT64;
+    m_sa8dCost         = MAX_INT64;
     m_totalDistortion  = 0;
     m_totalBits        = 0;
     m_numPartitions    = cu->getTotalNumPart() >> 2;
diff -r 2316e8e33512 -r 402b11d9df80 source/Lib/TLibCommon/TComDataCU.h
--- a/source/Lib/TLibCommon/TComDataCU.h	Tue Feb 11 13:03:34 2014 +0900
+++ b/source/Lib/TLibCommon/TComDataCU.h	Thu Feb 13 09:59:42 2014 +0900
@@ -181,6 +181,7 @@ public:
     uint32_t      m_totalBits;       ///< sum of partition signal bits
     uint64_t      m_avgCost[4];      // stores the avg cost of CU's in frame for each depth
     uint32_t      m_count[4];
+    uint64_t      m_sa8dCost;
 
     // -------------------------------------------------------------------------------------------------------------------
     // create / destroy / initialize / copy
diff -r 2316e8e33512 -r 402b11d9df80 source/Lib/TLibCommon/TComTrQuant.cpp
--- a/source/Lib/TLibCommon/TComTrQuant.cpp	Tue Feb 11 13:03:34 2014 +0900
+++ b/source/Lib/TLibCommon/TComTrQuant.cpp	Thu Feb 13 09:59:42 2014 +0900
@@ -642,9 +642,9 @@ uint32_t TComTrQuant::xRateDistOptQuant(
                 baseLevel = (c1Idx < C1FLAG_NUMBER) ? (2 + (c2Idx < C2FLAG_NUMBER)) : 1;
                 if (level >= baseLevel)
                 {
-                    if (level  > 3 * (1 << goRiceParam))
+                    if (goRiceParam < 4 && level > (3 << goRiceParam))
                     {
-                        goRiceParam = std::min<uint32_t>(goRiceParam + 1, 4);
+                        goRiceParam++;
                     }
                 }
                 if (level >= 1)
diff -r 2316e8e33512 -r 402b11d9df80 source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp
--- a/source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp	Tue Feb 11 13:03:34 2014 +0900
+++ b/source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp	Thu Feb 13 09:59:42 2014 +0900
@@ -57,11 +57,6 @@ void TEncBinCABAC::init(TComBitIf* bitIf
     m_bitIf = bitIf;
 }
 
-void TEncBinCABAC::uninit()
-{
-    m_bitIf = 0;
-}
-
 void TEncBinCABAC::start()
 {
     m_low              = 0;
diff -r 2316e8e33512 -r 402b11d9df80 source/Lib/TLibEncoder/TEncBinCoderCABAC.h
--- a/source/Lib/TLibEncoder/TEncBinCoderCABAC.h	Tue Feb 11 13:03:34 2014 +0900
+++ b/source/Lib/TLibEncoder/TEncBinCoderCABAC.h	Thu Feb 13 09:59:42 2014 +0900
@@ -55,7 +55,6 @@ public:
     virtual ~TEncBinCABAC();
 
     void  init(TComBitIf* bitIf);
-    void  uninit();
 
     void  start();
     void  finish();
diff -r 2316e8e33512 -r 402b11d9df80 source/Lib/TLibEncoder/TEncEntropy.cpp
--- a/source/Lib/TLibEncoder/TEncEntropy.cpp	Tue Feb 11 13:03:34 2014 +0900
+++ b/source/Lib/TLibEncoder/TEncEntropy.cpp	Thu Feb 13 09:59:42 2014 +0900
@@ -450,11 +450,14 @@ void TEncEntropy::encodePUWise(TComDataC
         }
         else
         {
+            uint32_t interDir = cu->getInterDir(subPartIdx);
             encodeInterDirPU(cu, subPartIdx);
             for (uint32_t refListIdx = 0; refListIdx < 2; refListIdx++)
             {
-                if (cu->getSlice()->getNumRefIdx(refListIdx) > 0)
+                if (interDir & (1 << refListIdx))
                 {
+                    assert(cu->getSlice()->getNumRefIdx(refListIdx) > 0);
+
                     encodeRefFrmIdxPU(cu, subPartIdx, refListIdx);
                     encodeMvdPU(cu, subPartIdx, refListIdx);
                     encodeMVPIdxPU(cu, subPartIdx, refListIdx);
@@ -489,7 +492,7 @@ void TEncEntropy::encodeRefFrmIdxPU(TCom
             return;
         }
 
-        if (cu->getInterDir(absPartIdx) & (1 << list))
+        assert(cu->getInterDir(absPartIdx) & (1 << list));
         {
             m_entropyCoderIf->codeRefFrmIdx(cu, absPartIdx, list);
         }
@@ -506,7 +509,7 @@ void TEncEntropy::encodeMvdPU(TComDataCU
 {
     assert(!cu->isIntra(absPartIdx));
 
-    if (cu->getInterDir(absPartIdx) & (1 << list))
+    assert(cu->getInterDir(absPartIdx) & (1 << list));
     {
         m_entropyCoderIf->codeMvd(cu, absPartIdx, list);
     }
@@ -514,9 +517,9 @@ void TEncEntropy::encodeMvdPU(TComDataCU
 
 void TEncEntropy::encodeMVPIdxPU(TComDataCU* cu, uint32_t absPartIdx, int list)
 {
-    if ((cu->getInterDir(absPartIdx) & (1 << list)))
+    assert(cu->getInterDir(absPartIdx) & (1 << list));
     {
-        m_entropyCoderIf->codeMVPIdx(cu, absPartIdx, list);
+        m_entropyCoderIf->codeMVPIdx(cu->getMVPIdx(list, absPartIdx));
     }
 }
 
diff -r 2316e8e33512 -r 402b11d9df80 source/Lib/TLibEncoder/TEncEntropy.h
--- a/source/Lib/TLibEncoder/TEncEntropy.h	Tue Feb 11 13:03:34 2014 +0900
+++ b/source/Lib/TLibEncoder/TEncEntropy.h	Thu Feb 13 09:59:42 2014 +0900
@@ -66,9 +66,7 @@ public:
     virtual void setBitstream(TComBitIf* p) = 0;
     virtual void setSlice(TComSlice* p) = 0;
     virtual void resetBits() = 0;
-    virtual void resetCoeffCost() = 0;
     virtual uint32_t getNumberOfWrittenBits() = 0;
-    virtual uint32_t getCoeffCost() = 0;
 
     virtual void codeVPS(TComVPS* vps) = 0;
     virtual void codeSPS(TComSPS* sps) = 0;
@@ -78,7 +76,7 @@ public:
     virtual void codeTilesWPPEntryPoint(TComSlice* slice) = 0;
     virtual void codeTerminatingBit(uint32_t isLast) = 0;
     virtual void codeSliceFinish() = 0;
-    virtual void codeMVPIdx(TComDataCU* cu, uint32_t absPartIdx, int list) = 0;
+    virtual void codeMVPIdx(uint32_t symbol) = 0;
     virtual void codeScalingList(TComScalingList* scalingList) = 0;
 
 public:
@@ -107,7 +105,6 @@ public:
     virtual void codeMvd(TComDataCU* cu, uint32_t absPartIdx, int eRefList) = 0;
     virtual void codeDeltaQP(TComDataCU* cu, uint32_t absPartIdx) = 0;
     virtual void codeCoeffNxN(TComDataCU* cu, TCoeff* pcCoef, uint32_t absPartIdx, uint32_t width, uint32_t height, uint32_t depth, TextType ttype) = 0;
-    virtual void codeTransformSkipFlags(TComDataCU* cu, uint32_t absPartIdx, uint32_t width, uint32_t height, TextType ttype) = 0;
     virtual void codeSAOSign(uint32_t code) = 0;
     virtual void codeSaoMaxUvlc(uint32_t code, uint32_t maxSymbol) = 0;
     virtual void codeSaoMerge(uint32_t code) = 0;
@@ -115,9 +112,6 @@ public:
     virtual void codeSaoUflc(uint32_t length, uint32_t code) = 0;
     virtual void estBit(estBitsSbacStruct* estBitsSbac, int width, int height, TextType ttype) = 0;
 
-    virtual void codeDFFlag(uint32_t code, const char *symbolName) = 0;
-    virtual void codeDFSvlc(int code, const char *symbolName)   = 0;
-
     virtual ~TEncEntropyIf() {}
 };
 
@@ -137,12 +131,8 @@ public:
 
     void    resetBits() { m_entropyCoderIf->resetBits();      }
 
-    void    resetCoeffCost() { m_entropyCoderIf->resetCoeffCost(); }
-
     uint32_t    getNumberOfWrittenBits() { return m_entropyCoderIf->getNumberOfWrittenBits(); }
 
-    uint32_t    getCoeffCost() { return m_entropyCoderIf->getCoeffCost(); }
-
     void    resetEntropy() { m_entropyCoderIf->resetEntropy();  }
 
     void    determineCabacInitIdx() { m_entropyCoderIf->determineCabacInitIdx(); }
diff -r 2316e8e33512 -r 402b11d9df80 source/Lib/TLibEncoder/TEncSbac.cpp
--- a/source/Lib/TLibEncoder/TEncSbac.cpp	Tue Feb 11 13:03:34 2014 +0900
+++ b/source/Lib/TLibEncoder/TEncSbac.cpp	Thu Feb 13 09:59:42 2014 +0900
@@ -184,7 +184,6 @@ TEncSbac::TEncSbac()
 // new structure here
     : m_slice(NULL)
     , m_binIf(NULL)
-    , m_coeffCost(0)
 {
     memset(m_contextModels, 0, sizeof(m_contextModels));
 }
@@ -235,7 +234,6 @@ void TEncSbac::resetEntropy()
     initBuffer(&m_contextModels[OFF_TRANSFORMSKIP_FLAG_CTX], sliceType, qp, (UChar*)INIT_TRANSFORMSKIP_FLAG, 2 * NUM_TRANSFORMSKIP_FLAG_CTX);
     initBuffer(&m_contextModels[OFF_CU_TRANSQUANT_BYPASS_FLAG_CTX], sliceType, qp, (UChar*)INIT_CU_TRANSQUANT_BYPASS_FLAG, NUM_CU_TRANSQUANT_BYPASS_FLAG_CTX);
     // new structure
-    m_lastQp = qp;
 
     m_binIf->start();
 }
@@ -300,18 +298,6 @@ void TEncSbac::determineCabacInitIdx()
     }
 }
 
-void TEncSbac::codeDFFlag(uint32_t code, const char *symbolName)
-{
-    (void)symbolName;
-    WRITE_FLAG(code, symbolName);
-}
-
-void TEncSbac::codeDFSvlc(int code, const char *symbolName)
-{
-    (void)symbolName;
-    WRITE_SVLC(code, symbolName);
-}
-


More information about the x265-commits mailing list