[x265-commits] [x265] bitcost: avoid overflow when mvx and mvy costs are added ...
Deepthi Nandakumar
deepthi at multicorewareinc.com
Wed Jul 8 19:12:48 CEST 2015
details: http://hg.videolan.org/x265/rev/523540864864
branches:
changeset: 10775:523540864864
user: Deepthi Nandakumar <deepthi at multicorewareinc.com>
date: Mon Jul 06 14:12:55 2015 +0530
description:
bitcost: avoid overflow when mvx and mvy costs are added together
This will prevent overflow and wrap-around errors, giving erroneously low mvcosts.
Subject: [x265] cmake: add exports def file for all Windows compilers, not just MSVC
details: http://hg.videolan.org/x265/rev/023775873fae
branches:
changeset: 10776:023775873fae
user: Steve Borho <steve at borho.org>
date: Wed Jul 08 11:46:24 2015 -0500
description:
cmake: add exports def file for all Windows compilers, not just MSVC
Subject: [x265] fix output mistake in Main12
details: http://hg.videolan.org/x265/rev/d690c97b3452
branches:
changeset: 10777:d690c97b3452
user: Min Chen <chenm003 at 163.com>
date: Tue Jul 07 16:20:27 2015 -0700
description:
fix output mistake in Main12
Subject: [x265] cmake: disable shared lib on linux multlib for now
details: http://hg.videolan.org/x265/rev/590a61a07303
branches:
changeset: 10778:590a61a07303
user: Steve Borho <steve at borho.org>
date: Wed Jul 08 12:00:38 2015 -0500
description:
cmake: disable shared lib on linux multlib for now
diffstat:
build/linux/multilib.sh | 2 +-
source/CMakeLists.txt | 4 ++--
source/encoder/bitcost.cpp | 2 +-
source/encoder/sao.cpp | 2 +-
source/encoder/sao.h | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diffs (61 lines):
diff -r 4b6e188d7d4c -r 590a61a07303 build/linux/multilib.sh
--- a/build/linux/multilib.sh Mon Jul 06 13:58:41 2015 -0500
+++ b/build/linux/multilib.sh Wed Jul 08 12:00:38 2015 -0500
@@ -13,5 +13,5 @@ make ${MAKEFLAGS}
cd ../8bit
ln -sf ../10bit/libx265.a libx265_main10.a
ln -sf ../12bit/libx265.a libx265_main12.a
-cmake ../../../source -DEXTRA_LIB="x265_main10.a;x265_main12.a" -DEXTRA_LINK_FLAGS=-L. -DLINKED_10BIT=ON -DLINKED_12BIT=ON
+cmake ../../../source -DEXTRA_LIB="x265_main10.a;x265_main12.a" -DEXTRA_LINK_FLAGS=-L. -DLINKED_10BIT=ON -DLINKED_12BIT=ON -DENABLE_SHARED=OFF
make ${MAKEFLAGS}
diff -r 4b6e188d7d4c -r 590a61a07303 source/CMakeLists.txt
--- a/source/CMakeLists.txt Mon Jul 06 13:58:41 2015 -0500
+++ b/source/CMakeLists.txt Wed Jul 08 12:00:38 2015 -0500
@@ -524,9 +524,9 @@ if(ENABLE_CLI)
include_directories(compat/getopt)
set(GETOPT compat/getopt/getopt.c compat/getopt/getopt.h)
endif(NOT HAVE_GETOPT_H)
- if(MSVC)
+ if(WIN32)
set(ExportDefs "${PROJECT_BINARY_DIR}/x265.def")
- endif(MSVC)
+ endif(WIN32)
if(XCODE)
# Xcode seems unable to link the CLI with libs, so link as one targget
diff -r 4b6e188d7d4c -r 590a61a07303 source/encoder/bitcost.cpp
--- a/source/encoder/bitcost.cpp Mon Jul 06 13:58:41 2015 -0500
+++ b/source/encoder/bitcost.cpp Wed Jul 08 12:00:38 2015 -0500
@@ -45,7 +45,7 @@ void BitCost::setQP(unsigned int qp)
// estimate same cost for negative and positive MVD
for (int i = 0; i <= 2 * BC_MAX_MV; i++)
- s_costs[qp][i] = s_costs[qp][-i] = (uint16_t)X265_MIN(s_bitsizes[i] * lambda + 0.5f, (1 << 16) - 1);
+ s_costs[qp][i] = s_costs[qp][-i] = (uint16_t)X265_MIN(s_bitsizes[i] * lambda + 0.5f, (1 << 15) - 1);
}
}
diff -r 4b6e188d7d4c -r 590a61a07303 source/encoder/sao.cpp
--- a/source/encoder/sao.cpp Mon Jul 06 13:58:41 2015 -0500
+++ b/source/encoder/sao.cpp Wed Jul 08 12:00:38 2015 -0500
@@ -1235,7 +1235,7 @@ inline int64_t SAO::estSaoTypeDist(int p
}
if (count)
{
- int offset = roundIBDI(offsetOrg, count << SAO_BIT_INC);
+ int offset = roundIBDI(offsetOrg << (X265_DEPTH - 8), count);
offset = x265_clip3(-OFFSET_THRESH + 1, OFFSET_THRESH - 1, offset);
if (typeIdx < SAO_BO)
{
diff -r 4b6e188d7d4c -r 590a61a07303 source/encoder/sao.h
--- a/source/encoder/sao.h Mon Jul 06 13:58:41 2015 -0500
+++ b/source/encoder/sao.h Wed Jul 08 12:00:38 2015 -0500
@@ -57,7 +57,7 @@ public:
enum { SAO_MAX_DEPTH = 4 };
enum { SAO_BO_BITS = 5 };
enum { MAX_NUM_SAO_CLASS = 33 };
- enum { SAO_BIT_INC = X265_MAX(X265_DEPTH - 10, 0) };
+ enum { SAO_BIT_INC = 0/*X265_MAX(X265_DEPTH - 10, 0)*/ };
enum { OFFSET_THRESH = 1 << X265_MIN(X265_DEPTH - 5, 5) };
enum { NUM_EDGETYPE = 5 };
enum { NUM_PLANE = 3 };
More information about the x265-commits
mailing list