IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
CRC alogrithism for AC3, What's the difference between generic CRC and ac3's
kevin.wang
post Nov 16 2011, 03:55
Post #1





Group: Members
Posts: 3
Joined: 16-November 11
Member No.: 95197



Hi all

I want to unstandard how ac3's CRC work, because it seems the CRC for AC3 is different from the generic one.

AC3 use X^16+X^15+X^2+1 as its poly (0x8005)

the generic alogrithism is:

unsigned short syndrom=0;

for(i=0;i<words; i++){
syndrom = ((syndrom << 8) & 0xff00) ^ crctab[((syndrom>>8)&0xff)^( (data[i]>>8)&0xff) ];
syndrom = ((syndrom << 8) & 0xff00) ^ crctab[((syndrom>>8)&0xff)^( (data[i])&0xff) ];
}

for ac3:
unsigned short syndrom=0;

for(i=0;i<words; i++){
syndrom = ((syndrom << 8) & 0xff00) ^ ((data[i]>>8)&0xff) ^ crctab[(syndrom>>8)&0xff];
syndrom = ((syndrom << 8) & 0xff00) ^ ((data[i])&0xff) ^crctab[(syndrom>>8)&0xff];
}

Who can tell me how to apply generic crc to ac3?
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 27th November 2014 - 17:23