On Thu, Dec 07, 2017 at 09:40:41PM +0100, Martin Vignali wrote: > Hello, > > Patch in attach add a checkasm test for vf_hflip (byte and short) > > Martin
> hflip.h | 1 + > vf_hflip.c | 14 ++++++++++---- > 2 files changed, 11 insertions(+), 4 deletions(-) > cac8c66112fd43e63d2fc734a66a156ad37e3d0d > 0001-avfilter-vf_hflip-move-context-func-init-in.patch > From 16dde326c4ffd8ddf22dbf891c5fc3c093ad8a28 Mon Sep 17 00:00:00 2001 > From: Martin Vignali <martin.vign...@gmail.com> > Date: Thu, 7 Dec 2017 21:35:42 +0100 > Subject: [PATCH 1/2] avfilter/vf_hflip : move context func init in > ff_hflip_init > > --- > libavfilter/hflip.h | 1 + > libavfilter/vf_hflip.c | 14 ++++++++++---- > 2 files changed, 11 insertions(+), 4 deletions(-) > > diff --git a/libavfilter/hflip.h b/libavfilter/hflip.h > index cbe1fb3d8c..204090dbb4 100644 > --- a/libavfilter/hflip.h > +++ b/libavfilter/hflip.h > @@ -33,6 +33,7 @@ typedef struct FlipContext { > void (*flip_line[4])(const uint8_t *src, uint8_t *dst, int w); > } FlipContext; > > +int ff_hflip_init(FlipContext *s, int step[4], int nb_planes); > void ff_hflip_init_x86(FlipContext *s, int step[4], int nb_planes); > > #endif /* AVFILTER_HFLIP_H */ > diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c > index 957ddd9900..b77afc77fc 100644 > --- a/libavfilter/vf_hflip.c > +++ b/libavfilter/vf_hflip.c > @@ -131,7 +131,7 @@ static int config_props(AVFilterLink *inlink) > const AVPixFmtDescriptor *pix_desc = av_pix_fmt_desc_get(inlink->format); > const int hsub = pix_desc->log2_chroma_w; > const int vsub = pix_desc->log2_chroma_h; > - int nb_planes, i; > + int nb_planes; > > av_image_fill_max_pixsteps(s->max_step, NULL, pix_desc); > s->planewidth[0] = s->planewidth[3] = inlink->w; > @@ -141,8 +141,15 @@ static int config_props(AVFilterLink *inlink) > > nb_planes = av_pix_fmt_count_planes(inlink->format); > > + return ff_hflip_init(s, s->max_step, nb_planes); > +} > + > +int ff_hflip_init(FlipContext *s, int step[4], int nb_planes) > +{ > + int i; > + > for (i = 0; i < nb_planes; i++) { > - switch (s->max_step[i]) { > + switch (step[i]) { > case 1: s->flip_line[i] = hflip_byte_c; break; > case 2: s->flip_line[i] = hflip_short_c; break; > case 3: s->flip_line[i] = hflip_b24_c; break; > @@ -153,9 +160,8 @@ static int config_props(AVFilterLink *inlink) > return AVERROR_BUG; > } > } > - > if (ARCH_X86) > - ff_hflip_init_x86(s, s->max_step, nb_planes); > + ff_hflip_init_x86(s, step, nb_planes); > > return 0; > } > -- > 2.11.0 (Apple Git-81) > > checkasm/Makefile | 1 > checkasm/checkasm.c | 3 ++ > checkasm/checkasm.h | 1 > checkasm/vf_hflip.c | 74 > ++++++++++++++++++++++++++++++++++++++++++++++++++++ > fate/checkasm.mak | 1 > 5 files changed, 80 insertions(+) > 8e11138c838a238905257fd6d1ed47be49ee1d37 > 0002-checkasm-vf_hflip-add-test-for-vf_hflip-byte-and-sho.patch > From 1012af32158bc1d387afdc9fc5cacd83894b77d0 Mon Sep 17 00:00:00 2001 > From: Martin Vignali <martin.vign...@gmail.com> > Date: Thu, 7 Dec 2017 21:38:20 +0100 > Subject: [PATCH 2/2] checkasm/vf_hflip : add test for vf_hflip byte and short > simd maybe iam missing something but my box doesnt like your test: TEST checkasm-vf_hflip Test checkasm-vf_hflip failed. Look at tests/data/fate/checkasm-vf_hflip.err for details. make: *** [fate-checkasm-vf_hflip] Error 1 michael@sandybox:~/ffmpeg-git/ffmpeg$ cat tests/data/fate/checkasm-vf_hflip.err checkasm: using random seed 358531722 SSSE3: hflip_byte_ssse3 (vf_hflip.c:63) - vf_hflip.hflip_byte [FAILED] hflip_short_ssse3 (vf_hflip.c:63) - vf_hflip.hflip_short [FAILED] checkasm: 2 of 2 tests have failed [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If a bugfix only changes things apparently unrelated to the bug with no further explanation, that is a good sign that the bugfix is wrong.
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel