Re: [libav-devel] [PATCH] avutil: remove pointless bmi1 define

2015-04-20 Thread Diego Biurrun
On Sat, Apr 18, 2015 at 08:12:54PM -0300, James Almer wrote:
> Signed-off-by: James Almer 
> ---
>  libavutil/cpu.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

Why?

Diego
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] avutil: remove pointless bmi1 define

2015-04-19 Thread Luca Barbato
On 19/04/15 01:12, James Almer wrote:
> Signed-off-by: James Almer 
> ---
>  libavutil/cpu.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/libavutil/cpu.c b/libavutil/cpu.c
> index 354d21e..4e8ef61 100644
> --- a/libavutil/cpu.c
> +++ b/libavutil/cpu.c
> @@ -90,8 +90,7 @@ int av_parse_cpu_flags(const char *s)
>  #define CPUFLAG_FMA3 (AV_CPU_FLAG_FMA3 | CPUFLAG_AVX)
>  #define CPUFLAG_FMA4 (AV_CPU_FLAG_FMA4 | CPUFLAG_AVX)
>  #define CPUFLAG_AVX2 (AV_CPU_FLAG_AVX2 | CPUFLAG_AVX)
> -#define CPUFLAG_BMI1 (AV_CPU_FLAG_BMI1)
> -#define CPUFLAG_BMI2 (AV_CPU_FLAG_BMI2 | CPUFLAG_BMI1)
> +#define CPUFLAG_BMI2 (AV_CPU_FLAG_BMI2 | AV_CPU_FLAG_BMI1)
>  static const AVOption cpuflags_opts[] = {
>  { "flags"   , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, 
> INT64_MAX, .unit = "flags" },
>  #if   ARCH_PPC
> @@ -113,7 +112,7 @@ int av_parse_cpu_flags(const char *s)
>  { "fma3", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_FMA3  
>},.unit = "flags" },
>  { "fma4", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_FMA4  
>},.unit = "flags" },
>  { "avx2", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_AVX2  
>},.unit = "flags" },
> -{ "bmi1", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_BMI1  
>},.unit = "flags" },
> +{ "bmi1", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_BMI1  
>},.unit = "flags" },
>  { "bmi2", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_BMI2  
>},.unit = "flags" },
>  { "3dnow"   , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_3DNOW 
>},.unit = "flags" },
>  { "3dnowext", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_3DNOWEXT  
>},.unit = "flags" },
> 

Should not hurt and that struct is already using AV_CPU_FLAGs around.

lu
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH] avutil: remove pointless bmi1 define

2015-04-18 Thread James Almer
Signed-off-by: James Almer 
---
 libavutil/cpu.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavutil/cpu.c b/libavutil/cpu.c
index 354d21e..4e8ef61 100644
--- a/libavutil/cpu.c
+++ b/libavutil/cpu.c
@@ -90,8 +90,7 @@ int av_parse_cpu_flags(const char *s)
 #define CPUFLAG_FMA3 (AV_CPU_FLAG_FMA3 | CPUFLAG_AVX)
 #define CPUFLAG_FMA4 (AV_CPU_FLAG_FMA4 | CPUFLAG_AVX)
 #define CPUFLAG_AVX2 (AV_CPU_FLAG_AVX2 | CPUFLAG_AVX)
-#define CPUFLAG_BMI1 (AV_CPU_FLAG_BMI1)
-#define CPUFLAG_BMI2 (AV_CPU_FLAG_BMI2 | CPUFLAG_BMI1)
+#define CPUFLAG_BMI2 (AV_CPU_FLAG_BMI2 | AV_CPU_FLAG_BMI1)
 static const AVOption cpuflags_opts[] = {
 { "flags"   , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, 
INT64_MAX, .unit = "flags" },
 #if   ARCH_PPC
@@ -113,7 +112,7 @@ int av_parse_cpu_flags(const char *s)
 { "fma3", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_FMA3
 },.unit = "flags" },
 { "fma4", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_FMA4
 },.unit = "flags" },
 { "avx2", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_AVX2
 },.unit = "flags" },
-{ "bmi1", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_BMI1
 },.unit = "flags" },
+{ "bmi1", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_BMI1
 },.unit = "flags" },
 { "bmi2", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_BMI2
 },.unit = "flags" },
 { "3dnow"   , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_3DNOW   
 },.unit = "flags" },
 { "3dnowext", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = CPUFLAG_3DNOWEXT
 },.unit = "flags" },
-- 
2.3.5

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel