--- xvid_bench.c 2005/08/05 20:49:23 1.23 +++ xvid_bench.c 2005/11/03 05:44:07 1.27 @@ -19,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: xvid_bench.c,v 1.23 2005/08/05 20:49:23 Skal Exp $ + * $Id: xvid_bench.c,v 1.27 2005/11/03 05:44:07 Skal Exp $ * ****************************************************************************/ @@ -518,6 +518,41 @@ (iCrc!=8107)?"| ERROR": "" ); #endif + /* New functions for field prediction by CK 1.10.2005 */ +#pragma NEW8X4 + TEST_MB(interpolate8x4_halfpel_h, 0); + printf("%s - interpfield-h -round0 %.3f usec crc32=0x%08x %s\n", + cpu->name, t, iCrc, + (iCrc!=0x9538d6df)?"| ERROR": "" ); + + TEST_MB(interpolate8x4_halfpel_h, 1); + printf("%s - round1 %.3f usec crc32=0x%08x %s\n", + cpu->name, t, iCrc, + (iCrc!=0xde5f1db4)?"| ERROR": "" ); + + + TEST_MB(interpolate8x4_halfpel_v, 0); + printf("%s - interpfield- v-round0 %.3f usec crc32=0x%08x %s\n", + cpu->name, t, iCrc, + (iCrc!=0xea5a69ef)?"| ERROR": "" ); + + TEST_MB(interpolate8x4_halfpel_v, 1); + printf("%s - round1 %.3f usec crc32=0x%08x %s\n", + cpu->name, t, iCrc, + (iCrc!=0x4f10ec0f)?"| ERROR": "" ); + + + TEST_MB(interpolate8x4_halfpel_hv, 0); + printf("%s - interpfield-hv-round0 %.3f usec crc32=0x%08x %s\n", + cpu->name, t, iCrc, + (iCrc!=0xf97ee367)?"| ERROR": "" ); + + TEST_MB(interpolate8x4_halfpel_hv, 1); + printf("%s - round1 %.3f usec crc32=0x%08x %s\n", + cpu->name, t, iCrc, + (iCrc!=0xb6a9f581)?"| ERROR": "" ); +/* End of 8x4 functions */ + printf( " --- \n" ); } } @@ -625,6 +660,14 @@ cpu->name, t, s, (s!=0xee7ccbb4)?"| ERROR": ""); + /* New functions for field prediction by CK 1.10.2005 */ +#pragma NEW8X4 + TEST_TRANSFER(transfer8x4_copy, Dst8, Src8); + printf("%s - 8to4 %.3f usec crc32=0x%08x %s\n", + cpu->name, t, s, + (s!=0xbb9c3db5)?"| ERROR": ""); +/* End of new functions */ + TEST_TRANSFER(transfer8x8_copy, Dst8, Src8); printf("%s - 8to8 %.3f usec crc32=0x%08x %s\n", cpu->name, t, s, @@ -923,6 +966,7 @@ DECLARE_ALIGNED_MATRIX(Src2, 6, 64, int16_t, 16); DECLARE_ALIGNED_MATRIX(Src3, 6, 64, int16_t, 16); DECLARE_ALIGNED_MATRIX(Src4, 6, 64, int16_t, 16); + DECLARE_ALIGNED_MATRIX(Src5, 6, 64, int16_t, 16); printf( "\n ===== test cbp =====\n" ); @@ -931,6 +975,7 @@ Src2[i] = (i<3*64); /* half-full */ Src3[i] = ((i+32)>3*64); Src4[i] = (i==(3*64+2) || i==(5*64+9)); + Src5[i] = ieee_rand(0,1) ? -1 : 1; /* +/- test */ } for(cpu = cpu_list; cpu->name!=0; ++cpu) @@ -953,6 +998,9 @@ TEST_CBP(calc_cbp, Src4, nb_tests); printf("%s - calc_cbp#4 %.3f usec cbp=0x%02x %s\n", cpu->name, t, cbp, (cbp!=0x05)?"| ERROR": "" ); + TEST_CBP(calc_cbp, Src5, nb_tests); + printf("%s - calc_cbp#4 %.3f usec cbp=0x%02x %s\n", + cpu->name, t, cbp, (cbp!=0x3f)?"| ERROR": "" ); printf( " --- \n" ); } @@ -1447,8 +1495,8 @@ xframe.bitstream = buf + pos; xframe.length = buf_size - pos; xframe.output.plane[0] = (uint8_t*)(((size_t)yuv_out + 15) & ~15); - xframe.output.plane[1] = xframe.output.plane[0] + bps*height; - xframe.output.plane[2] = xframe.output.plane[1] + bps/2; + xframe.output.plane[1] = (uint8_t*)xframe.output.plane[0] + bps*height; + xframe.output.plane[2] = (uint8_t*)xframe.output.plane[1] + bps/2; xframe.output.stride[0] = bps; xframe.output.stride[1] = bps; xframe.output.stride[2] = bps; @@ -1466,10 +1514,10 @@ nb++; for(y=0; y=0; v--) { + if ( (v>>2) != v/4) + nb_err++; + } + for(v=-1000; v!=-1; v++) { + if ( (v>>2) != (v/4)-!!(v%4)) + nb_err++; + } + if (nb_err!=0) { + printf( "ERROR! please post your platform/compiler specs to xvid-devel@xvid.org !\n" ); + } +} + +/********************************************************************* * main *********************************************************************/ @@ -1841,6 +1934,7 @@ if (what==0 || what==10) test_sse(); if (what==0 || what==11) test_log2bin(); if (what==0 || what==12) test_gcd(); + if (what==0 || what==13) test_compiler(); if (what==7) {