home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2004 March / PCWELT_3_2004.ISO / pcwsoft / flaskmpeg_078_39_src.z.exe / flaskmpeg / Video / ieee1180test.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-10-28  |  1.3 KB  |  50 lines

  1. // IEEE1180Test.h: interface for the CIEEE1180Test class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4.  
  5. #if !defined(AFX_IEEE1180TEST_H__894E2496_042A_464F_826F_5E579A46138B__INCLUDED_)
  6. #define AFX_IEEE1180TEST_H__894E2496_042A_464F_826F_5E579A46138B__INCLUDED_
  7.  
  8. #if _MSC_VER > 1000
  9. #pragma once
  10. #endif // _MSC_VER > 1000
  11.  
  12. #define DCTSIZE      (8)
  13. #define DCTSIZE2     (DCTSIZE*DCTSIZE)
  14.  
  15. #define EIGHT_BIT_SAMPLES
  16.  
  17. typedef short DCTELEM;        /* must be at least 16 bits */
  18.  
  19. typedef DCTELEM DCTBLOCK[DCTSIZE2];
  20.  
  21.  
  22. class CIEEE1180Test  
  23. {
  24. public:
  25.     CIEEE1180Test();
  26.     virtual ~CIEEE1180Test();
  27.   bool IsIEEE1180( void (* TestIdct)(DCTELEM *block) );
  28. private:
  29.     bool Meets (double val, double limit);
  30.  
  31.     bool DoTest( long minpix, long maxpix, long sign, long niters, void (* TestIdct)(DCTELEM *block) );
  32.     long IEEERand(long L, long H);
  33.     void DCTInit();
  34.     void RefInverseDCT( DCTELEM *block );
  35.     void RefForwardDCT( DCTELEM *block );
  36.  
  37.   /* The cosine lookup table */
  38.   /* coslu[a][b] = C(b)/2 * cos[(2a+1)b*pi/16] */
  39.   double coslu[8][8];
  40.   long sumerrs[DCTSIZE2];
  41.   long sumsqerrs[DCTSIZE2];
  42.   int maxerr[DCTSIZE2];
  43.  
  44.   // Random generator
  45.   long randx;
  46.   double z;
  47. };
  48.  
  49. #endif // !defined(AFX_IEEE1180TEST_H__894E2496_042A_464F_826F_5E579A46138B__INCLUDED_)
  50.