[x265-commits] [x265] encoder: use more portable %PRIu64, define __STDC_FORMAT_...

Steve Borho steve at borho.org
Fri Nov 29 06:31:03 CET 2013


details:   http://hg.videolan.org/x265/rev/13f60881bf01
branches:  stable
changeset: 5354:13f60881bf01
user:      Steve Borho <steve at borho.org>
date:      Wed Nov 27 18:55:24 2013 -0600
description:
encoder: use more portable %PRIu64, define __STDC_FORMAT_MACROS

Older GCC versions and clang require __STDC_FORMAT_MACROS to be defined prior to
including stdint.h when compiling for C++, in order for PRIu64 and friends to be
defined
Subject: [x265] aq: Bug Fixes in aq , ssim when ctu size is not set as 64.

details:   http://hg.videolan.org/x265/rev/6eb45b5bf181
branches:  stable
changeset: 5355:6eb45b5bf181
user:      Aarthi Thirumalai
date:      Wed Nov 27 15:43:03 2013 +0530
description:
aq: Bug Fixes in aq , ssim when ctu size is not set as 64.

1.Calculate qp offset for CU based maxCuSize set in FrameEncoder::calcQpForCu
2.Fix height for ssim computation based on maxCuHeight in FrameFilter::processRowPost
Subject: [x265] Fix to eliminate unwanted application of weight in some (ref, enc) pairs

details:   http://hg.videolan.org/x265/rev/bfd5204ef226
branches:  stable
changeset: 5356:bfd5204ef226
user:      Shazeb Nawaz Khan <shazeb at multicorewareinc.com>
date:      Wed Nov 27 17:39:15 2013 +0530
description:
Fix to eliminate unwanted application of weight in some (ref, enc) pairs
Subject: [x265] encoder: change default frameNumThreads for 4-core HT CPUs to 3

details:   http://hg.videolan.org/x265/rev/f92e0c49a9f0
branches:  stable
changeset: 5357:f92e0c49a9f0
user:      Steve Borho <steve at borho.org>
date:      Wed Nov 27 20:50:08 2013 -0600
description:
encoder: change default frameNumThreads for 4-core HT CPUs to 3
Subject: [x265] RD: change cost measurements for inter

details:   http://hg.videolan.org/x265/rev/0ab1c01bf952
branches:  
changeset: 5358:0ab1c01bf952
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Thu Nov 28 11:44:43 2013 +0530
description:
RD: change cost measurements for inter

The cost calculation for inter modes now use cost = satd(orig, pred) + lambda*mebits.
This is an estimation to the actual RD-cost.
Subject: [x265] RD: use sa8d in inter/merge cost measurements instead of satd

details:   http://hg.videolan.org/x265/rev/0c2a9f913c0b
branches:  
changeset: 5359:0c2a9f913c0b
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Thu Nov 28 12:26:46 2013 +0530
description:
RD: use sa8d in inter/merge cost measurements instead of satd
Subject: [x265] merge2nx2n: move initializations out of the loop

details:   http://hg.videolan.org/x265/rev/f516ff5d6af3
branches:  
changeset: 5360:f516ff5d6af3
user:      Deepthi Devaki <deepthidevaki at multicorewareinc.com>
date:      Wed Nov 27 17:51:50 2013 +0530
description:
merge2nx2n: move initializations out of the loop

Only mergeIndex and MVs will be changed in each loop.
Subject: [x265] RD merge: remove more redundant set-fields

details:   http://hg.videolan.org/x265/rev/54379de63b85
branches:  
changeset: 5361:54379de63b85
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Thu Nov 28 13:36:10 2013 +0530
description:
RD merge: remove more redundant set-fields
Subject: [x265] RD merge: remove earlyDetectionSkip, output is unchanged.

details:   http://hg.videolan.org/x265/rev/ca8c57f0c532
branches:  
changeset: 5362:ca8c57f0c532
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Thu Nov 28 13:52:19 2013 +0530
description:
RD merge: remove earlyDetectionSkip, output is unchanged.
Subject: [x265] RD merge: add in early-skip param.

details:   http://hg.videolan.org/x265/rev/2ba6c26c9feb
branches:  
changeset: 5363:2ba6c26c9feb
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Thu Nov 28 15:04:04 2013 +0530
description:
RD merge: add in early-skip param.
Subject: [x265] cmake: gcc flag introspection to fix Mac OS X 10.6 build

details:   http://hg.videolan.org/x265/rev/38719294293f
branches:  stable
changeset: 5364:38719294293f
user:      Steve Borho <steve at borho.org>
date:      Thu Nov 28 02:39:14 2013 -0600
description:
cmake: gcc flag introspection to fix Mac OS X 10.6 build
Subject: [x265] RD merge: refine merge costs with estimated merge mode bits.

details:   http://hg.videolan.org/x265/rev/42892f4f4cc2
branches:  
changeset: 5365:42892f4f4cc2
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Thu Nov 28 15:24:52 2013 +0530
description:
RD merge: refine merge costs with estimated merge mode bits.
Subject: [x265] presets: modifications to smoothen the performance-efficiency plot.

details:   http://hg.videolan.org/x265/rev/bcc0941f67b3
branches:  stable
changeset: 5366:bcc0941f67b3
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Fri Nov 29 09:58:04 2013 +0530
description:
presets: modifications to smoothen the performance-efficiency plot.
Subject: [x265] vec: tab to spaces

details:   http://hg.videolan.org/x265/rev/2456d360a4ce
branches:  stable
changeset: 5367:2456d360a4ce
user:      Steve Borho <steve at borho.org>
date:      Thu Nov 28 13:26:25 2013 -0600
description:
vec: tab to spaces
Subject: [x265] Merge with stable

details:   http://hg.videolan.org/x265/rev/e7a5780843de
branches:  
changeset: 5368:e7a5780843de
user:      Steve Borho <steve at borho.org>
date:      Thu Nov 28 23:30:16 2013 -0600
description:
Merge with stable

diffstat:

 source/CMakeLists.txt                |    10 +-
 source/Lib/TLibEncoder/TEncCu.h      |     2 +-
 source/common/CMakeLists.txt         |     2 +-
 source/common/common.cpp             |   132 +--
 source/common/pixel.cpp              |     2 +
 source/common/vec/dct-sse3.cpp       |     1 -
 source/common/vec/intra-sse41.cpp    |    68 -
 source/common/vec/pixel-ssse3.cpp    |    42 -
 source/common/vec/vec-primitives.cpp |     2 +
 source/common/x86/asm-primitives.cpp |    31 +-
 source/common/x86/const-a.asm        |     2 +
 source/common/x86/dct8.asm           |    91 ++
 source/common/x86/dct8.h             |     1 +
 source/common/x86/intrapred.asm      |    92 ++-
 source/common/x86/intrapred.h        |     1 +
 source/common/x86/pixel-a.asm        |  1249 +++++++++++++++++++++++++++++----
 source/common/x86/pixel.h            |    20 +-
 source/encoder/compress.cpp          |    98 +-
 source/encoder/encoder.cpp           |     7 +-
 source/encoder/frameencoder.cpp      |    18 +-
 source/encoder/framefilter.cpp       |     4 +-
 21 files changed, 1418 insertions(+), 457 deletions(-)

diffs (truncated from 2534 to 300 lines):

diff -r e4baf53cefe8 -r e7a5780843de source/CMakeLists.txt
--- a/source/CMakeLists.txt	Wed Nov 27 17:53:09 2013 -0600
+++ b/source/CMakeLists.txt	Thu Nov 28 23:30:16 2013 -0600
@@ -10,6 +10,7 @@ project (x265)
 cmake_minimum_required (VERSION 2.8.8) # OBJECT libraries require 2.8.8
 include(CheckIncludeFiles)
 include(CheckFunctionExists)
+include(CheckCXXCompilerFlag)
 
 # X265_BUILD must be incremented each time the public API is changed
 set(X265_BUILD 3)
@@ -75,7 +76,12 @@ elseif(CLANG)
     set(GCC 1)
     add_definitions(-Wall -Wextra -Wshadow -ffast-math)
 elseif(CMAKE_COMPILER_IS_GNUCXX)
-    add_definitions(-Wall -Wextra -Wshadow -mstackrealign -ffast-math)
+    add_definitions(-Wall -Wextra -Wshadow -ffast-math)
+    check_cxx_compiler_flag(-Wno-narrowing GCC_HAS_NO_NARROWING) 
+    check_cxx_compiler_flag(-mstackrealign GCC_HAS_STACK_REALIGN) 
+    if (GCC_HAS_STACK_REALIGN)
+        add_definitions(-mstackrealign)
+    endif()
     execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
     if(NOT GCC_VERSION VERSION_LESS 4.7)
         # this is necessary to avoid name conflicts in vector class
@@ -197,7 +203,7 @@ set_target_properties(x265-shared PROPER
 if(NOT MSVC)
     set_target_properties(x265-static PROPERTIES OUTPUT_NAME x265)
 endif()
-if(UNIX AND NOT CLANG)
+if(UNIX AND NOT APPLE)
     set_target_properties(x265-shared PROPERTIES LINK_FLAGS "-Wl,-Bsymbolic")
 endif()
 # WIN32 builds static: x265-static.lib  shared: x265.dll + x265.lib (shim loader)
diff -r e4baf53cefe8 -r e7a5780843de source/Lib/TLibEncoder/TEncCu.h
--- a/source/Lib/TLibEncoder/TEncCu.h	Wed Nov 27 17:53:09 2013 -0600
+++ b/source/Lib/TLibEncoder/TEncCu.h	Thu Nov 28 23:30:16 2013 -0600
@@ -171,7 +171,7 @@ protected:
     void xComputeCostIntraInInter(TComDataCU* cu, PartSize partSize);
     void xCheckRDCostInter(TComDataCU*& outBestCU, TComDataCU*& outTempCU, PartSize partSize, bool bUseMRG = false);
     void xComputeCostInter(TComDataCU* outTempCU, TComYuv* outPredYUV, PartSize partSize, bool bUseMRG = false);
-    void xComputeCostMerge2Nx2N(TComDataCU*& outBestCU, TComDataCU*& outTempCU, bool* earlyDetectionSkip, TComYuv*& bestPredYuv, TComYuv*& tmpPredYuv);
+    void xComputeCostMerge2Nx2N(TComDataCU*& outBestCU, TComDataCU*& outTempCU, TComYuv*& bestPredYuv, TComYuv*& tmpPredYuv);
     void xEncodeIntraInInter(TComDataCU* cu, TComYuv* fencYuv, TComYuv* predYuv, TShortYUV* outResiYuv, TComYuv* outReconYuv);
     void xCheckRDCostIntra(TComDataCU*& outBestCU, TComDataCU*& outTempCU, PartSize partSize);
     void xCheckRDCostIntraInInter(TComDataCU*& outBestCU, TComDataCU*& outTempCU, PartSize partSize);
diff -r e4baf53cefe8 -r e7a5780843de source/common/CMakeLists.txt
--- a/source/common/CMakeLists.txt	Wed Nov 27 17:53:09 2013 -0600
+++ b/source/common/CMakeLists.txt	Thu Nov 28 23:30:16 2013 -0600
@@ -137,7 +137,7 @@ if(GCC)
         # force gcc to generate code for sync primitives
         set_source_files_properties(threadpool.cpp reference.cpp wavefront.cpp common.cpp PROPERTIES COMPILE_FLAGS -march=i686)
     endif()
-    if (NOT CLANG AND NOT INTEL_CXX)
+    if (GCC_HAS_NO_NARROWING)
         set_source_files_properties(cpu.cpp PROPERTIES COMPILE_FLAGS -Wno-narrowing)
     endif()
 endif(GCC)
diff -r e4baf53cefe8 -r e7a5780843de source/common/common.cpp
--- a/source/common/common.cpp	Wed Nov 27 17:53:09 2013 -0600
+++ b/source/common/common.cpp	Thu Nov 28 23:30:16 2013 -0600
@@ -161,10 +161,10 @@ void x265_param_default(x265_param *para
     param->keyframeMin = 0;
     param->keyframeMax = 250;
     param->bOpenGOP = 0;
-    param->bframes = 3;
-    param->lookaheadDepth = 40;
-    param->bFrameAdaptive = X265_B_ADAPT_FAST;
-    param->bpyramid = 1;
+    param->bframes = 4;
+    param->lookaheadDepth = 20;
+    param->bFrameAdaptive = X265_B_ADAPT_TRELLIS;
+    param->bpyramid = 2;
     param->scenecutThreshold = 40; /* Magic number pulled in from x264 */
 
     /* Intra Coding Tools */
@@ -172,10 +172,10 @@ void x265_param_default(x265_param *para
     param->bEnableStrongIntraSmoothing = 1;
 
     /* Inter Coding tools */
-    param->searchMethod = X265_STAR_SEARCH;
-    param->subpelRefine = 5;
+    param->searchMethod = X265_HEX_SEARCH;
+    param->subpelRefine = 2;
     param->searchRange = 60;
-    param->maxNumMergeCand = 3;
+    param->maxNumMergeCand = 2;
     param->bEnableWeightedPred = 1;
     param->bEnableWeightedBiPred = 0;
     param->bEnableEarlySkip = 0;
@@ -185,10 +185,10 @@ void x265_param_default(x265_param *para
     param->rdLevel = X265_NO_RDO_NO_RDOQ;
     param->bEnableRDO = 0;
     param->bEnableRDOQ = 0;
-    param->bEnableRDOQTS = 1;
+    param->bEnableRDOQTS = 0;
     param->bEnableSignHiding = 1;
     param->bEnableTransformSkip = 0;
-    param->bEnableTSkipFast = 1;
+    param->bEnableTSkipFast = 0;
     param->maxNumReferences = 3;
     
     /* Loop Filter */
@@ -276,20 +276,17 @@ int x265_param_default_preset(x265_param
         {
             param->lookaheadDepth = 10;
             param->maxCUSize = 32;
-            param->searchRange = 24;
+            param->searchRange = 28;
             param->bFrameAdaptive = 0;
-            param->bframes = 4;
-            param->tuQTMaxInterDepth = 1;
-            param->tuQTMaxIntraDepth = 1;
+            param->bpyramid = 1;
             param->subpelRefine = 0;
             param->maxNumMergeCand = 2;
             param->searchMethod = X265_DIA_SEARCH;
             param->bEnableRectInter = 0;
             param->bEnableAMP = 0;
-            param->bEnableTransformSkip = 0;
             param->bEnableEarlySkip = 1;
             param->bEnableCbfFastMode = 1;
-            param->bEnableLoopFilter = 0;
+            param->bEnableLoopFilter = 1;
             param->bEnableSAO = 0;
             param->bEnableSignHiding = 0;
             param->bEnableWeightedPred = 0;
@@ -299,67 +296,47 @@ int x265_param_default_preset(x265_param
         {
             param->lookaheadDepth = 10;
             param->maxCUSize = 32;
-            param->searchRange = 24;
+            param->searchRange = 44;
             param->bFrameAdaptive = 0;
-            param->bframes = 4;
-            param->tuQTMaxInterDepth = 1;
-            param->tuQTMaxIntraDepth = 1;
+            param->bpyramid = 1;
             param->subpelRefine = 1;
-            param->maxNumMergeCand = 2;
-            param->searchMethod = X265_HEX_SEARCH;
             param->bEnableRectInter = 0;
             param->bEnableAMP = 0;
-            param->bEnableTransformSkip = 0;
             param->bEnableEarlySkip = 1;
             param->bEnableCbfFastMode = 1;
-            param->bEnableSAO = 0;
-            param->bEnableSignHiding = 0;
+            param->bEnableWeightedPred = 0;
             param->maxNumReferences = 1;
         }
         else if (!strcmp(preset, "veryfast"))
         {
-            param->lookaheadDepth = 10;
-            param->bFrameAdaptive = 1;
-            param->tuQTMaxInterDepth = 1;
-            param->tuQTMaxIntraDepth = 1;
+            param->lookaheadDepth = 15;
+            param->maxCUSize = 32;
+            param->bFrameAdaptive = 0;
+            param->bpyramid = 1;
             param->subpelRefine = 1;
-            param->searchMethod = X265_HEX_SEARCH;
-            param->maxNumMergeCand = 2;
             param->bEnableRectInter = 0;
             param->bEnableAMP = 0;
-            param->bEnableTransformSkip = 0;
             param->bEnableEarlySkip = 1;
             param->bEnableCbfFastMode = 1;
             param->maxNumReferences = 1;            
         }
         else if (!strcmp(preset, "faster"))
         {
-            param->lookaheadDepth = 20;
-            param->bFrameAdaptive = 1;
-            param->tuQTMaxInterDepth = 1;
-            param->tuQTMaxIntraDepth = 1;
-            param->subpelRefine = 2;
-            param->searchMethod = X265_HEX_SEARCH;
-            param->maxNumMergeCand = 2;
+            param->lookaheadDepth = 15;
+            param->bFrameAdaptive = 0;
+            param->bpyramid = 1;
             param->bEnableRectInter = 0;
             param->bEnableAMP = 0;
-            param->bEnableTransformSkip = 0;
-            param->maxNumReferences = 2;
             param->bEnableEarlySkip = 1;
             param->bEnableCbfFastMode = 1;
+            param->maxNumReferences = 1;
         }
         else if (!strcmp(preset, "fast"))
         {
-            param->lookaheadDepth = 20;
-            param->bFrameAdaptive = 1;
-            param->tuQTMaxInterDepth = 1;
-            param->tuQTMaxIntraDepth = 1;
-            param->subpelRefine = 3;
-            param->searchMethod = X265_HEX_SEARCH;
-            param->maxNumMergeCand = 2;
+            param->lookaheadDepth = 15;
+            param->bpyramid = 1;
+            param->bEnableRectInter = 0;
             param->bEnableAMP = 0;
-            param->bEnableTransformSkip = 0;
-            param->maxNumReferences = 2;
         }
         else if (!strcmp(preset, "medium"))
         {
@@ -367,54 +344,51 @@ int x265_param_default_preset(x265_param
         }
         else if (!strcmp(preset, "slow"))
         {
-            param->bFrameAdaptive = 2;
-            param->lookaheadDepth = 50;
-            param->bframes = 4;
-            param->tuQTMaxInterDepth = 1;
-            param->tuQTMaxIntraDepth = 1;
+            param->lookaheadDepth = 25;
+            param->bframes = 8;
+            param->bpyramid = 1;
             param->rdLevel = 1;
-            param->maxNumMergeCand = 4;
-            param->bEnableTransformSkip = 0;
-            param->maxNumReferences = 3;
+            param->subpelRefine = 3;
+            param->maxNumMergeCand = 3;
+            param->searchMethod = X265_STAR_SEARCH;
         }
         else if (!strcmp(preset, "slower"))
         {
-            param->bFrameAdaptive = 2;
-            param->lookaheadDepth = 60;
-            param->bframes = 5;
+            param->lookaheadDepth = 30;
+            param->bframes = 8;
             param->tuQTMaxInterDepth = 2;
             param->tuQTMaxIntraDepth = 2;
             param->rdLevel = 2;
-            param->subpelRefine = 6;
-            param->maxNumMergeCand = 5;
-            param->bEnableTransformSkip = 0;
-            param->maxNumReferences = 3;
+            param->subpelRefine = 3;
+            param->maxNumMergeCand = 3;
+            param->searchMethod = X265_STAR_SEARCH;
         }
         else if (!strcmp(preset, "veryslow"))
         {
-            param->bFrameAdaptive = 2;
-            param->lookaheadDepth = 60;
+            param->lookaheadDepth = 40;
+            param->bframes = 8;
+            param->tuQTMaxInterDepth = 3;
+            param->tuQTMaxIntraDepth = 3;			
             param->rdLevel = 2;
-            param->bframes = 8;
-            param->subpelRefine = 6;
+            param->subpelRefine = 4;
+            param->maxNumMergeCand = 4;
+            param->searchMethod = X265_STAR_SEARCH;
             param->maxNumReferences = 5;
-            param->maxNumMergeCand = 5;
-            param->tuQTMaxInterDepth = 3;
-            param->tuQTMaxIntraDepth = 3;
         }
         else if (!strcmp(preset, "placebo"))
         {
-            param->bFrameAdaptive = 2;
             param->lookaheadDepth = 60;
-            param->bframes = 16;
-            param->rdLevel = 2;
-            param->subpelRefine = 7;
-            param->maxNumReferences = 16;
-            param->searchRange = 124;
-            param->bEnableTSkipFast = 0;
-            param->maxNumMergeCand = 5;
+            param->searchRange = 92;
+            param->bframes = 8;
             param->tuQTMaxInterDepth = 4;
             param->tuQTMaxIntraDepth = 4;
+            param->rdLevel = 2;
+            param->subpelRefine = 5;
+            param->maxNumMergeCand = 5;
+            param->searchMethod = X265_STAR_SEARCH;
+            param->bEnableTransformSkip = 1;
+            param->bEnableRDOQTS = 1;
+            param->maxNumReferences = 5;
             // TODO: optimized esa
         }
         else
diff -r e4baf53cefe8 -r e7a5780843de source/common/pixel.cpp
--- a/source/common/pixel.cpp	Wed Nov 27 17:53:09 2013 -0600
+++ b/source/common/pixel.cpp	Thu Nov 28 23:30:16 2013 -0600
@@ -985,6 +985,8 @@ void Setup_C_PixelPrimitives(EncoderPrim
 
     p.var[BLOCK_8x8] = pixel_var<8>;
     p.var[BLOCK_16x16] = pixel_var<16>;
+    p.var[BLOCK_32x32] = pixel_var<32>;
+    p.var[BLOCK_64x64] = pixel_var<64>;


More information about the x265-commits mailing list