Opened 12 years ago Closed 12 years ago #832 closed defect (fixed)CRC calculation incorrect for bit depths greater than 8
Description
There is currently a mismatch between the SEI picture hash CRC calculation in WD9 and HM-9.0.
When the bit depth is greater than 8, the WD text splits each pixel into two bytes. The CRC is then calculated on each of these bytes, 16 bits total, in the following order. MSB LSB 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7
HM attempts to take the CRC of only the active bits. So for 10-bit pixels it would try to process just 10 bits, with bits in the following order: MSB LSB X X X X X X 0 1 2 3 4 5 6 7 8 9
In addition, there is a bug in the code used to do this. Specifically, the & operator being used below to replace a modulo operation only works for the 8-bit case. This cannot be directly extended to 10-bits, etc... (dataMsbIdx - (bitIdx&dataMsbIdx))
I believe the attached patch would fix HM to match the WD text. Attachments (1)Change History (3)comment:1 Changed 12 years ago by DefaultCC Plugin
Changed 12 years ago by bhengcomment:2 Changed 12 years ago by ksuehring
Note: See
TracTickets for help on using
tickets. | This list contains all users that will be notified about changes made to this ticket. These roles will be notified: Reporter, Owner, Subscriber, Participant
|
the patch was applied in r3059