Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: CRC of PCE (Read 2327 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

CRC of PCE

I am finding it difficult to check the CRC of my aac stream for the frame
having PCE  (Program Configuration Element) in my AAC decoder . I am  able
to compute the CRC value of frames which are  not having PCE , and the
computed CRC value matches with the encoded value.

Initially my decoder was not having check for  CRC of PCE. AAC LC spec
says that "all bits of PCE has to be protected" .
PCE is of variable length. In my case, my frame with CRC is of length
47bits. So I added check for this 47 bits. But still my CRC value
calculated is not matching with that of encoded one.

How should I calculate the CRC value of PCE ? What should be the length of
PCE that has to be checked for CRC?

CRC of PCE

Reply #1
Issue is fixed.
CRC of PCE has to be done as far as the adts stream is concerned.If PCE is 47,that 47bits has to be used for CRC. In my case I was missing the bits used for alignment. That has to be accounted for CRC. So in my case the actual PCE size was 53. When CRC was checked for this 53 bits also, the encoded crc matched with that of calculated.

The aac spec says this much.
"the pce has to be protected"
Yes pce bits has to be protected or has to be used for CRC checking.
Double protection or padding zeros to some length, SHOULD NOT BE DONE.

ONLY THE BITS OF PCE HAS TO BE PROTECTED.


Thanks