35 using namespace OLDEVP;
37 #define LSWP0312 ch[0] = cdp[i*4 +3] ; ch[1] = cdp[i*4 + 2] ; ch[2] = cdp[i*4+1] ; ch[3] = cdp[i*4] ;
38 #define LSWP12 ch[0] = cdp[i*4] ; ch[1] = cdp[i*4 + 2] ; ch[2] = cdp[i*4+1] ; ch[3] = cdp[i*4+3] ;
39 #define LSWP04 ch[0] = cdp[i*4 +3] ; ch[1] = cdp[i*4 + 1] ; ch[2] = cdp[i*4+2] ; ch[3] = cdp[i*4] ;
46 unsigned int OLDEVP::compute_crc_bank(
Bank* d,
unsigned int lcrc )
51 if(d->header.ByteOrder == 0x04030201)
53 p = (
int*)&d->header ;
54 for(i = 0 ; i < d->header.BankLength ;i++) CRC32DEF(p[i],lcrc) ;
62 char* ch = (
char*)&help ;
63 p = (
int*)&d->header ;
66 if(d->header.ByteOrder == 0x01020304)
68 p = (
int*)&d->header ;
70 for(i = 0 ; i < length ;i++){ LSWP0312 ;
if(i==2)length = help ; CRC32DEF(help,lcrc) ;}
73 if(d->header.ByteOrder == 0x04030201)
75 p = (
int*)&d->header ;
77 for(i = 0 ; i < length ;i++){ LSWP12 ;
if(i==2)length = help ; CRC32DEF(help,lcrc) ;}
80 if(d->header.ByteOrder == 0x04030201)
82 p = (
int*)&d->header ;
84 for(i = 0 ; i < length ;i++){ LSWP04 ;
if(i==2)length = help ; CRC32DEF(help,lcrc) ;}
91 unsigned int OLDEVP::compute_crc_block(
int* p,
unsigned int ByteOrder,
int Length,
unsigned int lcrc )
94 if(ByteOrder == 0x04030201)
96 for(i = 0 ; i < Length ;i++) CRC32DEF(p[i],lcrc) ;
104 char* ch = (
char*)&help ;
107 if(ByteOrder == 0x01020304)
110 for(i = 0 ; i < length ;i++){ LSWP0312 ; CRC32DEF(help,lcrc) ;}
113 if(ByteOrder == 0x04030201)
116 for(i = 0 ; i < length ;i++){ LSWP12 ; CRC32DEF(help,lcrc) ;}
119 if(ByteOrder == 0x04030201)
122 for(i = 0 ; i < length ;i++){ LSWP04 ; CRC32DEF(help,lcrc) ;}