[x265] [PATCH] remove unused asmname from x265_param

2018-04-13 Thread Ma0
# HG changeset patch
# User Ma0 
# Date 1523605826 -7200
#  Fri Apr 13 09:50:26 2018 +0200
# Node ID 98108efa572a95022c041d71b3e090f350619178
# Parent  07defe235cde1949c55464952ee1dbdc10baf5e4
remove unused asmname from x265_param

diff -r 07defe235cde -r 98108efa572a source/CMakeLists.txt
--- a/source/CMakeLists.txt Thu Apr 12 16:57:19 2018 +0530
+++ b/source/CMakeLists.txt Fri Apr 13 09:50:26 2018 +0200
@@ -29,7 +29,7 @@
 option(STATIC_LINK_CRT "Statically link C runtime for release builds" OFF)
 mark_as_advanced(FPROFILE_USE FPROFILE_GENERATE NATIVE_BUILD)
 # X265_BUILD must be incremented each time the public API is changed
-set(X265_BUILD 158)
+set(X265_BUILD 159)
 configure_file("${PROJECT_SOURCE_DIR}/x265.def.in"
"${PROJECT_BINARY_DIR}/x265.def")
 configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in"
diff -r 07defe235cde -r 98108efa572a source/common/param.cpp
--- a/source/common/param.cpp   Thu Apr 12 16:57:19 2018 +0530
+++ b/source/common/param.cpp   Fri Apr 13 09:50:26 2018 +0200
@@ -615,7 +615,6 @@
 if (0) ;
 OPT("asm")
 {
-sscanf(value, "%s", p->asmname);
 if (strcmp(value, "avx512")==0)
 {
 p->bEnableavx512 = 1;
diff -r 07defe235cde -r 98108efa572a source/x265.h
--- a/source/x265.h Thu Apr 12 16:57:19 2018 +0530
+++ b/source/x265.h Fri Apr 13 09:50:26 2018 +0200
@@ -636,7 +636,6 @@
  *  avx512 capabilities. 
  *  Ensure to use --asm avx512 if you need to encode with avx512 assembly 
primitives*/
 int bEnableavx512;
-char*   asmname;
 /*== Parallelism Features ==*/
 
 /* Number of concurrently encoded frames between 1 and 
X265_MAX_FRAME_THREADS
___
x265-devel mailing list
x265-devel@videolan.org
https://mailman.videolan.org/listinfo/x265-devel


[x265] [PATCH] Fix warnings related to VMAF

2018-04-13 Thread indumathi
# HG changeset patch
# User induma...@multicorewareinc.com
# Date 1523607692 -19800
#  Fri Apr 13 13:51:32 2018 +0530
# Node ID 7305220d469b0c262ef9742d90419ff85832d233
# Parent  07defe235cde1949c55464952ee1dbdc10baf5e4
Fix warnings related to VMAF

diff -r 07defe235cde -r 7305220d469b source/x265.h
--- a/source/x265.h Thu Apr 12 16:57:19 2018 +0530
+++ b/source/x265.h Fri Apr 13 13:51:32 2018 +0530
@@ -614,7 +614,7 @@
 char *pool;
 }x265_vmaf_commondata;
 
-static const x265_vmaf_commondata vcd[] = {NULL, (char 
*)"/usr/local/share/model/vmaf_v0.6.1.pkl", NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 
NULL};
+static const x265_vmaf_commondata vcd[] = { { NULL, (char 
*)"/usr/local/share/model/vmaf_v0.6.1.pkl", NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 
NULL } };
 
 /* x265 input parameters
  *
___
x265-devel mailing list
x265-devel@videolan.org
https://mailman.videolan.org/listinfo/x265-devel


Re: [x265] [PATCH] Added a new line at the end

2018-04-13 Thread Ashok Kumar Mishra
On Fri, Apr 13, 2018 at 5:12 PM,  wrote:

> # HG changeset patch
> # User Ashok Kumar Mishra 
> # Date 1523619730 -19800
> #  Fri Apr 13 17:12:10 2018 +0530
> # Branch stable
> # Node ID aa9102400f2456584d5e41adf456510abcebec6c
> # Parent  1b38042f34a66ec7db4884ecd5ebeac64c3e3c34
> Added a new line at the end
>
> diff -r 1b38042f34a6 -r aa9102400f24 source/x265cli.h
> --- a/source/x265cli.h  Fri Apr 13 13:51:32 2018 +0530
> +++ b/source/x265cli.h  Fri Apr 13 17:12:10 2018 +0530
> @@ -566,7 +566,7 @@
>  H0("   --[no-]audEmit access unit delimiters at
> the start of each access unit. Default %s\n", OPT(param->
> bEnableAccessUnitDelimiters));
>  H1("   --hash   Decoded Picture Hash SEI 0:
> disabled, 1: MD5, 2: CRC, 3: Checksum. Default %d\n",
> param->decodedPictureHashSEI);
> H0("   --atc-seiEmit the alternative transfer
> characteristics SEI message where the integer is the preferred transfer
> characteristics. Default disabled\n");
> -   H0("   --pic-struct Set the picture structure and
> emits it in the picture timing SEI message. Values in the range 0..12. See
> D.3.3 of the HEVC spec. for a detailed explanation.");
> +   H0("   --pic-struct Set the picture structure and
> emits it in the picture timing SEI message. Values in the range 0..12. See
> D.3.3 of the HEVC spec. for a detailed explanation.\n");
>  H0("   --log2-max-poc-lsb   Maximum of the picture order
> count\n");
>  H0("   --[no-]vui-timing-infoEmit VUI timing information in
> the bistream. Default %s\n", OPT(param->bEmitVUITimingInfo));
>  H0("   --[no-]vui-hrd-info   Emit VUI HRD information in the
> bistream. Default %s\n", OPT(param->bEmitVUIHRDInfo));
>


Pushed.
___
x265-devel mailing list
x265-devel@videolan.org
https://mailman.videolan.org/listinfo/x265-devel


Re: [x265] [PATCH] remove unused asmname from x265_param

2018-04-13 Thread Ashok Kumar Mishra
On Fri, Apr 13, 2018 at 1:39 PM, Ma0  wrote:

> # HG changeset patch
> # User Ma0 
> # Date 1523605826 -7200
> #  Fri Apr 13 09:50:26 2018 +0200
> # Node ID 98108efa572a95022c041d71b3e090f350619178
> # Parent  07defe235cde1949c55464952ee1dbdc10baf5e4
> remove unused asmname from x265_param
>
> diff -r 07defe235cde -r 98108efa572a source/CMakeLists.txt
> --- a/source/CMakeLists.txt Thu Apr 12 16:57:19 2018 +0530
> +++ b/source/CMakeLists.txt Fri Apr 13 09:50:26 2018 +0200
> @@ -29,7 +29,7 @@
>  option(STATIC_LINK_CRT "Statically link C runtime for release builds" OFF)
>  mark_as_advanced(FPROFILE_USE FPROFILE_GENERATE NATIVE_BUILD)
>  # X265_BUILD must be incremented each time the public API is changed
> -set(X265_BUILD 158)
> +set(X265_BUILD 159)
>  configure_file("${PROJECT_SOURCE_DIR}/x265.def.in"
> "${PROJECT_BINARY_DIR}/x265.def")
>  configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in"
> diff -r 07defe235cde -r 98108efa572a source/common/param.cpp
> --- a/source/common/param.cpp   Thu Apr 12 16:57:19 2018 +0530
> +++ b/source/common/param.cpp   Fri Apr 13 09:50:26 2018 +0200
> @@ -615,7 +615,6 @@
>  if (0) ;
>  OPT("asm")
>  {
> -sscanf(value, "%s", p->asmname);
>  if (strcmp(value, "avx512")==0)
>  {
>  p->bEnableavx512 = 1;
> diff -r 07defe235cde -r 98108efa572a source/x265.h
> --- a/source/x265.h Thu Apr 12 16:57:19 2018 +0530
> +++ b/source/x265.h Fri Apr 13 09:50:26 2018 +0200
> @@ -636,7 +636,6 @@
>   *  avx512 capabilities.
>   *  Ensure to use --asm avx512 if you need to encode with avx512
> assembly primitives*/
>  int bEnableavx512;
> -char*   asmname;
>  /*== Parallelism Features ==*/
>
>  /* Number of concurrently encoded frames between 1 and
> X265_MAX_FRAME_THREADS
> ___
> x265-devel mailing list
> x265-devel@videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>

Pushed.
___
x265-devel mailing list
x265-devel@videolan.org
https://mailman.videolan.org/listinfo/x265-devel


[x265] [PATCH] Added a new line at the end

2018-04-13 Thread ashok
# HG changeset patch
# User Ashok Kumar Mishra 
# Date 1523619730 -19800
#  Fri Apr 13 17:12:10 2018 +0530
# Branch stable
# Node ID aa9102400f2456584d5e41adf456510abcebec6c
# Parent  1b38042f34a66ec7db4884ecd5ebeac64c3e3c34
Added a new line at the end

diff -r 1b38042f34a6 -r aa9102400f24 source/x265cli.h
--- a/source/x265cli.h  Fri Apr 13 13:51:32 2018 +0530
+++ b/source/x265cli.h  Fri Apr 13 17:12:10 2018 +0530
@@ -566,7 +566,7 @@
 H0("   --[no-]audEmit access unit delimiters at the 
start of each access unit. Default %s\n", 
OPT(param->bEnableAccessUnitDelimiters));
 H1("   --hash   Decoded Picture Hash SEI 0: disabled, 
1: MD5, 2: CRC, 3: Checksum. Default %d\n", param->decodedPictureHashSEI);
H0("   --atc-seiEmit the alternative transfer 
characteristics SEI message where the integer is the preferred transfer 
characteristics. Default disabled\n");
-   H0("   --pic-struct Set the picture structure and 
emits it in the picture timing SEI message. Values in the range 0..12. See 
D.3.3 of the HEVC spec. for a detailed explanation.");
+   H0("   --pic-struct Set the picture structure and 
emits it in the picture timing SEI message. Values in the range 0..12. See 
D.3.3 of the HEVC spec. for a detailed explanation.\n");
 H0("   --log2-max-poc-lsb   Maximum of the picture order 
count\n");
 H0("   --[no-]vui-timing-infoEmit VUI timing information in the 
bistream. Default %s\n", OPT(param->bEmitVUITimingInfo));
 H0("   --[no-]vui-hrd-info   Emit VUI HRD information in the 
bistream. Default %s\n", OPT(param->bEmitVUIHRDInfo));
___
x265-devel mailing list
x265-devel@videolan.org
https://mailman.videolan.org/listinfo/x265-devel


Re: [x265] [PATCH] Fix warnings related to VMAF

2018-04-13 Thread Ashok Kumar Mishra
On Fri, Apr 13, 2018 at 2:59 PM,  wrote:

> # HG changeset patch
> # User induma...@multicorewareinc.com
> # Date 1523607692 -19800
> #  Fri Apr 13 13:51:32 2018 +0530
> # Node ID 7305220d469b0c262ef9742d90419ff85832d233
> # Parent  07defe235cde1949c55464952ee1dbdc10baf5e4
> Fix warnings related to VMAF
>
> diff -r 07defe235cde -r 7305220d469b source/x265.h
> --- a/source/x265.h Thu Apr 12 16:57:19 2018 +0530
> +++ b/source/x265.h Fri Apr 13 13:51:32 2018 +0530
> @@ -614,7 +614,7 @@
>  char *pool;
>  }x265_vmaf_commondata;
>
> -static const x265_vmaf_commondata vcd[] = {NULL, (char
> *)"/usr/local/share/model/vmaf_v0.6.1.pkl", NULL, NULL, 0, 0, 0, 0, 0, 0,
> 0, NULL};
> +static const x265_vmaf_commondata vcd[] = { { NULL, (char
> *)"/usr/local/share/model/vmaf_v0.6.1.pkl", NULL, NULL, 0, 0, 0, 0, 0, 0,
> 0, NULL } };
>
>  /* x265 input parameters
>   *
> ___
> x265-devel mailing list
> x265-devel@videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>

Pushed.
___
x265-devel mailing list
x265-devel@videolan.org
https://mailman.videolan.org/listinfo/x265-devel


Re: [x265] [PATCH 307 of 307] x86:AVX512 Set run time flag to enable/disable avx512

2018-04-13 Thread Mateusz
W dniu 13.04.2018 o 15:43, Ashok Kumar Mishra pisze:
> We are not seeing this issue at our side, can you please share your machine 
> configuration?
> Thanks.

CPU i7 8700, 64-bit Win10 Home 1709 16299.371, 16 GB RAM.

Bug is fixed in current stable tip (by "remove unused asmname from x265_param").

f:\t>x265 -V
x265 [info]: HEVC encoder version 2.7+336-07defe235cde
x265 [info]: build info [Windows][MSVC 1914][64 bit] 8bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 
BMI2 AVX2

f:\t>x265 --asm sse4 -V
* HANGS *

f:\t>x265n -V
x265 [info]: HEVC encoder version 2.7+340-aa9102400f24
x265 [info]: build info [Windows][MSVC 1914][64 bit] 8bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 
BMI2 AVX2

f:\t>x265n --asm sse4 -V
x265 [info]: HEVC encoder version 2.7+340-aa9102400f24
x265 [info]: build info [Windows][MSVC 1914][64 bit] 8bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1

Old GCC builds are not affected (probably in GCC sscanf validates if last 
argument is NULL).

Mateusz


> 
> On Fri, Apr 13, 2018 at 10:05 AM, Mateusz  > wrote:
> 
> W dniu 07.04.2018 o 04:35, mythr...@multicorewareinc.com 
>  pisze:
> > # HG changeset patch
> > # User Jayashree  >
> > # Date 1522928767 -19800
> > #      Thu Apr 05 17:16:07 2018 +0530
> > # Node ID f6ad2fa637fd3c8f9e2811982b89aa28228e9f6b
> > # Parent  876b6e006f2080072c0684dbf75e7cfde974ba79
> > x86:AVX512 Set run time flag to enable/disable avx512
> >
> > diff -r 876b6e006f20 -r f6ad2fa637fd source/common/cpu.cpp
> > --- a/source/common/cpu.cpp   Mon Feb 05 10:39:00 2018 -0800
> > +++ b/source/common/cpu.cpp   Thu Apr 05 17:16:07 2018 +0530
> > @@ -122,7 +122,7 @@
> >  #pragma warning(disable: 4309) // truncation of constant value
> >  #endif
> > 
> > -uint32_t cpu_detect(void)
> > +uint32_t cpu_detect(bool benableavx512 )
> >  {
> >      uint32_t cpu = 0;
> > 
> > @@ -184,11 +184,13 @@
> >          {
> >              if (ebx & 0x0020)
> >                  cpu |= X265_CPU_AVX2;
> > -
> > -            if ((xcr0 & 0xE0) == 0xE0) /* OPMASK/ZMM state */
> > +            if (benableavx512)
> >              {
> > -                if ((ebx & 0xD003) == 0xD003)
> > -                    cpu |= X265_CPU_AVX512;
> > +                if ((xcr0 & 0xE0) == 0xE0) /* OPMASK/ZMM state */
> > +                {
> > +                    if ((ebx & 0xD003) == 0xD003)
> > +                        cpu |= X265_CPU_AVX512;
> > +                }
> >              }
> >          }
> >      }
> > @@ -327,7 +329,7 @@
> >  int PFX(cpu_fast_neon_mrc_test)(void);
> >  }
> > 
> > -uint32_t cpu_detect(void)
> > +uint32_t cpu_detect(bool benableavx512)
> >  {
> >      int flags = 0;
> > 
> > @@ -370,7 +372,7 @@
> > 
> >  #elif X265_ARCH_POWER8
> > 
> > -uint32_t cpu_detect(void)
> > +uint32_t cpu_detect(bool benableavx512)
> >  {
> >  #if HAVE_ALTIVEC
> >      return X265_CPU_ALTIVEC;
> > @@ -381,7 +383,7 @@
> > 
> >  #else // if X265_ARCH_POWER8
> > 
> > -uint32_t cpu_detect(void)
> > +uint32_t cpu_detect(bool benableavx512)
> >  {
> >      return 0;
> >  }
> > diff -r 876b6e006f20 -r f6ad2fa637fd source/common/cpu.h
> > --- a/source/common/cpu.h     Mon Feb 05 10:39:00 2018 -0800
> > +++ b/source/common/cpu.h     Thu Apr 05 17:16:07 2018 +0530
> > @@ -50,7 +50,7 @@
> >  #endif
> > 
> >  namespace X265_NS {
> > -uint32_t cpu_detect(void);
> > +uint32_t cpu_detect(bool);
> > 
> >  struct cpu_name_t
> >  {
> > diff -r 876b6e006f20 -r f6ad2fa637fd source/common/param.cpp
> > --- a/source/common/param.cpp Mon Feb 05 10:39:00 2018 -0800
> > +++ b/source/common/param.cpp Thu Apr 05 17:16:07 2018 +0530
> > @@ -99,13 +99,13 @@
> >  {
> >      x265_free(p);
> >  }
> > -
> > +bool  benableavx512 = false;
> >  void x265_param_default(x265_param* param)
> >  {
> >      memset(param, 0, sizeof(x265_param));
> > 
> >      /* Applying default values to all elements in the param structure 
> */
> > -    param->cpuid = X265_NS::cpu_detect();
> > +    param->cpuid = X265_NS::cpu_detect(benableavx512);
> >      param->bEnableWavefront = 1;
> >      param->frameNumThreads = 0;
> > 
> > @@ -609,6 +609,17 @@
> >      if (0) ;
> >      OPT("asm")
> >      {
> > +        sscanf(value, "%s", p->asmname);
> 
> p->asmname is a pointer to unallocated memory. It is not used in x265.
> VS 2015 and VS 2017 builds hangs at command-line:
>