[x265-commits] [x265] doc: nits

Steve Borho steve at borho.org
Fri Jul 10 20:18:25 CEST 2015


details:   http://hg.videolan.org/x265/rev/a7182b1072e6
branches:  
changeset: 10784:a7182b1072e6
user:      Steve Borho <steve at borho.org>
date:      Thu Jul 09 15:22:53 2015 -0500
description:
doc: nits
Subject: [x265] multilib: more portable string compare

details:   http://hg.videolan.org/x265/rev/051f4705754d
branches:  
changeset: 10785:051f4705754d
user:      Steve Borho <steve at borho.org>
date:      Fri Jul 10 11:12:36 2015 -0500
description:
multilib: more portable string compare
Subject: [x265] cli: fix --log-level full --help by removing extra param_default() calls

details:   http://hg.videolan.org/x265/rev/9089d8e6467f
branches:  
changeset: 10786:9089d8e6467f
user:      Steve Borho <steve at borho.org>
date:      Fri Jul 10 11:13:08 2015 -0500
description:
cli: fix --log-level full --help by removing extra param_default() calls
Subject: [x265] cli: move zones help into rate-control section (it does not affect slice types)

details:   http://hg.videolan.org/x265/rev/66c4ead5d5d5
branches:  
changeset: 10787:66c4ead5d5d5
user:      Steve Borho <steve at borho.org>
date:      Fri Jul 10 11:13:42 2015 -0500
description:
cli: move zones help into rate-control section (it does not affect slice types)
Subject: [x265] improve duplicate MV check by reduce condition jump

details:   http://hg.videolan.org/x265/rev/de90e537b17a
branches:  
changeset: 10788:de90e537b17a
user:      Min Chen <chenm003 at 163.com>
date:      Thu Jul 09 17:29:37 2015 -0700
description:
improve duplicate MV check by reduce condition jump
Subject: [x265] asm: fix Main12 luma_vps_sse2

details:   http://hg.videolan.org/x265/rev/1f703d7617bf
branches:  
changeset: 10789:1f703d7617bf
user:      Min Chen <chenm003 at 163.com>
date:      Thu Jul 09 17:29:40 2015 -0700
description:
asm: fix Main12 luma_vps_sse2
Subject: [x265] asm: replace tab_c_n32768 by pd_n32768

details:   http://hg.videolan.org/x265/rev/edf69f0667e1
branches:  
changeset: 10790:edf69f0667e1
user:      Min Chen <chenm003 at 163.com>
date:      Thu Jul 09 17:39:18 2015 -0700
description:
asm: replace tab_c_n32768 by pd_n32768
Subject: [x265] asm: use general constant INTERP_MAGIC_PS to replcae exact bit depth dependency magic constant

details:   http://hg.videolan.org/x265/rev/977dc8564cc4
branches:  
changeset: 10791:977dc8564cc4
user:      Min Chen <chenm003 at 163.com>
date:      Thu Jul 09 17:47:46 2015 -0700
description:
asm: use general constant INTERP_MAGIC_PS to replcae exact bit depth dependency magic constant
Subject: [x265] api: change --crop-rect to --display-window to avoid confusion

details:   http://hg.videolan.org/x265/rev/d62f941f3f88
branches:  
changeset: 10792:d62f941f3f88
user:      Steve Borho <steve at borho.org>
date:      Fri Jul 10 11:52:31 2015 -0500
description:
api: change --crop-rect to --display-window to avoid confusion

It seems that in x264 --crop-rect defined their conformance window, so it can
be confusing to users that our --crop-rect defined a display window instead.

This commit changes the documentaion to use --display-window but still allows
--crop-rect to be used in the CLI and param_parse() so existing work-flows are
not affected.

diffstat:

 build/linux/multilib.sh          |    2 +-
 doc/reST/api.rst                 |   11 +-
 doc/reST/cli.rst                 |   14 ++-
 source/common/param.cpp          |    2 +-
 source/common/x86/const-a.asm    |    2 +-
 source/common/x86/ipfilter16.asm |  161 ++++++++++++++++++++------------------
 source/encoder/motion.cpp        |    2 +-
 source/test/ipfilterharness.cpp  |    7 +
 source/x265.cpp                  |    2 -
 source/x265cli.h                 |   17 ++-
 10 files changed, 120 insertions(+), 100 deletions(-)

diffs (truncated from 834 to 300 lines):

diff -r 50d32509a1f4 -r d62f941f3f88 build/linux/multilib.sh
--- a/build/linux/multilib.sh	Thu Jul 09 13:07:52 2015 -0500
+++ b/build/linux/multilib.sh	Fri Jul 10 11:52:31 2015 -0500
@@ -20,7 +20,7 @@ make ${MAKEFLAGS}
 mv libx265.a libx265_main.a
 
 uname=`uname`
-if [[ "$uname" == "Linux" ]];
+if [ "$uname" = "Linux" ]
 then
 
 # On Linux, we use GNU ar to combine the static libraries together
diff -r 50d32509a1f4 -r d62f941f3f88 doc/reST/api.rst
--- a/doc/reST/api.rst	Thu Jul 09 13:07:52 2015 -0500
+++ b/doc/reST/api.rst	Fri Jul 10 11:52:31 2015 -0500
@@ -159,7 +159,8 @@ After the encoder has been created, you 
 	helps future-proof your code in many ways, but the x265 API is
 	versioned in such a way that we prevent linkage against a build of
 	x265 that does not match the version of the header you are compiling
-	against. This is function of the X265_BUILD macro.
+	against (unless you use x265_api_query() to acquire the library's
+	interfaces). This is function of the X265_BUILD macro.
 
 **x265_encoder_parameters()** may be used to get a copy of the param
 structure from the encoder after it has been opened, in order to see the
@@ -468,10 +469,10 @@ functions (x265_8bit, x265_10bit or x265
 functions.
 
 In this way you can build one or more libx265 libraries without any
-exported C interface and link them into libx265 build that does export a
-C interface. In this way, the build which exported the C functions
-becomes the *default* bit depth for the combined library, and the other
-bit depths are only available via the introspection methods.
+exported C interface and link them into a libx265 build that does export
+a C interface. The build which exported the C functions becomes the
+*default* bit depth for the combined library, and the other bit depths
+are available via the bit-depth introspection methods.
 
 .. Note::
 
diff -r 50d32509a1f4 -r d62f941f3f88 doc/reST/cli.rst
--- a/doc/reST/cli.rst	Thu Jul 09 13:07:52 2015 -0500
+++ b/doc/reST/cli.rst	Fri Jul 10 11:52:31 2015 -0500
@@ -1512,13 +1512,19 @@ VUI fields must be manually specified.
 	15. 3:2
 	16. 2:1
 
-.. option:: --crop-rect <left,top,right,bottom>
+.. option:: --display-window <left,top,right,bottom>
 
 	Define the (overscan) region of the image that does not contain
 	information because it was added to achieve certain resolution or
-	aspect ratio. The decoder may be directed to crop away this region
-	before displaying the images via the :option:`--overscan` option.
-	Default undefined (not signaled)
+	aspect ratio (the areas are typically black bars). The decoder may
+	be directed to crop away this region before displaying the images
+	via the :option:`--overscan` option.  Default undefined (not
+	signaled).
+
+	Note that this has nothing to do with padding added internally by
+	the encoder to ensure the pictures size is a multiple of the minimum
+	coding unit (4x4). That padding is signaled in a separate
+	"conformance window" and is not user-configurable.
 
 .. option:: --overscan <show|crop>
 
diff -r 50d32509a1f4 -r d62f941f3f88 source/common/param.cpp
--- a/source/common/param.cpp	Thu Jul 09 13:07:52 2015 -0500
+++ b/source/common/param.cpp	Fri Jul 10 11:52:31 2015 -0500
@@ -830,7 +830,7 @@ int x265_param_parse(x265_param* p, cons
         p->vui.chromaSampleLocTypeTopField = atoi(value);
         p->vui.chromaSampleLocTypeBottomField = p->vui.chromaSampleLocTypeTopField;
     }
-    OPT("crop-rect")
+    OPT2("display-window", "crop-rect")
     {
         p->vui.bEnableDefaultDisplayWindowFlag = 1;
         bError |= sscanf(value, "%d,%d,%d,%d",
diff -r 50d32509a1f4 -r d62f941f3f88 source/common/x86/const-a.asm
--- a/source/common/x86/const-a.asm	Thu Jul 09 13:07:52 2015 -0500
+++ b/source/common/x86/const-a.asm	Fri Jul 10 11:52:31 2015 -0500
@@ -125,7 +125,7 @@ const pd_1024,              times  4 dd 
 const pd_2048,              times  4 dd 2048
 const pd_ffff,              times  4 dd 0xffff
 const pd_32767,             times  4 dd 32767
-const pd_n32768,            times  4 dd 0xffff8000
+const pd_n32768,            times  8 dd 0xffff8000
 const pd_n131072,           times  4 dd 0xfffe0000
 
 const trans8_shuf,          times  1 dd   0,   4,   1,   5,   2,   6,   3,   7
diff -r 50d32509a1f4 -r d62f941f3f88 source/common/x86/ipfilter16.asm
--- a/source/common/x86/ipfilter16.asm	Thu Jul 09 13:07:52 2015 -0500
+++ b/source/common/x86/ipfilter16.asm	Fri Jul 10 11:52:31 2015 -0500
@@ -29,7 +29,6 @@
 SECTION_RODATA 32
 
 tab_c_32:         times 8 dd 32
-tab_c_n32768:     times 8 dd -32768
 tab_c_524800:     times 4 dd 524800
 tab_c_n8192:      times 8 dw -8192
 pd_524800:        times 8 dd 524800
@@ -146,6 +145,14 @@ const interp8_hpp_shuf,     db 0, 1, 2, 
 const pb_shuf,  db 0, 1, 2, 3, 4, 5, 6, 7, 2, 3, 4, 5, 6, 7, 8, 9
                 db 4, 5, 6, 7, 8, 9, 10, 11, 6, 7, 8, 9, 10, 11, 12, 13
 
+%if BIT_DEPTH == 10
+    %define INTERP_OFFSET_PS        pd_n32768
+%elif BIT_DEPTH == 12
+    %define INTERP_OFFSET_PS        pd_n131072
+%else
+%error Unsupport bit depth!
+%endif
+
 SECTION .text
 cextern pd_32
 cextern pw_pixel_max
@@ -280,11 +287,7 @@ cglobal interp_8tap_horiz_%3_%1x%2, 4, 7
     mova        m1,     [pd_32]
     pxor        m7,     m7
 %else
-  %if BIT_DEPTH == 10
-    mova        m1,     [pd_n32768]
-  %elif BIT_DEPTH == 12
-    mova        m1,     [pd_n131072]
-  %endif
+    mova        m1,     [INTERP_OFFSET_PS]
 %endif
 
     mov         r4d,    %2
@@ -496,8 +499,12 @@ cglobal interp_8tap_vert_%1_%2x%3, 5, 7,
     mova      m7, [pd_32]
 %define SHIFT 6
 %elifidn %1,ps
-    mova      m7, [pd_n32768]
-%define SHIFT 2
+    mova      m7, [INTERP_OFFSET_PS]
+  %if BIT_DEPTH == 10
+    %define SHIFT 2
+  %elif BIT_DEPTH == 12
+    %define SHIFT 4
+  %endif
 %endif
 
     mov         r4d, %3/4
@@ -814,7 +821,7 @@ cglobal interp_4tap_horiz_%3_%1x%2, 4, 7
 %endif
 
 %ifidn %3, ps
-    mova        m1,     [tab_c_n32768]
+    mova        m1,     [INTERP_OFFSET_PS]
     cmp         r5m,    byte 0
 %if %1 <= 6
     lea         r4,     [r1 * 3]
@@ -996,8 +1003,8 @@ FILTER_HOR_CHROMA_sse3 64, 64, ps
     movd        m2,     [r0 + r1 * 2 + %1]
     movhps      m0,     [r0 + r1 + %1]
     movhps      m2,     [r0 + r4 + %1]
-    psllw       m0,     4
-    psllw       m2,     4
+    psllw       m0,     (14 - BIT_DEPTH)
+    psllw       m2,     (14 - BIT_DEPTH)
     psubw       m0,     m1
     psubw       m2,     m1
 
@@ -1012,14 +1019,14 @@ FILTER_HOR_CHROMA_sse3 64, 64, ps
 %macro FILTER_P2S_4_4_sse2 1
     movh        m0,     [r0 + %1]
     movhps      m0,     [r0 + r1 + %1]
-    psllw       m0,     4
+    psllw       m0,     (14 - BIT_DEPTH)
     psubw       m0,     m1
     movh        [r2 + r3 * 0 + %1], m0
     movhps      [r2 + r3 * 1 + %1], m0
 
     movh        m2,     [r0 + r1 * 2 + %1]
     movhps      m2,     [r0 + r4 + %1]
-    psllw       m2,     4
+    psllw       m2,     (14 - BIT_DEPTH)
     psubw       m2,     m1
     movh        [r2 + r3 * 2 + %1], m2
     movhps      [r2 + r5 + %1], m2
@@ -1028,7 +1035,7 @@ FILTER_HOR_CHROMA_sse3 64, 64, ps
 %macro FILTER_P2S_4_2_sse2 0
     movh        m0,     [r0]
     movhps      m0,     [r0 + r1 * 2]
-    psllw       m0,     4
+    psllw       m0,     (14 - BIT_DEPTH)
     psubw       m0,     [pw_2000]
     movh        [r2 + r3 * 0], m0
     movhps      [r2 + r3 * 2], m0
@@ -1037,8 +1044,8 @@ FILTER_HOR_CHROMA_sse3 64, 64, ps
 %macro FILTER_P2S_8_4_sse2 1
     movu        m0,     [r0 + %1]
     movu        m2,     [r0 + r1 + %1]
-    psllw       m0,     4
-    psllw       m2,     4
+    psllw       m0,     (14 - BIT_DEPTH)
+    psllw       m2,     (14 - BIT_DEPTH)
     psubw       m0,     m1
     psubw       m2,     m1
     movu        [r2 + r3 * 0 + %1], m0
@@ -1046,8 +1053,8 @@ FILTER_HOR_CHROMA_sse3 64, 64, ps
 
     movu        m3,     [r0 + r1 * 2 + %1]
     movu        m4,     [r0 + r4 + %1]
-    psllw       m3,     4
-    psllw       m4,     4
+    psllw       m3,     (14 - BIT_DEPTH)
+    psllw       m4,     (14 - BIT_DEPTH)
     psubw       m3,     m1
     psubw       m4,     m1
     movu        [r2 + r3 * 2 + %1], m3
@@ -1057,8 +1064,8 @@ FILTER_HOR_CHROMA_sse3 64, 64, ps
 %macro FILTER_P2S_8_2_sse2 1
     movu        m0,     [r0 + %1]
     movu        m2,     [r0 + r1 + %1]
-    psllw       m0,     4
-    psllw       m2,     4
+    psllw       m0,     (14 - BIT_DEPTH)
+    psllw       m2,     (14 - BIT_DEPTH)
     psubw       m0,     m1
     psubw       m2,     m1
     movu        [r2 + r3 * 0 + %1], m0
@@ -1181,7 +1188,7 @@ cglobal interp_8tap_horiz_%3_%1x%2, 4, 7
     pxor        m6, m6
     mova        m7, [pw_pixel_max]
 %else
-    mova        m1, [pd_n32768]
+    mova        m1, [INTERP_OFFSET_PS]
 %endif
 
     mov         r4d, %2
@@ -1267,7 +1274,7 @@ cglobal interp_8tap_horiz_%3_%1x%2, 4, 7
     mova        m1, [pd_32]
     pxor        m7, m7
 %else
-    mova        m1, [pd_n32768]
+    mova        m1, [INTERP_OFFSET_PS]
 %endif
 
     mov         r4d, %2
@@ -1368,7 +1375,7 @@ cglobal interp_8tap_horiz_%3_%1x%2, 4, 7
 %ifidn %3, pp 
     mova        m1, [pd_32]
 %else
-    mova        m1, [pd_n32768]
+    mova        m1, [INTERP_OFFSET_PS]
 %endif
 
     mov         r4d, %2
@@ -1491,7 +1498,7 @@ cglobal interp_8tap_horiz_%3_%1x%2, 4, 7
 %ifidn %3, pp 
     mova        m1, [pd_32]
 %else
-    mova        m1, [pd_n32768]
+    mova        m1, [INTERP_OFFSET_PS]
 %endif
 
     mov         r4d, %2
@@ -1686,7 +1693,7 @@ cglobal interp_8tap_horiz_%3_%1x%2, 4, 7
 %ifidn %3, pp 
     mova        m1, [pd_32]
 %else
-    mova        m1, [pd_n32768]
+    mova        m1, [INTERP_OFFSET_PS]
 %endif
 
     mov         r4d, %2
@@ -2627,7 +2634,7 @@ cglobal interp_4tap_horiz_%3_%1x%2, 4, %
     mova        m2,       [tab_Tm16]
 
 %ifidn %3, ps
-    mova        m1,       [tab_c_n32768]
+    mova        m1,       [INTERP_OFFSET_PS]
     cmp         r5m, byte 0
     je          .skip
     sub         r0, r1
@@ -3229,7 +3236,7 @@ cglobal interp_4tap_horiz_%3_%1x%2, 4, %
     mova        m2,       [tab_Tm16]
 
 %ifidn %3, ps
-    mova        m1,       [tab_c_n32768]
+    mova        m1,       [INTERP_OFFSET_PS]
     cmp         r5m, byte 0
     je          .skip
     sub         r0, r1
@@ -4080,7 +4087,7 @@ cglobal interp_4tap_vert_%3_%1x%2, 5, 7,
             mova      m6, [tab_c_524800]
         %endif
     %else
-        mova      m6, [tab_c_n32768]
+        mova      m6, [INTERP_OFFSET_PS]
     %endif
 %endif
 
@@ -4335,7 +4342,7 @@ cglobal interp_4tap_vert_%2_2x%1, 5, 6, 
             mova      m5, [tab_c_524800]
         %endif
     %else


More information about the x265-commits mailing list