[x265-commits] [x265] param: tune grain disables rdoq-level. This provides bett...

Deepthi Nandakumar deepthi at multicorewareinc.com
Wed Jul 1 16:55:24 CEST 2015


details:   http://hg.videolan.org/x265/rev/3ce4bf401c7e
branches:  stable
changeset: 10741:3ce4bf401c7e
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Wed Jul 01 09:33:36 2015 +0530
description:
param: tune grain disables rdoq-level. This provides better visual quality results
Subject: [x265] Merge with stable

details:   http://hg.videolan.org/x265/rev/68d089360477
branches:  
changeset: 10742:68d089360477
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Wed Jul 01 14:51:36 2015 +0530
description:
Merge with stable

diffstat:

 build/linux/multilib.sh                     |    12 +
 build/msys/multilib.sh                      |    12 +
 build/vc10-x86_64/multilib.bat              |    34 +
 build/vc11-x86_64/multilib.bat              |    34 +
 build/vc12-x86_64/multilib.bat              |    34 +
 build/vc9-x86_64/multilib.bat               |    34 +
 doc/reST/api.rst                            |   204 +-
 doc/reST/cli.rst                            |    64 +-
 doc/reST/presets.rst                        |     8 +-
 source/CMakeLists.txt                       |    37 +-
 source/cmake/CMakeASM_YASMInformation.cmake |     4 +-
 source/common/CMakeLists.txt                |    11 +-
 source/common/bitstream.cpp                 |     2 +-
 source/common/bitstream.h                   |     2 +-
 source/common/common.cpp                    |     6 +-
 source/common/common.h                      |    13 +-
 source/common/constants.cpp                 |     7 +-
 source/common/constants.h                   |     4 +-
 source/common/contexts.h                    |     5 +-
 source/common/cpu.cpp                       |    38 +-
 source/common/cpu.h                         |    17 +-
 source/common/cudata.cpp                    |     2 +-
 source/common/cudata.h                      |     2 +-
 source/common/dct.cpp                       |   169 +-
 source/common/deblock.cpp                   |     2 +-
 source/common/deblock.h                     |     2 +-
 source/common/frame.cpp                     |     2 +-
 source/common/frame.h                       |     2 +-
 source/common/framedata.cpp                 |     2 +-
 source/common/framedata.h                   |    20 +-
 source/common/intrapred.cpp                 |     4 +-
 source/common/ipfilter.cpp                  |     4 +-
 source/common/loopfilter.cpp                |     2 +-
 source/common/lowres.cpp                    |    14 +-
 source/common/lowres.h                      |     4 +-
 source/common/md5.cpp                       |     2 +-
 source/common/md5.h                         |     2 +-
 source/common/mv.h                          |     2 +-
 source/common/param.cpp                     |    82 +-
 source/common/param.h                       |    18 +-
 source/common/piclist.cpp                   |     2 +-
 source/common/piclist.h                     |     5 +-
 source/common/picyuv.cpp                    |     4 +-
 source/common/picyuv.h                      |     2 +-
 source/common/pixel.cpp                     |     4 +-
 source/common/predict.cpp                   |    25 +-
 source/common/predict.h                     |     2 +-
 source/common/primitives.cpp                |    96 +-
 source/common/primitives.h                  |    24 +-
 source/common/quant.cpp                     |    83 +-
 source/common/quant.h                       |    18 +-
 source/common/scalinglist.cpp               |     2 +-
 source/common/scalinglist.h                 |     2 +-
 source/common/shortyuv.cpp                  |     2 +-
 source/common/shortyuv.h                    |     2 +-
 source/common/slice.cpp                     |     2 +-
 source/common/slice.h                       |     2 +-
 source/common/threading.cpp                 |    16 +-
 source/common/threading.h                   |     4 +-
 source/common/threadpool.cpp                |     4 +-
 source/common/threadpool.h                  |     4 +-
 source/common/vec/dct-sse3.cpp              |     4 +-
 source/common/vec/dct-sse41.cpp             |     4 +-
 source/common/vec/dct-ssse3.cpp             |     4 +-
 source/common/vec/vec-primitives.cpp        |     2 +-
 source/common/version.cpp                   |    59 +-
 source/common/wavefront.cpp                 |     2 +-
 source/common/wavefront.h                   |     4 +-
 source/common/winxp.cpp                     |     4 +-
 source/common/winxp.h                       |    16 +-
 source/common/x86/asm-primitives.cpp        |  4474 +++++++-----
 source/common/x86/blockcopy8.h              |   254 +-
 source/common/x86/const-a.asm               |    23 +-
 source/common/x86/dct8.asm                  |   142 +-
 source/common/x86/dct8.h                    |    36 +-
 source/common/x86/intrapred.h               |   308 +-
 source/common/x86/intrapred16.asm           |  9143 +++++++++++++++++++++++++-
 source/common/x86/intrapred8.asm            |  1808 +++-
 source/common/x86/ipfilter16.asm            |  6161 ++++++++++++++++++-
 source/common/x86/ipfilter8.asm             |  2970 +++++++-
 source/common/x86/ipfilter8.h               |   928 +--
 source/common/x86/loopfilter.asm            |  1009 ++
 source/common/x86/loopfilter.h              |    32 +-
 source/common/x86/mc-a.asm                  |  1212 +++-
 source/common/x86/mc.h                      |    33 +-
 source/common/x86/pixel-a.asm               |   521 +-
 source/common/x86/pixel-util.h              |   135 +-
 source/common/x86/pixel-util8.asm           |   957 ++-
 source/common/x86/pixel.h                   |   281 +-
 source/common/x86/sad-a.asm                 |   106 +-
 source/common/x86/sad16-a.asm               |   680 ++-
 source/common/x86/ssd-a.asm                 |   124 +-
 source/common/x86/x86inc.asm                |     2 +-
 source/common/yuv.cpp                       |     2 +-
 source/common/yuv.h                         |     2 +-
 source/encoder/analysis.cpp                 |   283 +-
 source/encoder/analysis.h                   |     6 +-
 source/encoder/api.cpp                      |   174 +-
 source/encoder/bitcost.cpp                  |     2 +-
 source/encoder/bitcost.h                    |     2 +-
 source/encoder/dpb.cpp                      |     2 +-
 source/encoder/dpb.h                        |     2 +-
 source/encoder/encoder.cpp                  |   516 +-
 source/encoder/encoder.h                    |     9 +-
 source/encoder/entropy.cpp                  |   398 +-
 source/encoder/entropy.h                    |     4 +-
 source/encoder/frameencoder.cpp             |    46 +-
 source/encoder/frameencoder.h               |     3 +-
 source/encoder/framefilter.cpp              |     2 +-
 source/encoder/framefilter.h                |     2 +-
 source/encoder/level.cpp                    |    35 +-
 source/encoder/level.h                      |     2 +-
 source/encoder/motion.cpp                   |    36 +-
 source/encoder/motion.h                     |     2 +-
 source/encoder/nal.cpp                      |     2 +-
 source/encoder/nal.h                        |     2 +-
 source/encoder/ratecontrol.cpp              |    28 +-
 source/encoder/ratecontrol.h                |    21 +-
 source/encoder/rdcost.h                     |     2 +-
 source/encoder/reference.cpp                |     2 +-
 source/encoder/reference.h                  |     2 +-
 source/encoder/sao.cpp                      |   188 +-
 source/encoder/sao.h                        |     6 +-
 source/encoder/search.cpp                   |    57 +-
 source/encoder/search.h                     |    15 +-
 source/encoder/sei.cpp                      |     2 +-
 source/encoder/sei.h                        |     2 +-
 source/encoder/slicetype.cpp                |     6 +-
 source/encoder/slicetype.h                  |     2 +-
 source/encoder/weightPrediction.cpp         |     4 +-
 source/filters/filters.cpp                  |     2 +
 source/input/input.cpp                      |     2 +-
 source/input/input.h                        |     4 +-
 source/input/y4m.cpp                        |     2 +-
 source/input/y4m.h                          |     2 +-
 source/input/yuv.cpp                        |     2 +-
 source/input/yuv.h                          |     2 +-
 source/output/output.cpp                    |     2 +-
 source/output/output.h                      |     2 +-
 source/output/raw.cpp                       |     2 +-
 source/output/raw.h                         |     2 +-
 source/output/reconplay.cpp                 |     2 +-
 source/output/reconplay.h                   |     2 +-
 source/output/y4m.cpp                       |     2 +-
 source/output/y4m.h                         |     2 +-
 source/output/yuv.cpp                       |     2 +-
 source/output/yuv.h                         |     2 +-
 source/profile/vtune/vtune.cpp              |     2 +-
 source/profile/vtune/vtune.h                |     2 +-
 source/test/intrapredharness.cpp            |    46 +-
 source/test/intrapredharness.h              |     9 +
 source/test/ipfilterharness.cpp             |     2 +-
 source/test/mbdstharness.cpp                |     2 +-
 source/test/pixelharness.cpp                |   380 +-
 source/test/pixelharness.h                  |     4 +
 source/test/regression-tests.txt            |    26 +-
 source/test/smoke-tests.txt                 |     4 +-
 source/test/testbench.cpp                   |     8 +-
 source/test/testharness.h                   |     2 +-
 source/x265.cpp                             |   254 +-
 source/x265.def.in                          |     1 +
 source/x265.h                               |   143 +-
 source/x265cli.h                            |    23 +-
 163 files changed, 29003 insertions(+), 6474 deletions(-)

diffs (truncated from 41696 to 300 lines):

diff -r cdbfc7d0b067 -r 68d089360477 build/linux/multilib.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build/linux/multilib.sh	Wed Jul 01 14:51:36 2015 +0530
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+mkdir -p 8bit 10bit
+
+cd 10bit
+cmake ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF
+make
+cp libx265.a ../8bit/libx265_main10.a
+
+cd ../8bit
+cmake ../../../source -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=ON -DEXTRA_LIB=x265_main10.a -DEXTRA_LINK_FLAGS=-L.
+make
diff -r cdbfc7d0b067 -r 68d089360477 build/msys/multilib.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build/msys/multilib.sh	Wed Jul 01 14:51:36 2015 +0530
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+mkdir -p 8bit 10bit
+
+cd 10bit
+cmake -G "MSYS Makefiles" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF
+make
+cp libx265.a ../8bit/libx265_main10.a
+
+cd ../8bit
+cmake -G "MSYS Makefiles" ../../../source -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=ON -DEXTRA_LIB=x265_main10.a -DEXTRA_LINK_FLAGS=-L.
+make
diff -r cdbfc7d0b067 -r 68d089360477 build/vc10-x86_64/multilib.bat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build/vc10-x86_64/multilib.bat	Wed Jul 01 14:51:36 2015 +0530
@@ -0,0 +1,34 @@
+ at echo off
+if "%VS100COMNTOOLS%" == "" (
+  msg "%username%" "Visual Studio 10 not detected"
+  exit 1
+)
+
+ at mkdir 10bit
+ at mkdir 8bit
+
+ at cd 10bit
+if not exist x265.sln (
+  cmake  -G "Visual Studio 10 Win64" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF
+)
+if exist x265.sln (
+  call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat"
+  MSBuild /property:Configuration="Release" x265.sln
+  copy/y Release\x265-static.lib ..\8bit\x265-static-main10.lib
+)
+ at cd ..
+
+ at cd 8bit
+if not exist x265-static-main10.lib (
+  msg "%username%" "10bit build failured"
+  exit 1
+)
+if not exist x265.sln (
+  cmake  -G "Visual Studio 10 Win64" ../../../source -DHIGH_BIT_DEPTH=OFF -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=ON -DEXTRA_LIB=x265-static-main10.lib -DEXTRA_LINK_FLAGS="/FORCE:MULTIPLE"
+)
+if exist x265.sln (
+  call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat"
+  MSBuild /property:Configuration="Release" x265.sln
+  copy/y Release\x265.exe ..
+)
+ at cd ..
diff -r cdbfc7d0b067 -r 68d089360477 build/vc11-x86_64/multilib.bat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build/vc11-x86_64/multilib.bat	Wed Jul 01 14:51:36 2015 +0530
@@ -0,0 +1,34 @@
+ at echo off
+if "%VS110COMNTOOLS%" == "" (
+  msg "%username%" "Visual Studio 11 not detected"
+  exit 1
+)
+
+ at mkdir 10bit
+ at mkdir 8bit
+
+ at cd 10bit
+if not exist x265.sln (
+  cmake  -G "Visual Studio 11 Win64" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF
+)
+if exist x265.sln (
+  call "%VS110COMNTOOLS%\..\..\VC\vcvarsall.bat"
+  MSBuild /property:Configuration="Release" x265.sln
+  copy/y Release\x265-static.lib ..\8bit\x265-static-main10.lib
+)
+ at cd ..
+
+ at cd 8bit
+if not exist x265-static-main10.lib (
+  msg "%username%" "10bit build failured"
+  exit 1
+)
+if not exist x265.sln (
+  cmake  -G "Visual Studio 11 Win64" ../../../source -DHIGH_BIT_DEPTH=OFF -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=ON -DEXTRA_LIB=x265-static-main10.lib -DEXTRA_LINK_FLAGS="/FORCE:MULTIPLE"
+)
+if exist x265.sln (
+  call "%VS110COMNTOOLS%\..\..\VC\vcvarsall.bat"
+  MSBuild /property:Configuration="Release" x265.sln
+  copy/y Release\x265.exe ..
+)
+ at cd ..
diff -r cdbfc7d0b067 -r 68d089360477 build/vc12-x86_64/multilib.bat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build/vc12-x86_64/multilib.bat	Wed Jul 01 14:51:36 2015 +0530
@@ -0,0 +1,34 @@
+ at echo off
+if "%VS120COMNTOOLS%" == "" (
+  msg "%username%" "Visual Studio 12 not detected"
+  exit 1
+)
+
+ at mkdir 10bit
+ at mkdir 8bit
+
+ at cd 10bit
+if not exist x265.sln (
+  cmake  -G "Visual Studio 12 Win64" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF
+)
+if exist x265.sln (
+  call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat"
+  MSBuild /property:Configuration="Release" x265.sln
+  copy/y Release\x265-static.lib ..\8bit\x265-static-main10.lib
+)
+ at cd ..
+
+ at cd 8bit
+if not exist x265-static-main10.lib (
+  msg "%username%" "10bit build failured"
+  exit 1
+)
+if not exist x265.sln (
+  cmake  -G "Visual Studio 12 Win64" ../../../source -DHIGH_BIT_DEPTH=OFF -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=ON -DEXTRA_LIB=x265-static-main10.lib -DEXTRA_LINK_FLAGS="/FORCE:MULTIPLE"
+)
+if exist x265.sln (
+  call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat"
+  MSBuild /property:Configuration="Release" x265.sln
+  copy/y Release\x265.exe ..
+)
+ at cd ..
diff -r cdbfc7d0b067 -r 68d089360477 build/vc9-x86_64/multilib.bat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build/vc9-x86_64/multilib.bat	Wed Jul 01 14:51:36 2015 +0530
@@ -0,0 +1,34 @@
+ at echo off
+if "%VS90COMNTOOLS%" == "" (
+  msg "%username%" "Visual Studio 9 not detected"
+  exit 1
+)
+
+ at mkdir 10bit
+ at mkdir 8bit
+
+ at cd 10bit
+if not exist x265.sln (
+  cmake  -G "Visual Studio 9 2008 Win64" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF
+)
+if exist x265.sln (
+  call "%VS90COMNTOOLS%\..\..\VC\vcvarsall.bat"
+  MSBuild /property:Configuration="Release" x265.sln
+  copy/y Release\x265-static.lib ..\8bit\x265-static-main10.lib
+)
+ at cd ..
+
+ at cd 8bit
+if not exist x265-static-main10.lib (
+  msg "%username%" "main10 build failured"
+  exit 1
+)
+if not exist x265.sln (
+  cmake  -G "Visual Studio 9 2008 Win64" ../../../source -DHIGH_BIT_DEPTH=OFF -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=ON -DEXTRA_LIB=x265-static-main10.lib -DEXTRA_LINK_FLAGS="/FORCE:MULTIPLE"
+)
+if exist x265.sln (
+  call "%VS90COMNTOOLS%\..\..\VC\vcvarsall.bat"
+  MSBuild /property:Configuration="Release" x265.sln
+  copy/y Release\x265.exe ..
+)
+ at cd ..
diff -r cdbfc7d0b067 -r 68d089360477 doc/reST/api.rst
--- a/doc/reST/api.rst	Thu Jun 18 15:49:48 2015 +0530
+++ b/doc/reST/api.rst	Wed Jul 01 14:51:36 2015 +0530
@@ -41,9 +41,9 @@ string identifying the compiler and buil
 x265 will accept input pixels of any depth between 8 and 16 bits
 regardless of the depth of its internal pixels (8 or 10).  It will shift
 and mask input pixels as required to reach the internal depth. If
-downshifting is being performed using our CLI application, the
-:option:`--dither` option may be enabled to reduce banding. This feature
-is not available through the C interface.
+downshifting is being performed using our CLI application (to 8 bits),
+the :option:`--dither` option may be enabled to reduce banding. This
+feature is not available through the C interface.
 
 Encoder
 =======
@@ -190,7 +190,7 @@ changes made to the parameters for auto-
 	 *      presets is not recommended without a more fine-grained breakdown of
 	 *      parameters to take this into account. */
 	int x265_encoder_reconfig(x265_encoder *, x265_param *);
-	
+
 Pictures
 ========
 
@@ -338,13 +338,8 @@ statistics from the encoder::
 Cleanup
 =======
 
-At the end of the encode, the application will want to trigger logging
-of the final encode statistics, if :option:`--csv` had been specified::
-
 	/* x265_encoder_log:
-	 *       write a line to the configured CSV file.  If a CSV filename was not
-	 *       configured, or file open failed, or the log level indicated frame level
-	 *       logging, this function will perform no write. */
+	 *       This function is now deprecated */
 	void x265_encoder_log(x265_encoder *encoder, int argc, char **argv);
 
 Finally, the encoder must be closed in order to free all of its
@@ -370,52 +365,163 @@ CTU size::
 Multi-library Interface
 =======================
 
-If your application might want to make a runtime selection between
-a number of libx265 libraries (perhaps 8bpp and 16bpp), then you will
-want to use the multi-library interface.
+If your application might want to make a runtime selection between a
+number of (static or dynamically linked) libx265 libraries, then you
+will want to use one of these bit-depth introspection interfaces.
 
-Instead of directly using all of the **x265_** methods documented
-above, you query an x265_api structure from your libx265 and then use
-the function pointers within that structure of the same name, but
-without the **x265_** prefix. So **x265_param_default()** becomes
-**api->param_default()**. The key method is x265_api_get()::
+Instead of directly using all of the **x265_** methods documented above,
+you query an x265_api structure from your libx265 and then use the
+function pointers of the same name (minus the **x265_** prefix) within
+that structure.  For instance **x265_param_default()** becomes
+**api->param_default()**.
 
-    /* x265_api_get:
-     *   Retrieve the programming interface for a linked x265 library.
-     *   May return NULL if no library is available that supports the
-     *   requested bit depth. If bitDepth is 0, the function is guarunteed
-     *   to return a non-NULL x265_api pointer from the system default
-     *   libx265 */
-    const x265_api* x265_api_get(int bitDepth);
+x265_api_get
+------------
 
-Note that using this multi-library API in your application is only the
-first step.
+The first bit-depth instrospecton method is x265_api_get(). It designed
+for applications that might statically link with libx265, or will at
+least be tied to a particular SONAME or API version::
 
-Your application must link to one build of libx265 (statically or 
-dynamically) and this linked version of libx265 will support one 
-bit-depth (8 or 10 bits). 
+	/* x265_api_get:
+	 *   Retrieve the programming interface for a linked x265 library.
+	 *   May return NULL if no library is available that supports the
+	 *   requested bit depth. If bitDepth is 0, the function is guarunteed
+	 *   to return a non-NULL x265_api pointer from the system default
+	 *   libx265 */
+	const x265_api* x265_api_get(int bitDepth);
 
-Your application must now request the API for the bitDepth you would 
-prefer the encoder to use (8 or 10). If the requested bitdepth is zero, 
-or if it matches the bitdepth of the system default libx265 (the 
-currently linked library), then this library will be used for encode.
-If you request a different bit-depth, the linked libx265 will attempt 
-to dynamically bind a shared library with a name appropriate for the 
-requested bit-depth:
+Like **x265_encoder_encode()**, this function has the build number
+automatically appended to the function name via macros. This ties your
+application to a particular binary API version of libx265 (the one you
+compile against). If you attempt to link with a libx265 with a different
+API version number, the link will fail.
 
-    8-bit:  libx265_main.dll
-    10-bit: libx265_main10.dll
+Obviously this has no meaningful effect on applications which statically
+link to libx265.
 
-    (the shared library extension is obviously platform specific. On
-    Linux it is .so while on Mac it is .dylib)
+x265_api_query
+--------------
+
+The second bit-depth introspection method is designed for applications
+which need more flexibility in API versioning.  If you use
+**x265_api_query()** and dynamically link to libx265 at runtime (using
+dlopen() on POSIX or LoadLibrary() on Windows) your application is no


More information about the x265-commits mailing list