On Mon, Jul 04, 2011 at 09:34:02AM +0100, Måns Rullgård wrote: > Diego Biurrun <[email protected]> writes: > > > On Mon, Jul 04, 2011 at 01:00:43AM +0100, Mans Rullgard wrote: > >> IDCTs are partially evaluated according to IEEE 1180-1990 (more or > >> less). An override is added to the table for implementations known > >> to not meet the spec requirements. These variants are run but not > >> checked for accuracy. > >> > >> --- a/libavcodec/dct-test.c > >> +++ b/libavcodec/dct-test.c > >> @@ -115,13 +116,13 @@ static const struct algo idct_tab[] = { > >> > >> #if HAVE_MMX > >> #if CONFIG_GPL > >> - {"LIBMPEG2-MMX", ff_mmx_idct, ff_ref_idct, MMX_PERM, > >> AV_CPU_FLAG_MMX}, > >> - {"LIBMPEG2-MMX2", ff_mmxext_idct, ff_ref_idct, MMX_PERM, > >> AV_CPU_FLAG_MMX2}, > >> + {"LIBMPEG2-MMX", ff_mmx_idct, ff_ref_idct, MMX_PERM, > >> AV_CPU_FLAG_MMX, 1}, > >> + {"LIBMPEG2-MMX2", ff_mmxext_idct, ff_ref_idct, MMX_PERM, > >> AV_CPU_FLAG_MMX2, 1}, > >> #endif > >> {"SIMPLE-MMX", ff_simple_idct_mmx, ff_ref_idct, MMX_SIMPLE_PERM, > >> AV_CPU_FLAG_MMX}, > >> - {"XVID-MMX", ff_idct_xvid_mmx, ff_ref_idct, NO_PERM, > >> AV_CPU_FLAG_MMX}, > >> - {"XVID-MMX2", ff_idct_xvid_mmx2, ff_ref_idct, NO_PERM, > >> AV_CPU_FLAG_MMX2}, > >> - {"XVID-SSE2", ff_idct_xvid_sse2, ff_ref_idct, SSE2_PERM, > >> AV_CPU_FLAG_SSE2}, > >> + {"XVID-MMX", ff_idct_xvid_mmx, ff_ref_idct, NO_PERM, > >> AV_CPU_FLAG_MMX, 1}, > >> + {"XVID-MMX2", ff_idct_xvid_mmx2, ff_ref_idct, NO_PERM, > >> AV_CPU_FLAG_MMX2, 1}, > >> + {"XVID-SSE2", ff_idct_xvid_sse2, ff_ref_idct, SSE2_PERM, > >> AV_CPU_FLAG_SSE2, 1}, > >> #endif > > > > Since the other columns are aligned, > > But they are not. > > > the last one could be aligned as well. > > I was going to do another cosmetics pass later. > > >> @@ -200,15 +201,17 @@ static inline void mmx_emms(void) > >> int blockSumErrMax = 0, blockSumErr; > >> AVLFG prng; > >> + double omse, ome; > >> > >> @@ -298,13 +303,21 @@ static void dct_error(const struct algo *dct, int > >> test, int is_idct, int speed) > >> > >> - printf("%s %s: err_inf=%d err2=%0.8f syserr=%0.8f maxout=%d > >> blockSumErr=%d\n", > >> + omse = (double) err2 / NB_ITS / 64; > >> + ome = (double) err_sum / NB_ITS / 64; > > > > Maybe I'm just too tired, but I cannot make sense of these variable names. > > The ones I added are from the IEEE 1180 spec, meaning "overall mean > square error" and "overall mean error". The spec defines a few more > metrics and limits for them, which the test program doesn't compute. > Maybe I'll add those too later.
Looks reasonable, please commit ;) And don't forget about cosmetics later. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
