Re: [FFmpeg-devel] [PATCH V2 1/3] checkasm/vf_eq: add test for vf_eq

2019-09-27 Thread Fu, Ting


> -Original Message-
> From: ffmpeg-devel  On Behalf Of James
> Almer
> Sent: Friday, September 27, 2019 11:27 AM
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH V2 1/3] checkasm/vf_eq: add test for vf_eq
> 
> On 9/27/2019 12:25 AM, Fu, Ting wrote:
> >
> >
> >> -Original Message-
> >> From: ffmpeg-devel  On Behalf Of
> >> James Almer
> >> Sent: Thursday, September 26, 2019 11:20 PM
> >> To: ffmpeg-devel@ffmpeg.org
> >> Subject: Re: [FFmpeg-devel] [PATCH V2 1/3] checkasm/vf_eq: add test
> >> for vf_eq
> >>
> >> On 9/26/2019 11:43 AM, Andreas Rheinhardt wrote:
> >>> Ting Fu:
> >>>> Signed-off-by: Ting Fu 
> >>>> ---
> >>>>  libavfilter/vf_eq.c   | 13 ---
> >>>>  libavfilter/vf_eq.h   |  1 +
> >>>>  tests/checkasm/Makefile   |  1 +
> >>>>  tests/checkasm/checkasm.c |  3 ++
> >>>>  tests/checkasm/checkasm.h |  1 +
> >>>>  tests/checkasm/vf_eq.c| 79
> >> +++
> >>>>  tests/fate/checkasm.mak   |  1 +
> >>>>  7 files changed, 94 insertions(+), 5 deletions(-)  create mode
> >>>> 100644 tests/checkasm/vf_eq.c
> >>>>
> >>>> diff --git a/libavfilter/vf_eq.c b/libavfilter/vf_eq.c index
> >>>> 2c4c7e4d54..0f9d129255 100644
> >>>> --- a/libavfilter/vf_eq.c
> >>>> +++ b/libavfilter/vf_eq.c
> >>>> @@ -174,12 +174,18 @@ static int set_expr(AVExpr **pexpr, const
> >>>> char
> >> *expr, const char *option, void *
> >>>>  return 0;
> >>>>  }
> >>>>
> >>>> +void ff_eq_init(EQContext *eq)
> >>>> +{
> >>>> +eq->process = process_c;
> >>>> +if (ARCH_X86)
> >>>> +ff_eq_init_x86(eq);
> >>>> +}
> >>>> +
> >>>>  static int initialize(AVFilterContext *ctx)  {
> >>>>  EQContext *eq = ctx->priv;
> >>>>  int ret;
> >>>> -
> >>>> -eq->process = process_c;
> >>>> +ff_eq_init(eq);
> >>>>
> >>>>  if ((ret = set_expr(>contrast_pexpr, eq->contrast_expr,
> "contrast",
> >> ctx)) < 0 ||
> >>>>  (ret = set_expr(>brightness_pexpr,   eq->brightness_expr,
> >> "brightness",   ctx)) < 0 ||
> >>>> @@ -191,9 +197,6 @@ static int initialize(AVFilterContext *ctx)
> >>>>  (ret = set_expr(>gamma_weight_pexpr,
> >>>> eq->gamma_weight_expr,
> >> "gamma_weight", ctx)) < 0 )
> >>>>  return ret;
> >>>>
> >>>> -if (ARCH_X86)
> >>>> -ff_eq_init_x86(eq);
> >>>> -
> >>>>  if (eq->eval_mode == EVAL_MODE_INIT) {
> >>>>  set_gamma(eq);
> >>>>  set_contrast(eq);
> >>>> diff --git a/libavfilter/vf_eq.h b/libavfilter/vf_eq.h index
> >>>> fa49d46e5c..cd0cd75f08 100644
> >>>> --- a/libavfilter/vf_eq.h
> >>>> +++ b/libavfilter/vf_eq.h
> >>>> @@ -100,6 +100,7 @@ typedef struct EQContext {
> >>>>  enum EvalMode { EVAL_MODE_INIT, EVAL_MODE_FRAME,
> >> EVAL_MODE_NB }
> >>>> eval_mode;  } EQContext;
> >>>>
> >>>> +void ff_eq_init(EQContext *eq);
> >>>>  void ff_eq_init_x86(EQContext *eq);
> >>>>
> >>>>  #endif /* AVFILTER_EQ_H */
> >>>> diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile
> >>>> index 0112ff603e..de850c016e 100644
> >>>> --- a/tests/checkasm/Makefile
> >>>> +++ b/tests/checkasm/Makefile
> >>>> @@ -36,6 +36,7 @@ CHECKASMOBJS-$(CONFIG_AVCODEC)  +=
> >> $(AVCODECOBJS-yes)
> >>>>  AVFILTEROBJS-$(CONFIG_AFIR_FILTER) += af_afir.o
> >>>>  AVFILTEROBJS-$(CONFIG_BLEND_FILTER) += vf_blend.o
> >>>>  AVFILTEROBJS-$(CONFIG_COLORSPACE_FILTER) += vf_colorspace.o
> >>>> +AVFILTEROBJS-$(CONFIG_EQ_FILTER) += vf_eq.o
> >>>>  AVFILTEROBJS-$(CONFIG_GBLUR_FILTER)  += vf_gblur.o
> >>>>  AVFILTEROBJS-$(CONFIG_HFLIP_FILTER)  += vf_hflip.o
> >>>>  AVFILTEROBJS-$(CONFIG_THRESHOLD_FILTER)  += vf_threshold.o diff
> >>>> --git a/test

Re: [FFmpeg-devel] [PATCH V2 1/3] checkasm/vf_eq: add test for vf_eq

2019-09-26 Thread James Almer
On 9/27/2019 12:25 AM, Fu, Ting wrote:
> 
> 
>> -Original Message-
>> From: ffmpeg-devel  On Behalf Of James
>> Almer
>> Sent: Thursday, September 26, 2019 11:20 PM
>> To: ffmpeg-devel@ffmpeg.org
>> Subject: Re: [FFmpeg-devel] [PATCH V2 1/3] checkasm/vf_eq: add test for vf_eq
>>
>> On 9/26/2019 11:43 AM, Andreas Rheinhardt wrote:
>>> Ting Fu:
>>>> Signed-off-by: Ting Fu 
>>>> ---
>>>>  libavfilter/vf_eq.c   | 13 ---
>>>>  libavfilter/vf_eq.h   |  1 +
>>>>  tests/checkasm/Makefile   |  1 +
>>>>  tests/checkasm/checkasm.c |  3 ++
>>>>  tests/checkasm/checkasm.h |  1 +
>>>>  tests/checkasm/vf_eq.c| 79
>> +++
>>>>  tests/fate/checkasm.mak   |  1 +
>>>>  7 files changed, 94 insertions(+), 5 deletions(-)  create mode
>>>> 100644 tests/checkasm/vf_eq.c
>>>>
>>>> diff --git a/libavfilter/vf_eq.c b/libavfilter/vf_eq.c index
>>>> 2c4c7e4d54..0f9d129255 100644
>>>> --- a/libavfilter/vf_eq.c
>>>> +++ b/libavfilter/vf_eq.c
>>>> @@ -174,12 +174,18 @@ static int set_expr(AVExpr **pexpr, const char
>> *expr, const char *option, void *
>>>>  return 0;
>>>>  }
>>>>
>>>> +void ff_eq_init(EQContext *eq)
>>>> +{
>>>> +eq->process = process_c;
>>>> +if (ARCH_X86)
>>>> +ff_eq_init_x86(eq);
>>>> +}
>>>> +
>>>>  static int initialize(AVFilterContext *ctx)  {
>>>>  EQContext *eq = ctx->priv;
>>>>  int ret;
>>>> -
>>>> -eq->process = process_c;
>>>> +ff_eq_init(eq);
>>>>
>>>>  if ((ret = set_expr(>contrast_pexpr, eq->contrast_expr, 
>>>> "contrast",
>> ctx)) < 0 ||
>>>>  (ret = set_expr(>brightness_pexpr,   eq->brightness_expr,
>> "brightness",   ctx)) < 0 ||
>>>> @@ -191,9 +197,6 @@ static int initialize(AVFilterContext *ctx)
>>>>  (ret = set_expr(>gamma_weight_pexpr, eq->gamma_weight_expr,
>> "gamma_weight", ctx)) < 0 )
>>>>  return ret;
>>>>
>>>> -if (ARCH_X86)
>>>> -ff_eq_init_x86(eq);
>>>> -
>>>>  if (eq->eval_mode == EVAL_MODE_INIT) {
>>>>  set_gamma(eq);
>>>>  set_contrast(eq);
>>>> diff --git a/libavfilter/vf_eq.h b/libavfilter/vf_eq.h index
>>>> fa49d46e5c..cd0cd75f08 100644
>>>> --- a/libavfilter/vf_eq.h
>>>> +++ b/libavfilter/vf_eq.h
>>>> @@ -100,6 +100,7 @@ typedef struct EQContext {
>>>>  enum EvalMode { EVAL_MODE_INIT, EVAL_MODE_FRAME,
>> EVAL_MODE_NB }
>>>> eval_mode;  } EQContext;
>>>>
>>>> +void ff_eq_init(EQContext *eq);
>>>>  void ff_eq_init_x86(EQContext *eq);
>>>>
>>>>  #endif /* AVFILTER_EQ_H */
>>>> diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile index
>>>> 0112ff603e..de850c016e 100644
>>>> --- a/tests/checkasm/Makefile
>>>> +++ b/tests/checkasm/Makefile
>>>> @@ -36,6 +36,7 @@ CHECKASMOBJS-$(CONFIG_AVCODEC)  +=
>> $(AVCODECOBJS-yes)
>>>>  AVFILTEROBJS-$(CONFIG_AFIR_FILTER) += af_afir.o
>>>>  AVFILTEROBJS-$(CONFIG_BLEND_FILTER) += vf_blend.o
>>>>  AVFILTEROBJS-$(CONFIG_COLORSPACE_FILTER) += vf_colorspace.o
>>>> +AVFILTEROBJS-$(CONFIG_EQ_FILTER) += vf_eq.o
>>>>  AVFILTEROBJS-$(CONFIG_GBLUR_FILTER)  += vf_gblur.o
>>>>  AVFILTEROBJS-$(CONFIG_HFLIP_FILTER)  += vf_hflip.o
>>>>  AVFILTEROBJS-$(CONFIG_THRESHOLD_FILTER)  += vf_threshold.o diff
>>>> --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c index
>>>> d9a5c7f401..bcbe775510 100644
>>>> --- a/tests/checkasm/checkasm.c
>>>> +++ b/tests/checkasm/checkasm.c
>>>> @@ -165,6 +165,9 @@ static const struct {
>>>>  #if CONFIG_COLORSPACE_FILTER
>>>>  { "vf_colorspace", checkasm_check_colorspace },
>>>>  #endif
>>>> +#if CONFIG_EQ_FILTER
>>>> +{ "vf_eq", checkasm_check_vf_eq },
>>>> +#endif
>>>>  #if CONFIG_GBLUR_FILTER
>>>>  { "vf_gblur", checkasm_check_vf_gblur },
>>>>  #endif
>>>> dif

Re: [FFmpeg-devel] [PATCH V2 1/3] checkasm/vf_eq: add test for vf_eq

2019-09-26 Thread Fu, Ting


> -Original Message-
> From: ffmpeg-devel  On Behalf Of James
> Almer
> Sent: Thursday, September 26, 2019 11:20 PM
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH V2 1/3] checkasm/vf_eq: add test for vf_eq
> 
> On 9/26/2019 11:43 AM, Andreas Rheinhardt wrote:
> > Ting Fu:
> >> Signed-off-by: Ting Fu 
> >> ---
> >>  libavfilter/vf_eq.c   | 13 ---
> >>  libavfilter/vf_eq.h   |  1 +
> >>  tests/checkasm/Makefile   |  1 +
> >>  tests/checkasm/checkasm.c |  3 ++
> >>  tests/checkasm/checkasm.h |  1 +
> >>  tests/checkasm/vf_eq.c| 79
> +++
> >>  tests/fate/checkasm.mak   |  1 +
> >>  7 files changed, 94 insertions(+), 5 deletions(-)  create mode
> >> 100644 tests/checkasm/vf_eq.c
> >>
> >> diff --git a/libavfilter/vf_eq.c b/libavfilter/vf_eq.c index
> >> 2c4c7e4d54..0f9d129255 100644
> >> --- a/libavfilter/vf_eq.c
> >> +++ b/libavfilter/vf_eq.c
> >> @@ -174,12 +174,18 @@ static int set_expr(AVExpr **pexpr, const char
> *expr, const char *option, void *
> >>  return 0;
> >>  }
> >>
> >> +void ff_eq_init(EQContext *eq)
> >> +{
> >> +eq->process = process_c;
> >> +if (ARCH_X86)
> >> +ff_eq_init_x86(eq);
> >> +}
> >> +
> >>  static int initialize(AVFilterContext *ctx)  {
> >>  EQContext *eq = ctx->priv;
> >>  int ret;
> >> -
> >> -eq->process = process_c;
> >> +ff_eq_init(eq);
> >>
> >>  if ((ret = set_expr(>contrast_pexpr, eq->contrast_expr, 
> >> "contrast",
> ctx)) < 0 ||
> >>  (ret = set_expr(>brightness_pexpr,   eq->brightness_expr,
> "brightness",   ctx)) < 0 ||
> >> @@ -191,9 +197,6 @@ static int initialize(AVFilterContext *ctx)
> >>  (ret = set_expr(>gamma_weight_pexpr, eq->gamma_weight_expr,
> "gamma_weight", ctx)) < 0 )
> >>  return ret;
> >>
> >> -if (ARCH_X86)
> >> -ff_eq_init_x86(eq);
> >> -
> >>  if (eq->eval_mode == EVAL_MODE_INIT) {
> >>  set_gamma(eq);
> >>  set_contrast(eq);
> >> diff --git a/libavfilter/vf_eq.h b/libavfilter/vf_eq.h index
> >> fa49d46e5c..cd0cd75f08 100644
> >> --- a/libavfilter/vf_eq.h
> >> +++ b/libavfilter/vf_eq.h
> >> @@ -100,6 +100,7 @@ typedef struct EQContext {
> >>  enum EvalMode { EVAL_MODE_INIT, EVAL_MODE_FRAME,
> EVAL_MODE_NB }
> >> eval_mode;  } EQContext;
> >>
> >> +void ff_eq_init(EQContext *eq);
> >>  void ff_eq_init_x86(EQContext *eq);
> >>
> >>  #endif /* AVFILTER_EQ_H */
> >> diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile index
> >> 0112ff603e..de850c016e 100644
> >> --- a/tests/checkasm/Makefile
> >> +++ b/tests/checkasm/Makefile
> >> @@ -36,6 +36,7 @@ CHECKASMOBJS-$(CONFIG_AVCODEC)  +=
> $(AVCODECOBJS-yes)
> >>  AVFILTEROBJS-$(CONFIG_AFIR_FILTER) += af_afir.o
> >>  AVFILTEROBJS-$(CONFIG_BLEND_FILTER) += vf_blend.o
> >>  AVFILTEROBJS-$(CONFIG_COLORSPACE_FILTER) += vf_colorspace.o
> >> +AVFILTEROBJS-$(CONFIG_EQ_FILTER) += vf_eq.o
> >>  AVFILTEROBJS-$(CONFIG_GBLUR_FILTER)  += vf_gblur.o
> >>  AVFILTEROBJS-$(CONFIG_HFLIP_FILTER)  += vf_hflip.o
> >>  AVFILTEROBJS-$(CONFIG_THRESHOLD_FILTER)  += vf_threshold.o diff
> >> --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c index
> >> d9a5c7f401..bcbe775510 100644
> >> --- a/tests/checkasm/checkasm.c
> >> +++ b/tests/checkasm/checkasm.c
> >> @@ -165,6 +165,9 @@ static const struct {
> >>  #if CONFIG_COLORSPACE_FILTER
> >>  { "vf_colorspace", checkasm_check_colorspace },
> >>  #endif
> >> +#if CONFIG_EQ_FILTER
> >> +{ "vf_eq", checkasm_check_vf_eq },
> >> +#endif
> >>  #if CONFIG_GBLUR_FILTER
> >>  { "vf_gblur", checkasm_check_vf_gblur },
> >>  #endif
> >> diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h
> >> index fdf9eeb75d..0a7f9f25c4 100644
> >> --- a/tests/checkasm/checkasm.h
> >> +++ b/tests/checkasm/checkasm.h
> >> @@ -72,6 +72,7 @@ void checkasm_check_sw_rgb(void);  void
> >> checkasm_check_utvideodsp(void);  void checkasm_check_v210dec(void);
> >> 

Re: [FFmpeg-devel] [PATCH V2 1/3] checkasm/vf_eq: add test for vf_eq

2019-09-26 Thread James Almer
On 9/26/2019 11:43 AM, Andreas Rheinhardt wrote:
> Ting Fu:
>> Signed-off-by: Ting Fu 
>> ---
>>  libavfilter/vf_eq.c   | 13 ---
>>  libavfilter/vf_eq.h   |  1 +
>>  tests/checkasm/Makefile   |  1 +
>>  tests/checkasm/checkasm.c |  3 ++
>>  tests/checkasm/checkasm.h |  1 +
>>  tests/checkasm/vf_eq.c| 79 +++
>>  tests/fate/checkasm.mak   |  1 +
>>  7 files changed, 94 insertions(+), 5 deletions(-)
>>  create mode 100644 tests/checkasm/vf_eq.c
>>
>> diff --git a/libavfilter/vf_eq.c b/libavfilter/vf_eq.c
>> index 2c4c7e4d54..0f9d129255 100644
>> --- a/libavfilter/vf_eq.c
>> +++ b/libavfilter/vf_eq.c
>> @@ -174,12 +174,18 @@ static int set_expr(AVExpr **pexpr, const char *expr, 
>> const char *option, void *
>>  return 0;
>>  }
>>  
>> +void ff_eq_init(EQContext *eq)
>> +{
>> +eq->process = process_c;
>> +if (ARCH_X86)
>> +ff_eq_init_x86(eq);
>> +}
>> +
>>  static int initialize(AVFilterContext *ctx)
>>  {
>>  EQContext *eq = ctx->priv;
>>  int ret;
>> -
>> -eq->process = process_c;
>> +ff_eq_init(eq);
>>  
>>  if ((ret = set_expr(>contrast_pexpr, eq->contrast_expr, 
>> "contrast", ctx)) < 0 ||
>>  (ret = set_expr(>brightness_pexpr,   eq->brightness_expr,   
>> "brightness",   ctx)) < 0 ||
>> @@ -191,9 +197,6 @@ static int initialize(AVFilterContext *ctx)
>>  (ret = set_expr(>gamma_weight_pexpr, eq->gamma_weight_expr, 
>> "gamma_weight", ctx)) < 0 )
>>  return ret;
>>  
>> -if (ARCH_X86)
>> -ff_eq_init_x86(eq);
>> -
>>  if (eq->eval_mode == EVAL_MODE_INIT) {
>>  set_gamma(eq);
>>  set_contrast(eq);
>> diff --git a/libavfilter/vf_eq.h b/libavfilter/vf_eq.h
>> index fa49d46e5c..cd0cd75f08 100644
>> --- a/libavfilter/vf_eq.h
>> +++ b/libavfilter/vf_eq.h
>> @@ -100,6 +100,7 @@ typedef struct EQContext {
>>  enum EvalMode { EVAL_MODE_INIT, EVAL_MODE_FRAME, EVAL_MODE_NB } 
>> eval_mode;
>>  } EQContext;
>>  
>> +void ff_eq_init(EQContext *eq);
>>  void ff_eq_init_x86(EQContext *eq);
>>  
>>  #endif /* AVFILTER_EQ_H */
>> diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile
>> index 0112ff603e..de850c016e 100644
>> --- a/tests/checkasm/Makefile
>> +++ b/tests/checkasm/Makefile
>> @@ -36,6 +36,7 @@ CHECKASMOBJS-$(CONFIG_AVCODEC)  += 
>> $(AVCODECOBJS-yes)
>>  AVFILTEROBJS-$(CONFIG_AFIR_FILTER) += af_afir.o
>>  AVFILTEROBJS-$(CONFIG_BLEND_FILTER) += vf_blend.o
>>  AVFILTEROBJS-$(CONFIG_COLORSPACE_FILTER) += vf_colorspace.o
>> +AVFILTEROBJS-$(CONFIG_EQ_FILTER) += vf_eq.o
>>  AVFILTEROBJS-$(CONFIG_GBLUR_FILTER)  += vf_gblur.o
>>  AVFILTEROBJS-$(CONFIG_HFLIP_FILTER)  += vf_hflip.o
>>  AVFILTEROBJS-$(CONFIG_THRESHOLD_FILTER)  += vf_threshold.o
>> diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c
>> index d9a5c7f401..bcbe775510 100644
>> --- a/tests/checkasm/checkasm.c
>> +++ b/tests/checkasm/checkasm.c
>> @@ -165,6 +165,9 @@ static const struct {
>>  #if CONFIG_COLORSPACE_FILTER
>>  { "vf_colorspace", checkasm_check_colorspace },
>>  #endif
>> +#if CONFIG_EQ_FILTER
>> +{ "vf_eq", checkasm_check_vf_eq },
>> +#endif
>>  #if CONFIG_GBLUR_FILTER
>>  { "vf_gblur", checkasm_check_vf_gblur },
>>  #endif
>> diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h
>> index fdf9eeb75d..0a7f9f25c4 100644
>> --- a/tests/checkasm/checkasm.h
>> +++ b/tests/checkasm/checkasm.h
>> @@ -72,6 +72,7 @@ void checkasm_check_sw_rgb(void);
>>  void checkasm_check_utvideodsp(void);
>>  void checkasm_check_v210dec(void);
>>  void checkasm_check_v210enc(void);
>> +void checkasm_check_vf_eq(void);
>>  void checkasm_check_vf_gblur(void);
>>  void checkasm_check_vf_hflip(void);
>>  void checkasm_check_vf_threshold(void);
>> diff --git a/tests/checkasm/vf_eq.c b/tests/checkasm/vf_eq.c
>> new file mode 100644
>> index 00..684718f2cd
>> --- /dev/null
>> +++ b/tests/checkasm/vf_eq.c
>> @@ -0,0 +1,79 @@
>> +/*
>> + * This file is part of FFmpeg.
>> + *
>> + * FFmpeg is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License as published by
>> + * the Free Software Foundation; either version 2 of the License, or
>> + * (at your option) any later version.
>> + *
>> + * FFmpeg is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> + * GNU General Public License for more details.
>> + *
>> + * You should have received a copy of the GNU General Public License along
>> + * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
>> + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
>> + */
>> +
>> +#include 
>> +#include "checkasm.h"
>> +#include "libavfilter/avfilter.h"
>> +#include "libavfilter/vf_eq.h"
>> +#include "libavutil/intreadwrite.h"
>> +
>> +#define WIDTH 256
>> 

Re: [FFmpeg-devel] [PATCH V2 1/3] checkasm/vf_eq: add test for vf_eq

2019-09-26 Thread Andreas Rheinhardt
Ting Fu:
> Signed-off-by: Ting Fu 
> ---
>  libavfilter/vf_eq.c   | 13 ---
>  libavfilter/vf_eq.h   |  1 +
>  tests/checkasm/Makefile   |  1 +
>  tests/checkasm/checkasm.c |  3 ++
>  tests/checkasm/checkasm.h |  1 +
>  tests/checkasm/vf_eq.c| 79 +++
>  tests/fate/checkasm.mak   |  1 +
>  7 files changed, 94 insertions(+), 5 deletions(-)
>  create mode 100644 tests/checkasm/vf_eq.c
> 
> diff --git a/libavfilter/vf_eq.c b/libavfilter/vf_eq.c
> index 2c4c7e4d54..0f9d129255 100644
> --- a/libavfilter/vf_eq.c
> +++ b/libavfilter/vf_eq.c
> @@ -174,12 +174,18 @@ static int set_expr(AVExpr **pexpr, const char *expr, 
> const char *option, void *
>  return 0;
>  }
>  
> +void ff_eq_init(EQContext *eq)
> +{
> +eq->process = process_c;
> +if (ARCH_X86)
> +ff_eq_init_x86(eq);
> +}
> +
>  static int initialize(AVFilterContext *ctx)
>  {
>  EQContext *eq = ctx->priv;
>  int ret;
> -
> -eq->process = process_c;
> +ff_eq_init(eq);
>  
>  if ((ret = set_expr(>contrast_pexpr, eq->contrast_expr, 
> "contrast", ctx)) < 0 ||
>  (ret = set_expr(>brightness_pexpr,   eq->brightness_expr,   
> "brightness",   ctx)) < 0 ||
> @@ -191,9 +197,6 @@ static int initialize(AVFilterContext *ctx)
>  (ret = set_expr(>gamma_weight_pexpr, eq->gamma_weight_expr, 
> "gamma_weight", ctx)) < 0 )
>  return ret;
>  
> -if (ARCH_X86)
> -ff_eq_init_x86(eq);
> -
>  if (eq->eval_mode == EVAL_MODE_INIT) {
>  set_gamma(eq);
>  set_contrast(eq);
> diff --git a/libavfilter/vf_eq.h b/libavfilter/vf_eq.h
> index fa49d46e5c..cd0cd75f08 100644
> --- a/libavfilter/vf_eq.h
> +++ b/libavfilter/vf_eq.h
> @@ -100,6 +100,7 @@ typedef struct EQContext {
>  enum EvalMode { EVAL_MODE_INIT, EVAL_MODE_FRAME, EVAL_MODE_NB } 
> eval_mode;
>  } EQContext;
>  
> +void ff_eq_init(EQContext *eq);
>  void ff_eq_init_x86(EQContext *eq);
>  
>  #endif /* AVFILTER_EQ_H */
> diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile
> index 0112ff603e..de850c016e 100644
> --- a/tests/checkasm/Makefile
> +++ b/tests/checkasm/Makefile
> @@ -36,6 +36,7 @@ CHECKASMOBJS-$(CONFIG_AVCODEC)  += 
> $(AVCODECOBJS-yes)
>  AVFILTEROBJS-$(CONFIG_AFIR_FILTER) += af_afir.o
>  AVFILTEROBJS-$(CONFIG_BLEND_FILTER) += vf_blend.o
>  AVFILTEROBJS-$(CONFIG_COLORSPACE_FILTER) += vf_colorspace.o
> +AVFILTEROBJS-$(CONFIG_EQ_FILTER) += vf_eq.o
>  AVFILTEROBJS-$(CONFIG_GBLUR_FILTER)  += vf_gblur.o
>  AVFILTEROBJS-$(CONFIG_HFLIP_FILTER)  += vf_hflip.o
>  AVFILTEROBJS-$(CONFIG_THRESHOLD_FILTER)  += vf_threshold.o
> diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c
> index d9a5c7f401..bcbe775510 100644
> --- a/tests/checkasm/checkasm.c
> +++ b/tests/checkasm/checkasm.c
> @@ -165,6 +165,9 @@ static const struct {
>  #if CONFIG_COLORSPACE_FILTER
>  { "vf_colorspace", checkasm_check_colorspace },
>  #endif
> +#if CONFIG_EQ_FILTER
> +{ "vf_eq", checkasm_check_vf_eq },
> +#endif
>  #if CONFIG_GBLUR_FILTER
>  { "vf_gblur", checkasm_check_vf_gblur },
>  #endif
> diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h
> index fdf9eeb75d..0a7f9f25c4 100644
> --- a/tests/checkasm/checkasm.h
> +++ b/tests/checkasm/checkasm.h
> @@ -72,6 +72,7 @@ void checkasm_check_sw_rgb(void);
>  void checkasm_check_utvideodsp(void);
>  void checkasm_check_v210dec(void);
>  void checkasm_check_v210enc(void);
> +void checkasm_check_vf_eq(void);
>  void checkasm_check_vf_gblur(void);
>  void checkasm_check_vf_hflip(void);
>  void checkasm_check_vf_threshold(void);
> diff --git a/tests/checkasm/vf_eq.c b/tests/checkasm/vf_eq.c
> new file mode 100644
> index 00..684718f2cd
> --- /dev/null
> +++ b/tests/checkasm/vf_eq.c
> @@ -0,0 +1,79 @@
> +/*
> + * This file is part of FFmpeg.
> + *
> + * FFmpeg is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * FFmpeg is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License along
> + * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
> + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
> + */
> +
> +#include 
> +#include "checkasm.h"
> +#include "libavfilter/avfilter.h"
> +#include "libavfilter/vf_eq.h"
> +#include "libavutil/intreadwrite.h"
> +
> +#define WIDTH 256
> +#define HEIGHT 256
> +#define SRC_STRIDE 256
> +#define PIXELS (WIDTH * HEIGHT)
> +#define RANDOM_RANGE 8
> +#define SCALE 1
> +
> +#define randomize_buffers(buf, size)  \

Re: [FFmpeg-devel] [PATCH V2 1/3] checkasm/vf_eq: add test for vf_eq

2019-09-24 Thread Song, Ruiling
> -Original Message-
> From: ffmpeg-devel  On Behalf Of Li,
> Zhong
> Sent: Tuesday, September 24, 2019 2:34 PM
> To: FFmpeg development discussions and patches  de...@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH V2 1/3] checkasm/vf_eq: add test for
> vf_eq
> 
> > From: ffmpeg-devel  On Behalf Of
> Ting Fu
> > Sent: Wednesday, September 18, 2019 3:06 PM
> > To: ffmpeg-devel@ffmpeg.org
> > Subject: [FFmpeg-devel] [PATCH V2 1/3] checkasm/vf_eq: add test for
> vf_eq
> >
> > Signed-off-by: Ting Fu 
> > ---
> >  libavfilter/vf_eq.c   | 13 ---
> >  libavfilter/vf_eq.h   |  1 +
> >  tests/checkasm/Makefile   |  1 +
> >  tests/checkasm/checkasm.c |  3 ++
> >  tests/checkasm/checkasm.h |  1 +
> >  tests/checkasm/vf_eq.c| 79
> +++
[...]
> > +declare_func(void, EQParameters *param, uint8_t *dst, int dst_stride,
> > + const uint8_t *src, int src_stride, int w, int h);
> > +
> > +memset(src, 0, PIXELS);
> 
> Looks it is redundant with randomize_buffers() and make performance drop
Will remove and apply.
> 
> > +memset(dst_ref, 0, PIXELS);
> > +memset(dst_new, 0, PIXELS);
> > +randomize_buffers(src, PIXELS);
> > +ff_eq_init();
> > +
[...]
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH V2 1/3] checkasm/vf_eq: add test for vf_eq

2019-09-24 Thread Li, Zhong
> From: ffmpeg-devel  On Behalf Of Ting Fu
> Sent: Wednesday, September 18, 2019 3:06 PM
> To: ffmpeg-devel@ffmpeg.org
> Subject: [FFmpeg-devel] [PATCH V2 1/3] checkasm/vf_eq: add test for vf_eq
> 
> Signed-off-by: Ting Fu 
> ---
>  libavfilter/vf_eq.c   | 13 ---
>  libavfilter/vf_eq.h   |  1 +
>  tests/checkasm/Makefile   |  1 +
>  tests/checkasm/checkasm.c |  3 ++
>  tests/checkasm/checkasm.h |  1 +
>  tests/checkasm/vf_eq.c| 79 +++
>  tests/fate/checkasm.mak   |  1 +
>  7 files changed, 94 insertions(+), 5 deletions(-)  create mode 100644
> tests/checkasm/vf_eq.c
> 
> diff --git a/libavfilter/vf_eq.c b/libavfilter/vf_eq.c index 
> 2c4c7e4d54..0f9d129255
> 100644
> --- a/libavfilter/vf_eq.c
> +++ b/libavfilter/vf_eq.c
> @@ -174,12 +174,18 @@ static int set_expr(AVExpr **pexpr, const char *expr,
> const char *option, void *
>  return 0;
>  }
> 
> +void ff_eq_init(EQContext *eq)
> +{
> +eq->process = process_c;
> +if (ARCH_X86)
> +ff_eq_init_x86(eq);
> +}
> +
>  static int initialize(AVFilterContext *ctx)  {
>  EQContext *eq = ctx->priv;
>  int ret;
> -
> -eq->process = process_c;
> +ff_eq_init(eq);
> 
>  if ((ret = set_expr(>contrast_pexpr, eq->contrast_expr, 
> "contrast",
> ctx)) < 0 ||
>  (ret = set_expr(>brightness_pexpr,   eq->brightness_expr,   
> "brightness",
> ctx)) < 0 ||
> @@ -191,9 +197,6 @@ static int initialize(AVFilterContext *ctx)
>  (ret = set_expr(>gamma_weight_pexpr, eq->gamma_weight_expr,
> "gamma_weight", ctx)) < 0 )
>  return ret;
> 
> -if (ARCH_X86)
> -ff_eq_init_x86(eq);
> -
>  if (eq->eval_mode == EVAL_MODE_INIT) {
>  set_gamma(eq);
>  set_contrast(eq);
> diff --git a/libavfilter/vf_eq.h b/libavfilter/vf_eq.h index 
> fa49d46e5c..cd0cd75f08
> 100644
> --- a/libavfilter/vf_eq.h
> +++ b/libavfilter/vf_eq.h
> @@ -100,6 +100,7 @@ typedef struct EQContext {
>  enum EvalMode { EVAL_MODE_INIT, EVAL_MODE_FRAME, EVAL_MODE_NB }
> eval_mode;  } EQContext;
> 
> +void ff_eq_init(EQContext *eq);
>  void ff_eq_init_x86(EQContext *eq);
> 
>  #endif /* AVFILTER_EQ_H */
> diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile index
> 0112ff603e..de850c016e 100644
> --- a/tests/checkasm/Makefile
> +++ b/tests/checkasm/Makefile
> @@ -36,6 +36,7 @@ CHECKASMOBJS-$(CONFIG_AVCODEC)  +=
> $(AVCODECOBJS-yes)
>  AVFILTEROBJS-$(CONFIG_AFIR_FILTER) += af_afir.o
>  AVFILTEROBJS-$(CONFIG_BLEND_FILTER) += vf_blend.o
>  AVFILTEROBJS-$(CONFIG_COLORSPACE_FILTER) += vf_colorspace.o
> +AVFILTEROBJS-$(CONFIG_EQ_FILTER) += vf_eq.o
>  AVFILTEROBJS-$(CONFIG_GBLUR_FILTER)  += vf_gblur.o
>  AVFILTEROBJS-$(CONFIG_HFLIP_FILTER)  += vf_hflip.o
>  AVFILTEROBJS-$(CONFIG_THRESHOLD_FILTER)  += vf_threshold.o diff --git
> a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c index
> d9a5c7f401..bcbe775510 100644
> --- a/tests/checkasm/checkasm.c
> +++ b/tests/checkasm/checkasm.c
> @@ -165,6 +165,9 @@ static const struct {
>  #if CONFIG_COLORSPACE_FILTER
>  { "vf_colorspace", checkasm_check_colorspace },
>  #endif
> +#if CONFIG_EQ_FILTER
> +{ "vf_eq", checkasm_check_vf_eq },
> +#endif
>  #if CONFIG_GBLUR_FILTER
>  { "vf_gblur", checkasm_check_vf_gblur },
>  #endif
> diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h index
> fdf9eeb75d..0a7f9f25c4 100644
> --- a/tests/checkasm/checkasm.h
> +++ b/tests/checkasm/checkasm.h
> @@ -72,6 +72,7 @@ void checkasm_check_sw_rgb(void);  void
> checkasm_check_utvideodsp(void);  void checkasm_check_v210dec(void);  void
> checkasm_check_v210enc(void);
> +void checkasm_check_vf_eq(void);
>  void checkasm_check_vf_gblur(void);
>  void checkasm_check_vf_hflip(void);
>  void checkasm_check_vf_threshold(void);
> diff --git a/tests/checkasm/vf_eq.c b/tests/checkasm/vf_eq.c new file mode
> 100644 index 00..684718f2cd
> --- /dev/null
> +++ b/tests/checkasm/vf_eq.c
> @@ -0,0 +1,79 @@
> +/*
> + * This file is part of FFmpeg.
> + *
> + * FFmpeg is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * FFmpeg is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR

Re: [FFmpeg-devel] [PATCH V2 1/3] checkasm/vf_eq: add test for vf_eq

2019-09-23 Thread Song, Ruiling
> -Original Message-
> From: ffmpeg-devel  On Behalf Of
> Ting Fu
> Sent: Wednesday, September 18, 2019 3:06 PM
> To: ffmpeg-devel@ffmpeg.org
> Subject: [FFmpeg-devel] [PATCH V2 1/3] checkasm/vf_eq: add test for vf_eq
> 
> Signed-off-by: Ting Fu 

The patchset LGTM. Have also verified on linux64, win64 and linux32.
Will apply the patches if no objection.
There are some indention errors, have fixed them locally. Please take care next 
time.

Ruiling

> ---
>  libavfilter/vf_eq.c   | 13 ---
>  libavfilter/vf_eq.h   |  1 +
>  tests/checkasm/Makefile   |  1 +
>  tests/checkasm/checkasm.c |  3 ++
>  tests/checkasm/checkasm.h |  1 +
>  tests/checkasm/vf_eq.c| 79
> +++
>  tests/fate/checkasm.mak   |  1 +
>  7 files changed, 94 insertions(+), 5 deletions(-)
>  create mode 100644 tests/checkasm/vf_eq.c
> 
> diff --git a/libavfilter/vf_eq.c b/libavfilter/vf_eq.c
> index 2c4c7e4d54..0f9d129255 100644
> --- a/libavfilter/vf_eq.c
> +++ b/libavfilter/vf_eq.c
> @@ -174,12 +174,18 @@ static int set_expr(AVExpr **pexpr, const char
> *expr, const char *option, void *
>  return 0;
>  }
> 
> +void ff_eq_init(EQContext *eq)
> +{
> +eq->process = process_c;
> +if (ARCH_X86)
> +ff_eq_init_x86(eq);
> +}
> +
>  static int initialize(AVFilterContext *ctx)
>  {
>  EQContext *eq = ctx->priv;
>  int ret;
> -
> -eq->process = process_c;
> +ff_eq_init(eq);
> 
>  if ((ret = set_expr(>contrast_pexpr, eq->contrast_expr,
> "contrast", ctx)) < 0 ||
>  (ret = set_expr(>brightness_pexpr,   eq->brightness_expr,
> "brightness",   ctx)) < 0 ||
> @@ -191,9 +197,6 @@ static int initialize(AVFilterContext *ctx)
>  (ret = set_expr(>gamma_weight_pexpr, eq->gamma_weight_expr,
> "gamma_weight", ctx)) < 0 )
>  return ret;
> 
> -if (ARCH_X86)
> -ff_eq_init_x86(eq);
> -
>  if (eq->eval_mode == EVAL_MODE_INIT) {
>  set_gamma(eq);
>  set_contrast(eq);
> diff --git a/libavfilter/vf_eq.h b/libavfilter/vf_eq.h
> index fa49d46e5c..cd0cd75f08 100644
> --- a/libavfilter/vf_eq.h
> +++ b/libavfilter/vf_eq.h
> @@ -100,6 +100,7 @@ typedef struct EQContext {
>  enum EvalMode { EVAL_MODE_INIT, EVAL_MODE_FRAME,
> EVAL_MODE_NB } eval_mode;
>  } EQContext;
> 
> +void ff_eq_init(EQContext *eq);
>  void ff_eq_init_x86(EQContext *eq);
> 
>  #endif /* AVFILTER_EQ_H */
> diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile
> index 0112ff603e..de850c016e 100644
> --- a/tests/checkasm/Makefile
> +++ b/tests/checkasm/Makefile
> @@ -36,6 +36,7 @@ CHECKASMOBJS-$(CONFIG_AVCODEC)  +=
> $(AVCODECOBJS-yes)
>  AVFILTEROBJS-$(CONFIG_AFIR_FILTER) += af_afir.o
>  AVFILTEROBJS-$(CONFIG_BLEND_FILTER) += vf_blend.o
>  AVFILTEROBJS-$(CONFIG_COLORSPACE_FILTER) += vf_colorspace.o
> +AVFILTEROBJS-$(CONFIG_EQ_FILTER) += vf_eq.o
>  AVFILTEROBJS-$(CONFIG_GBLUR_FILTER)  += vf_gblur.o
>  AVFILTEROBJS-$(CONFIG_HFLIP_FILTER)  += vf_hflip.o
>  AVFILTEROBJS-$(CONFIG_THRESHOLD_FILTER)  += vf_threshold.o
> diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c
> index d9a5c7f401..bcbe775510 100644
> --- a/tests/checkasm/checkasm.c
> +++ b/tests/checkasm/checkasm.c
> @@ -165,6 +165,9 @@ static const struct {
>  #if CONFIG_COLORSPACE_FILTER
>  { "vf_colorspace", checkasm_check_colorspace },
>  #endif
> +#if CONFIG_EQ_FILTER
> +{ "vf_eq", checkasm_check_vf_eq },
> +#endif
>  #if CONFIG_GBLUR_FILTER
>  { "vf_gblur", checkasm_check_vf_gblur },
>  #endif
> diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h
> index fdf9eeb75d..0a7f9f25c4 100644
> --- a/tests/checkasm/checkasm.h
> +++ b/tests/checkasm/checkasm.h
> @@ -72,6 +72,7 @@ void checkasm_check_sw_rgb(void);
>  void checkasm_check_utvideodsp(void);
>  void checkasm_check_v210dec(void);
>  void checkasm_check_v210enc(void);
> +void checkasm_check_vf_eq(void);
>  void checkasm_check_vf_gblur(void);
>  void checkasm_check_vf_hflip(void);
>  void checkasm_check_vf_threshold(void);
> diff --git a/tests/checkasm/vf_eq.c b/tests/checkasm/vf_eq.c
> new file mode 100644
> index 00..684718f2cd
> --- /dev/null
> +++ b/tests/checkasm/vf_eq.c
> @@ -0,0 +1,79 @@
> +/*
> + * This file is part of FFmpeg.
> + *
> + * FFmpeg is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at

[FFmpeg-devel] [PATCH V2 1/3] checkasm/vf_eq: add test for vf_eq

2019-09-18 Thread Ting Fu
Signed-off-by: Ting Fu 
---
 libavfilter/vf_eq.c   | 13 ---
 libavfilter/vf_eq.h   |  1 +
 tests/checkasm/Makefile   |  1 +
 tests/checkasm/checkasm.c |  3 ++
 tests/checkasm/checkasm.h |  1 +
 tests/checkasm/vf_eq.c| 79 +++
 tests/fate/checkasm.mak   |  1 +
 7 files changed, 94 insertions(+), 5 deletions(-)
 create mode 100644 tests/checkasm/vf_eq.c

diff --git a/libavfilter/vf_eq.c b/libavfilter/vf_eq.c
index 2c4c7e4d54..0f9d129255 100644
--- a/libavfilter/vf_eq.c
+++ b/libavfilter/vf_eq.c
@@ -174,12 +174,18 @@ static int set_expr(AVExpr **pexpr, const char *expr, 
const char *option, void *
 return 0;
 }
 
+void ff_eq_init(EQContext *eq)
+{
+eq->process = process_c;
+if (ARCH_X86)
+ff_eq_init_x86(eq);
+}
+
 static int initialize(AVFilterContext *ctx)
 {
 EQContext *eq = ctx->priv;
 int ret;
-
-eq->process = process_c;
+ff_eq_init(eq);
 
 if ((ret = set_expr(>contrast_pexpr, eq->contrast_expr, 
"contrast", ctx)) < 0 ||
 (ret = set_expr(>brightness_pexpr,   eq->brightness_expr,   
"brightness",   ctx)) < 0 ||
@@ -191,9 +197,6 @@ static int initialize(AVFilterContext *ctx)
 (ret = set_expr(>gamma_weight_pexpr, eq->gamma_weight_expr, 
"gamma_weight", ctx)) < 0 )
 return ret;
 
-if (ARCH_X86)
-ff_eq_init_x86(eq);
-
 if (eq->eval_mode == EVAL_MODE_INIT) {
 set_gamma(eq);
 set_contrast(eq);
diff --git a/libavfilter/vf_eq.h b/libavfilter/vf_eq.h
index fa49d46e5c..cd0cd75f08 100644
--- a/libavfilter/vf_eq.h
+++ b/libavfilter/vf_eq.h
@@ -100,6 +100,7 @@ typedef struct EQContext {
 enum EvalMode { EVAL_MODE_INIT, EVAL_MODE_FRAME, EVAL_MODE_NB } eval_mode;
 } EQContext;
 
+void ff_eq_init(EQContext *eq);
 void ff_eq_init_x86(EQContext *eq);
 
 #endif /* AVFILTER_EQ_H */
diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile
index 0112ff603e..de850c016e 100644
--- a/tests/checkasm/Makefile
+++ b/tests/checkasm/Makefile
@@ -36,6 +36,7 @@ CHECKASMOBJS-$(CONFIG_AVCODEC)  += $(AVCODECOBJS-yes)
 AVFILTEROBJS-$(CONFIG_AFIR_FILTER) += af_afir.o
 AVFILTEROBJS-$(CONFIG_BLEND_FILTER) += vf_blend.o
 AVFILTEROBJS-$(CONFIG_COLORSPACE_FILTER) += vf_colorspace.o
+AVFILTEROBJS-$(CONFIG_EQ_FILTER) += vf_eq.o
 AVFILTEROBJS-$(CONFIG_GBLUR_FILTER)  += vf_gblur.o
 AVFILTEROBJS-$(CONFIG_HFLIP_FILTER)  += vf_hflip.o
 AVFILTEROBJS-$(CONFIG_THRESHOLD_FILTER)  += vf_threshold.o
diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c
index d9a5c7f401..bcbe775510 100644
--- a/tests/checkasm/checkasm.c
+++ b/tests/checkasm/checkasm.c
@@ -165,6 +165,9 @@ static const struct {
 #if CONFIG_COLORSPACE_FILTER
 { "vf_colorspace", checkasm_check_colorspace },
 #endif
+#if CONFIG_EQ_FILTER
+{ "vf_eq", checkasm_check_vf_eq },
+#endif
 #if CONFIG_GBLUR_FILTER
 { "vf_gblur", checkasm_check_vf_gblur },
 #endif
diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h
index fdf9eeb75d..0a7f9f25c4 100644
--- a/tests/checkasm/checkasm.h
+++ b/tests/checkasm/checkasm.h
@@ -72,6 +72,7 @@ void checkasm_check_sw_rgb(void);
 void checkasm_check_utvideodsp(void);
 void checkasm_check_v210dec(void);
 void checkasm_check_v210enc(void);
+void checkasm_check_vf_eq(void);
 void checkasm_check_vf_gblur(void);
 void checkasm_check_vf_hflip(void);
 void checkasm_check_vf_threshold(void);
diff --git a/tests/checkasm/vf_eq.c b/tests/checkasm/vf_eq.c
new file mode 100644
index 00..684718f2cd
--- /dev/null
+++ b/tests/checkasm/vf_eq.c
@@ -0,0 +1,79 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include 
+#include "checkasm.h"
+#include "libavfilter/avfilter.h"
+#include "libavfilter/vf_eq.h"
+#include "libavutil/intreadwrite.h"
+
+#define WIDTH 256
+#define HEIGHT 256
+#define SRC_STRIDE 256
+#define PIXELS (WIDTH * HEIGHT)
+#define RANDOM_RANGE 8
+#define SCALE 1
+
+#define randomize_buffers(buf, size)  \
+do {  \
+int j;\
+uint8_t *tmp_buf = (uint8_t *)buf;\
+for (j = 0; j< size ; j++)\
+tmp_buf[j] = rnd() & 0xFF;\
+} while (0)
+
+static void check_eq(void){
+