[x265-commits] [x265] Removed Encoder::m_csp and replaced it with x265_param::i...

David T Yuen dtyx265 at gmail.com
Thu Mar 6 01:20:02 CET 2014


details:   http://hg.videolan.org/x265/rev/91936aab5ae9
branches:  
changeset: 6385:91936aab5ae9
user:      David T Yuen <dtyx265 at gmail.com>
date:      Tue Mar 04 19:26:44 2014 -0800
description:
Removed Encoder::m_csp and replaced it with x265_param::internalCsp
Subject: [x265] asm: enable 10bit chroma_vpp and chroma_vps interpolation filters

details:   http://hg.videolan.org/x265/rev/c40c379f283c
branches:  
changeset: 6386:c40c379f283c
user:      Murugan Vairavel <murugan at multicorewareinc.com>
date:      Wed Mar 05 18:50:26 2014 +0530
description:
asm: enable 10bit chroma_vpp and chroma_vps interpolation filters
Subject: [x265] cmake: add i686 to x86 alias list (closes #33)

details:   http://hg.videolan.org/x265/rev/6d55869ed5e2
branches:  
changeset: 6387:6d55869ed5e2
user:      Steve Borho <steve at borho.org>
date:      Wed Mar 05 11:48:14 2014 -0600
description:
cmake: add i686 to x86 alias list (closes #33)
Subject: [x265] api: change meaning of pic.stride to be in bytes rather than pixels (fixes #35)

details:   http://hg.videolan.org/x265/rev/eadec14402d6
branches:  
changeset: 6388:eadec14402d6
user:      Steve Borho <steve at borho.org>
date:      Wed Mar 05 12:47:18 2014 -0600
description:
api: change meaning of pic.stride to be in bytes rather than pixels (fixes #35)

x264's pic.plane pointer is a uint8_t* so their input strides are byte based,
ffmpeg is currently assuming our input strides are byte based.  This commit
will make that assumption correct.

This fixes non-4:2:0 YUV file read at the same time, and bumps X265_BUIDLD
Subject: [x265] encoder: assign internal colorspce to output pic.colorSpace

details:   http://hg.videolan.org/x265/rev/992b1b9e5cff
branches:  
changeset: 6389:992b1b9e5cff
user:      Steve Borho <steve at borho.org>
date:      Wed Mar 05 17:40:19 2014 -0600
description:
encoder: assign internal colorspce to output pic.colorSpace
Subject: [x265] primitives: cleaned up asm_primitives of intra_pred_ang

details:   http://hg.videolan.org/x265/rev/3272416ac9b0
branches:  
changeset: 6390:3272416ac9b0
user:      Murugan Vairavel <murugan at multicorewareinc.com>
date:      Wed Mar 05 16:36:31 2014 +0530
description:
primitives: cleaned up asm_primitives of intra_pred_ang
Subject: [x265] cmake: use x86 alias list rather than repeated string compares (nit)

details:   http://hg.videolan.org/x265/rev/e7d3835fe752
branches:  
changeset: 6391:e7d3835fe752
user:      Steve Borho <steve at borho.org>
date:      Wed Mar 05 15:52:33 2014 -0600
description:
cmake: use x86 alias list rather than repeated string compares (nit)
Subject: [x265] param: add VBV info to log data

details:   http://hg.videolan.org/x265/rev/081efde65d54
branches:  
changeset: 6392:081efde65d54
user:      Steve Borho <steve at borho.org>
date:      Wed Mar 05 16:12:39 2014 -0600
description:
param: add VBV info to log data
Subject: [x265] cli: move "fps" between resolution and frame rate, same as input file line

details:   http://hg.videolan.org/x265/rev/01547efd182d
branches:  
changeset: 6393:01547efd182d
user:      Steve Borho <steve at borho.org>
date:      Wed Mar 05 16:18:38 2014 -0600
description:
cli: move "fps" between resolution and frame rate, same as input file line

diffstat:

 source/CMakeLists.txt                |   10 +-
 source/Lib/TLibCommon/TComPicYuv.cpp |   18 +-
 source/common/param.cpp              |    5 +
 source/common/x86/asm-primitives.cpp |  388 ++++++++++------------------------
 source/encoder/encoder.cpp           |    8 +-
 source/encoder/encoder.h             |    1 -
 source/encoder/framefilter.cpp       |    6 +-
 source/input/y4m.cpp                 |    7 +-
 source/input/yuv.cpp                 |    9 +-
 source/output/y4m.cpp                |   10 +-
 source/output/yuv.cpp                |   11 +-
 source/x265.cpp                      |    2 +-
 source/x265.h                        |    2 +
 13 files changed, 165 insertions(+), 312 deletions(-)

diffs (truncated from 772 to 300 lines):

diff -r 5cad3652bee8 -r 01547efd182d source/CMakeLists.txt
--- a/source/CMakeLists.txt	Tue Mar 04 20:53:17 2014 -0600
+++ b/source/CMakeLists.txt	Wed Mar 05 16:18:38 2014 -0600
@@ -18,7 +18,7 @@ include(CheckSymbolExists)
 include(CheckCXXCompilerFlag)
 
 # X265_BUILD must be incremented each time the public API is changed
-set(X265_BUILD 8)
+set(X265_BUILD 9)
 configure_file("${PROJECT_SOURCE_DIR}/x265.def.in"
                "${PROJECT_BINARY_DIR}/x265.def")
 configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in"
@@ -28,9 +28,9 @@ SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_
 
 # System architecture detection
 string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSPROC)
-if("${SYSPROC}" STREQUAL "i386"   OR "${SYSPROC}" STREQUAL "amd64" OR
-   "${SYSPROC}" STREQUAL "x86_64" OR "${SYSPROC}" STREQUAL "x86"   OR
-   "${SYSPROC}" STREQUAL "")
+set(X86_ALIASES x86 i386 i686 x86_64 amd64)
+list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
+if("${SYSPROC}" STREQUAL "" OR X86MATCH GREATER "-1")
     message(STATUS "Detected x86 system processor")
     set(X86 1)
     add_definitions(-DX265_ARCH_X86=1)
@@ -38,7 +38,7 @@ if("${SYSPROC}" STREQUAL "i386"   OR "${
         set(X64 1)
         add_definitions(-DX86_64=1)
     endif()
-elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv6l")
+elseif(${SYSPROC} STREQUAL "armv6l")
     message(STATUS "Detected ARM system processor")
     set(ARM 1)
     add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1)
diff -r 5cad3652bee8 -r 01547efd182d source/Lib/TLibCommon/TComPicYuv.cpp
--- a/source/Lib/TLibCommon/TComPicYuv.cpp	Tue Mar 04 20:53:17 2014 -0600
+++ b/source/Lib/TLibCommon/TComPicYuv.cpp	Wed Mar 05 16:18:38 2014 -0600
@@ -205,7 +205,7 @@ void TComPicYuv::copyFromPicture(const x
             }
 
             Y += getStride();
-            y += pic.stride[0];
+            y += pic.stride[0] / sizeof(*y);
         }
 
         for (int r = 0; r < height >> m_vChromaShift; r++)
@@ -218,8 +218,8 @@ void TComPicYuv::copyFromPicture(const x
 
             U += getCStride();
             V += getCStride();
-            u += pic.stride[1];
-            v += pic.stride[2];
+            u += pic.stride[1] / sizeof(*u);
+            v += pic.stride[2] / sizeof(*v);
         }
     }
     else if (pic.bitDepth == 8)
@@ -240,7 +240,7 @@ void TComPicYuv::copyFromPicture(const x
             }
 
             Y += getStride();
-            y += pic.stride[0];
+            y += pic.stride[0] / sizeof(*y);
         }
 
         for (int r = 0; r < height >> m_vChromaShift; r++)
@@ -253,8 +253,8 @@ void TComPicYuv::copyFromPicture(const x
 
             U += getCStride();
             V += getCStride();
-            u += pic.stride[1];
-            v += pic.stride[2];
+            u += pic.stride[1] / sizeof(*u);
+            v += pic.stride[2] / sizeof(*v);
         }
     }
     else /* pic.bitDepth > 8 */
@@ -280,7 +280,7 @@ void TComPicYuv::copyFromPicture(const x
             }
 
             Y += getStride();
-            y += pic.stride[0];
+            y += pic.stride[0] / sizeof(*y);
         }
 
         for (int r = 0; r < height >> m_vChromaShift; r++)
@@ -293,8 +293,8 @@ void TComPicYuv::copyFromPicture(const x
 
             U += getCStride();
             V += getCStride();
-            u += pic.stride[1];
-            v += pic.stride[2];
+            u += pic.stride[1] / sizeof(*u);
+            v += pic.stride[2] / sizeof(*v);
         }
     }
 
diff -r 5cad3652bee8 -r 01547efd182d source/common/param.cpp
--- a/source/common/param.cpp	Tue Mar 04 20:53:17 2014 -0600
+++ b/source/common/param.cpp	Wed Mar 05 16:18:38 2014 -0600
@@ -1119,6 +1119,11 @@ void x265_print_params(x265_param *param
                  param->rc.aqStrength, param->rc.cuTree);
         break;
     }
+    if (param->rc.vbvBufferSize)
+    {
+        x265_log(param, X265_LOG_INFO, "VBV/HRD buffer / max-rate / init    : %d / %d / %d\n",
+                 param->rc.vbvBufferSize, param->rc.vbvMaxBitrate, param->rc.vbvBufferInit);
+    }
 
     x265_log(param, X265_LOG_INFO, "tools: ");
 #define TOOLOPT(FLAG, STR) if (FLAG) fprintf(stderr, "%s ", STR)
diff -r 5cad3652bee8 -r 01547efd182d source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Tue Mar 04 20:53:17 2014 -0600
+++ b/source/common/x86/asm-primitives.cpp	Wed Mar 05 16:18:38 2014 -0600
@@ -710,17 +710,118 @@ extern "C" {
     SETUP_CHROMA_ADDAVG_FUNC_DEF(32, 24, cpu); \
     SETUP_CHROMA_ADDAVG_FUNC_DEF(32, 32, cpu); \
 
+#define SETUP_INTRA_ANG_COMMON(mode, fno, cpu) \
+    p.intra_pred[BLOCK_4x4][mode] = x265_intra_pred_ang4_ ## fno ## _ ## cpu; \
+    p.intra_pred[BLOCK_8x8][mode] = x265_intra_pred_ang8_ ## fno ## _ ## cpu; \
+    p.intra_pred[BLOCK_16x16][mode] = x265_intra_pred_ang16_ ## fno ## _ ## cpu; \
+    p.intra_pred[BLOCK_32x32][mode] = x265_intra_pred_ang32_ ## fno ## _ ## cpu;
+
+#define SETUP_INTRA_ANG(mode, fno, cpu) \
+    p.intra_pred[BLOCK_8x8][mode] = x265_intra_pred_ang8_ ## fno ## _ ## cpu; \
+    p.intra_pred[BLOCK_16x16][mode] = x265_intra_pred_ang16_ ## fno ## _ ## cpu; \
+    p.intra_pred[BLOCK_32x32][mode] = x265_intra_pred_ang32_ ## fno ## _ ## cpu;
+
 #define SETUP_INTRA_ANG4(mode, fno, cpu) \
     p.intra_pred[BLOCK_4x4][mode] = x265_intra_pred_ang4_ ## fno ## _ ## cpu;
-#define SETUP_INTRA_ANG8(mode, fno, cpu) \
+
+#define SETUP_INTRA_ANG16_32(mode, fno, cpu) \
+    p.intra_pred[BLOCK_16x16][mode] = x265_intra_pred_ang16_ ## fno ## _ ## cpu; \
+    p.intra_pred[BLOCK_32x32][mode] = x265_intra_pred_ang32_ ## fno ## _ ## cpu;
+
+#define SETUP_INTRA_ANG4_8(mode, fno, cpu) \
+    p.intra_pred[BLOCK_4x4][mode] = x265_intra_pred_ang4_ ## fno ## _ ## cpu; \
     p.intra_pred[BLOCK_8x8][mode] = x265_intra_pred_ang8_ ## fno ## _ ## cpu;
-#define SETUP_INTRA_ANG16(mode, fno, cpu) \
-    p.intra_pred[BLOCK_16x16][mode] = x265_intra_pred_ang16_ ## fno ## _ ## cpu;
-#define SETUP_INTRA_ANG32(mode, fno, cpu) \
-    p.intra_pred[BLOCK_32x32][mode] = x265_intra_pred_ang32_ ## fno ## _ ## cpu;
+
+#define INTRA_ANG_SSSE3(cpu) \
+    SETUP_INTRA_ANG_COMMON(2, 2, cpu); \
+    SETUP_INTRA_ANG_COMMON(34, 2, cpu);
+
+#define INTRA_ANG_SSE4_COMMON(cpu) \
+    SETUP_INTRA_ANG_COMMON(3,  3,  cpu); \
+    SETUP_INTRA_ANG_COMMON(4,  4,  cpu); \
+    SETUP_INTRA_ANG_COMMON(5,  5,  cpu); \
+    SETUP_INTRA_ANG_COMMON(6,  6,  cpu); \
+    SETUP_INTRA_ANG_COMMON(7,  7,  cpu); \
+    SETUP_INTRA_ANG_COMMON(8,  8,  cpu); \
+    SETUP_INTRA_ANG_COMMON(9,  9,  cpu); \
+    SETUP_INTRA_ANG_COMMON(10, 10, cpu); \
+    SETUP_INTRA_ANG_COMMON(11, 11, cpu); \
+    SETUP_INTRA_ANG_COMMON(12, 12, cpu); \
+    SETUP_INTRA_ANG_COMMON(13, 13, cpu); \
+    SETUP_INTRA_ANG_COMMON(14, 14, cpu); \
+    SETUP_INTRA_ANG_COMMON(15, 15, cpu); \
+    SETUP_INTRA_ANG_COMMON(16, 16, cpu); \
+    SETUP_INTRA_ANG_COMMON(17, 17, cpu); \
+    SETUP_INTRA_ANG_COMMON(18, 18, cpu);
+
+#define INTRA_ANG_SSE4_HIGH(cpu) \
+    SETUP_INTRA_ANG(19, 19, cpu); \
+    SETUP_INTRA_ANG(20, 20, cpu); \
+    SETUP_INTRA_ANG(21, 21, cpu); \
+    SETUP_INTRA_ANG(22, 22, cpu); \
+    SETUP_INTRA_ANG(23, 23, cpu); \
+    SETUP_INTRA_ANG(24, 24, cpu); \
+    SETUP_INTRA_ANG(25, 25, cpu); \
+    SETUP_INTRA_ANG(26, 26, cpu); \
+    SETUP_INTRA_ANG(27, 27, cpu); \
+    SETUP_INTRA_ANG(28, 28, cpu); \
+    SETUP_INTRA_ANG(29, 29, cpu); \
+    SETUP_INTRA_ANG(30, 30, cpu); \
+    SETUP_INTRA_ANG(31, 31, cpu); \
+    SETUP_INTRA_ANG(32, 32, cpu); \
+    SETUP_INTRA_ANG(33, 33, cpu); \
+    SETUP_INTRA_ANG4(19, 17, cpu); \
+    SETUP_INTRA_ANG4(20, 16, cpu); \
+    SETUP_INTRA_ANG4(21, 15, cpu); \
+    SETUP_INTRA_ANG4(22, 14, cpu);\
+    SETUP_INTRA_ANG4(23, 13, cpu); \
+    SETUP_INTRA_ANG4(24, 12, cpu); \
+    SETUP_INTRA_ANG4(25, 11, cpu); \
+    SETUP_INTRA_ANG4(26, 26, cpu); \
+    SETUP_INTRA_ANG4(27, 9, cpu); \
+    SETUP_INTRA_ANG4(28, 8, cpu); \
+    SETUP_INTRA_ANG4(29, 7, cpu); \
+    SETUP_INTRA_ANG4(30, 6, cpu); \
+    SETUP_INTRA_ANG4(31, 5, cpu); \
+    SETUP_INTRA_ANG4(32, 4, cpu); \
+    SETUP_INTRA_ANG4(33, 3, cpu);
+
+#define INTRA_ANG_SSE4(cpu) \
+    SETUP_INTRA_ANG4_8(19, 17, cpu); \
+    SETUP_INTRA_ANG4_8(20, 16, cpu); \
+    SETUP_INTRA_ANG4_8(21, 15, cpu); \
+    SETUP_INTRA_ANG4_8(22, 14, cpu);\
+    SETUP_INTRA_ANG4_8(23, 13, cpu); \
+    SETUP_INTRA_ANG4_8(24, 12, cpu); \
+    SETUP_INTRA_ANG4_8(25, 11, cpu); \
+    SETUP_INTRA_ANG4_8(26, 26, cpu); \
+    SETUP_INTRA_ANG4_8(27, 9, cpu); \
+    SETUP_INTRA_ANG4_8(28, 8, cpu); \
+    SETUP_INTRA_ANG4_8(29, 7, cpu); \
+    SETUP_INTRA_ANG4_8(30, 6, cpu); \
+    SETUP_INTRA_ANG4_8(31, 5, cpu); \
+    SETUP_INTRA_ANG4_8(32, 4, cpu); \
+    SETUP_INTRA_ANG4_8(33, 3, cpu); \
+    SETUP_INTRA_ANG16_32(19, 19, cpu); \
+    SETUP_INTRA_ANG16_32(20, 20, cpu); \
+    SETUP_INTRA_ANG16_32(21, 21, cpu); \
+    SETUP_INTRA_ANG16_32(22, 22, cpu); \
+    SETUP_INTRA_ANG16_32(23, 23, cpu); \
+    SETUP_INTRA_ANG16_32(24, 24, cpu); \
+    SETUP_INTRA_ANG16_32(25, 25, cpu); \
+    SETUP_INTRA_ANG16_32(26, 26, cpu); \
+    SETUP_INTRA_ANG16_32(27, 27, cpu); \
+    SETUP_INTRA_ANG16_32(28, 28, cpu); \
+    SETUP_INTRA_ANG16_32(29, 29, cpu); \
+    SETUP_INTRA_ANG16_32(30, 30, cpu); \
+    SETUP_INTRA_ANG16_32(31, 31, cpu); \
+    SETUP_INTRA_ANG16_32(32, 32, cpu); \
+    SETUP_INTRA_ANG16_32(33, 33, cpu);
 
 #define SETUP_CHROMA_VERT_FUNC_DEF(W, H, cpu) \
     p.chroma[X265_CSP_I420].filter_vss[CHROMA_ ## W ## x ## H] = x265_interp_4tap_vert_ss_ ## W ## x ## H ## cpu; \
+    p.chroma[X265_CSP_I420].filter_vpp[CHROMA_ ## W ## x ## H] = x265_interp_4tap_vert_pp_ ## W ## x ## H ## cpu; \
+    p.chroma[X265_CSP_I420].filter_vps[CHROMA_ ## W ## x ## H] = x265_interp_4tap_vert_ps_ ## W ## x ## H ## cpu; \
     p.chroma[X265_CSP_I420].filter_vsp[CHROMA_ ## W ## x ## H] = x265_interp_4tap_vert_sp_ ## W ## x ## H ## cpu;
 
 #define CHROMA_VERT_FILTERS(cpu) \
@@ -896,17 +997,7 @@ void Setup_Assembly_Primitives(EncoderPr
         p.scale1D_128to64 = x265_scale1D_128to64_ssse3;
         p.scale2D_64to32 = x265_scale2D_64to32_ssse3;
 
-        SETUP_INTRA_ANG4(2, 2, ssse3);
-        SETUP_INTRA_ANG4(34, 2, ssse3);
-
-        SETUP_INTRA_ANG8(2, 2, ssse3);
-        SETUP_INTRA_ANG8(34, 2, ssse3);
-
-        SETUP_INTRA_ANG16(2, 2, ssse3);
-        SETUP_INTRA_ANG16(34, 2, ssse3);
-
-        SETUP_INTRA_ANG32(2, 2, ssse3);
-        SETUP_INTRA_ANG32(34, 2, ssse3);
+        INTRA_ANG_SSSE3(ssse3);
 
         p.dct[DST_4x4] = x265_dst4_ssse3;
     }
@@ -932,133 +1023,9 @@ void Setup_Assembly_Primitives(EncoderPr
         p.intra_pred[BLOCK_16x16][1] = x265_intra_pred_dc16_sse4;
         p.intra_pred[BLOCK_32x32][1] = x265_intra_pred_dc32_sse4;
 
-        SETUP_INTRA_ANG4(3, 3, sse4);
-        SETUP_INTRA_ANG4(4, 4, sse4);
-        SETUP_INTRA_ANG4(5, 5, sse4);
-        SETUP_INTRA_ANG4(6, 6, sse4);
-        SETUP_INTRA_ANG4(7, 7, sse4);
-        SETUP_INTRA_ANG4(8, 8, sse4);
-        SETUP_INTRA_ANG4(9, 9, sse4);
-        SETUP_INTRA_ANG4(10, 10, sse4);
-        SETUP_INTRA_ANG4(11, 11, sse4);
-        SETUP_INTRA_ANG4(12, 12, sse4);
-        SETUP_INTRA_ANG4(13, 13, sse4);
-        SETUP_INTRA_ANG4(14, 14, sse4);
-        SETUP_INTRA_ANG4(15, 15, sse4);
-        SETUP_INTRA_ANG4(16, 16, sse4);
-        SETUP_INTRA_ANG4(17, 17, sse4);
-        SETUP_INTRA_ANG4(18, 18, sse4);
-        SETUP_INTRA_ANG4(19, 17, sse4);
-        SETUP_INTRA_ANG4(20, 16, sse4);
-        SETUP_INTRA_ANG4(21, 15, sse4);
-        SETUP_INTRA_ANG4(22, 14, sse4);
-        SETUP_INTRA_ANG4(23, 13, sse4);
-        SETUP_INTRA_ANG4(24, 12, sse4);
-        SETUP_INTRA_ANG4(25, 11, sse4);
-        SETUP_INTRA_ANG4(26, 26, sse4);
-        SETUP_INTRA_ANG4(27, 9, sse4);
-        SETUP_INTRA_ANG4(28, 8, sse4);
-        SETUP_INTRA_ANG4(29, 7, sse4);
-        SETUP_INTRA_ANG4(30, 6, sse4);
-        SETUP_INTRA_ANG4(31, 5, sse4);
-        SETUP_INTRA_ANG4(32, 4, sse4);
-        SETUP_INTRA_ANG4(33, 3, sse4);
+        INTRA_ANG_SSE4_COMMON(sse4);
+        INTRA_ANG_SSE4_HIGH(sse4);
 
-        SETUP_INTRA_ANG8(3, 3, sse4);
-        SETUP_INTRA_ANG8(4, 4, sse4);
-        SETUP_INTRA_ANG8(5, 5, sse4);
-        SETUP_INTRA_ANG8(6, 6, sse4);


More information about the x265-commits mailing list