[Ffmpeg-devel] [PATCH] dct-test simplify test architecture

Michael Niedermayer michaelni
Fri Mar 30 15:59:31 CEST 2007


Hi

On Fri, Mar 30, 2007 at 07:44:20AM -0400, Marc Hoffman wrote:
Content-Description: message body text
> Marc Hoffman writes:
>  > 
>  > Here is a stab at re architecture of the dct test infastructure.
>  > 
> mime text/x-patch
> 
> svn ci -m'dct-test platform independent restructure and code simplification'
> 

Content-Description: dct-test.c patch
[...]
> +/* these are the number of test iterations */
> +#define NB_ITS 20000
> +#define NB_ITS_SPEED 50000
> +
>  #ifndef MAX
>  #define MAX(a, b)  (((a) > (b)) ? (a) : (b))
>  #endif
>  
>  #undef printf
>  
> +#ifndef ARCH_X86
> +#define emms(x)
> +#endif

use emms_c()


[...]
> +struct algo algos[] = {
> +  DCT_ERROR( "REF-DBL", 0, fdct, fdct, test ),
> +  DCT_ERROR("IJG-AAN-INT", 0, fdct_ifast, fdct, test),
> +  DCT_ERROR("IJG-LLM-INT", 0, ff_jpeg_fdct_islow, fdct, test),
> +  DCT_ERROR("REF-DBL", 1, idct, idct, test),
> +  DCT_ERROR("INT", 1, j_rev_dct, idct, test),
> +  DCT_ERROR("SIMPLE-C", 1, simple_idct, idct, test),
> +
> +#ifdef ARCH_X86
> +  DCT_ERROR("MMX", 0, ff_fdct_mmx, fdct, test),
> +  DCT_ERROR("MMX2", 0, ff_fdct_mmx2, fdct, test),
> +  DCT_ERROR("FAAN", 0, ff_faandct, fdct, test),

please align them, something like:

  DCT_ERROR("INT"       , 1, j_rev_dct      , idct, test),
  DCT_ERROR("SIMPLE-C"  , 1, simple_idct    , idct, test),

#ifdef ARCH_X86
  DCT_ERROR("MMX"       , 0, ff_fdct_mmx    , fdct, test),
  DCT_ERROR("MMX2"      , 0, ff_fdct_mmx2   , fdct, test),
  DCT_ERROR("FAAN"      , 0, ff_faandct     , fdct, test),

makes things more readable IMHO


[...]

> -#define NB_ITS 20000
> -#define NB_ITS_SPEED 50000

cosmetic movement (i agree its better at the top but this should be
a seperate patch)


[...]
> +      for (i=0;algos[i].name;i++)
> +	if (algos[i].is_idct == test_idct) {
> +	  dct_error (algos[i].name, algos[i].is_idct, algos[i].func, algos[i].ref, test);

tabs ...

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070330/58b988bf/attachment.pgp>



More information about the ffmpeg-devel mailing list