[svn] / branches / dev-api-4 / xvidcore / examples / xvid_bench.c Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/examples/xvid_bench.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1230, Sun Nov 30 16:13:16 2003 UTC revision 1261, Sat Dec 13 00:04:09 2003 UTC
# Line 19  Line 19 
19   *  along with this program; if not, write to the Free Software   *  along with this program; if not, write to the Free Software
20   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21   *   *
22   * $Id: xvid_bench.c,v 1.9.2.9 2003-11-30 16:13:15 edgomez Exp $   * $Id: xvid_bench.c,v 1.9.2.10 2003-12-13 00:04:08 edgomez Exp $
23   *   *
24   ****************************************************************************/   ****************************************************************************/
25    
# Line 342  Line 342 
342          int tst;          int tst;
343          CPU *cpu;          CPU *cpu;
344          int i;          int i;
345          uint8_t Cur[16*16], Ref1[16*16], Ref2[16*16];          DECLARE_ALIGNED_MATRIX(Cur,  16, 16, uint8_t, 16);
346            DECLARE_ALIGNED_MATRIX(Ref1, 16, 16, uint8_t, 16);
347            DECLARE_ALIGNED_MATRIX(Ref2, 16, 16, uint8_t, 16);
348    
349          printf( "\n ======  test SAD ======\n" );          printf( "\n ======  test SAD ======\n" );
350          for(i=0; i<16*16;++i) {          for(i=0; i<16*16;++i) {
# Line 634  Line 636 
636    for(q=1; q<=max_Q; ++q) {                 \    for(q=1; q<=max_Q; ++q) {                 \
637          for(tst=0; tst<nb_tests; ++tst)         \          for(tst=0; tst<nb_tests; ++tst)         \
638            (FUNC)((DST), (SRC), q, mpeg_quant_matrices);              \            (FUNC)((DST), (SRC), q, mpeg_quant_matrices);              \
639          s = calc_crc((uint8_t*)(DST), sizeof((DST)), s); \          s = calc_crc((uint8_t*)(DST), 64*sizeof(int16_t), s); \
640    }                                         \    }                                         \
641    emms();                                   \    emms();                                   \
642  }                                           \  }                                           \
# Line 649  Line 651 
651    for(q=1; q<=max_Q; ++q) {                 \    for(q=1; q<=max_Q; ++q) {                 \
652          for(tst=0; tst<nb_tests; ++tst)         \          for(tst=0; tst<nb_tests; ++tst)         \
653            (FUNC)((DST), (SRC), q, q, mpeg_quant_matrices);           \            (FUNC)((DST), (SRC), q, q, mpeg_quant_matrices);           \
654          s = calc_crc((uint8_t*)(DST), sizeof((DST)), s); \          s = calc_crc((uint8_t*)(DST), 64*sizeof(int16_t), s); \
655    }                                         \    }                                         \
656    emms();                                   \    emms();                                   \
657  }                                           \  }                                           \
# Line 659  Line 661 
661  {  {
662          const int nb_tests = 1*speed_ref;          const int nb_tests = 1*speed_ref;
663          const int max_Q = 31;          const int max_Q = 31;
664          uint16_t mpeg_quant_matrices[64*8];          DECLARE_ALIGNED_MATRIX(mpeg_quant_matrices, 8, 64, uint16_t, 16);
665    
666          int i, qm;          int i, qm;
667          CPU *cpu;          CPU *cpu;
668          int16_t  Src[8*8], Dst[8*8];          DECLARE_ALIGNED_MATRIX(Src, 8, 8, int16_t, 16);
669            DECLARE_ALIGNED_MATRIX(Dst, 8, 8, int16_t, 16);
670          uint8_t Quant[8*8];          uint8_t Quant[8*8];
671    
672          printf( "\n =====  test quant =====\n" );          printf( "\n =====  test quant =====\n" );
# Line 755  Line 758 
758          const int nb_tests = 10000*speed_ref;          const int nb_tests = 10000*speed_ref;
759          int i;          int i;
760          CPU *cpu;          CPU *cpu;
761          int16_t  Src1[6*64], Src2[6*64], Src3[6*64], Src4[6*64];          DECLARE_ALIGNED_MATRIX(Src1, 6, 64, int16_t, 16);
762            DECLARE_ALIGNED_MATRIX(Src2, 6, 64, int16_t, 16);
763            DECLARE_ALIGNED_MATRIX(Src3, 6, 64, int16_t, 16);
764            DECLARE_ALIGNED_MATRIX(Src4, 6, 64, int16_t, 16);
765    
766          printf( "\n =====  test cbp =====\n" );          printf( "\n =====  test cbp =====\n" );
767    
# Line 1333  Line 1339 
1339  void test_dct_precision_diffs()  void test_dct_precision_diffs()
1340  {  {
1341          CPU *cpu;          CPU *cpu;
1342          short Blk[8*8], Blk0[8*8];          DECLARE_ALIGNED_MATRIX(Blk, 8, 8, int16_t, 16);
1343            DECLARE_ALIGNED_MATRIX(Blk0, 8, 8, int16_t, 16);
1344    
1345          printf( "\n =====  fdct/idct precision diffs =====\n" );          printf( "\n =====  fdct/idct precision diffs =====\n" );
1346    
# Line 1366  Line 1373 
1373          const int max_Q = 31;          const int max_Q = 31;
1374          int i, n, qm, q;          int i, n, qm, q;
1375          CPU *cpu;          CPU *cpu;
1376          int16_t  Src[8*8], Dst[8*8];          DECLARE_ALIGNED_MATRIX(Src, 8, 8, int16_t, 16);
1377            DECLARE_ALIGNED_MATRIX(Dst, 8, 8, int16_t, 16);
1378          uint8_t Quant[8*8];          uint8_t Quant[8*8];
1379          CPU cpu_bug_list[] = { { "PLAINC", 0 }, { "MMX   ", XVID_CPU_MMX }, {0,0} };          CPU cpu_bug_list[] = { { "PLAINC", 0 }, { "MMX   ", XVID_CPU_MMX }, {0,0} };
1380          uint16_t Crcs_Inter[2][32];          uint16_t Crcs_Inter[2][32];
1381          uint16_t Crcs_Intra[2][32];          uint16_t Crcs_Intra[2][32];
1382          uint16_t mpeg_quant_matrices[64*8];          DECLARE_ALIGNED_MATRIX(mpeg_quant_matrices, 8, 64, uint16_t, 16);
1383    
1384          printf( "\n =====  test MPEG4-quantize bug =====\n" );          printf( "\n =====  test MPEG4-quantize bug =====\n" );
1385    

Legend:
Removed from v.1230  
changed lines
  Added in v.1261

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4