Opened 11 years ago

Closed 11 years ago

#832 closed defect (fixed)

CRC calculation incorrect for bit depths greater than 8

Reported by: bheng Owned by:
Priority: minor Milestone: HM-9.1
Component: HM Version: HM-9.0
Keywords: Cc: fbossen, ksuehring, davidf, jct-vc@…

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)

crc_bug.patch (1.4 KB) - added by bheng 11 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 Changed 11 years ago by DefaultCC Plugin

  • Cc fbossen ksuehring davidf jct-vc@… added

Changed 11 years ago by bheng

comment:2 Changed 11 years ago by ksuehring

  • Resolution set to fixed
  • Status changed from new to closed

the patch was applied in r3059

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

  • Brian Heng(Reporter)
  • David Flynn(Subscriber)
  • Frank Bossen(Subscriber)
  • jct-vc@…(Subscriber)
  • karl.sharman@…(Always)
  • Karsten Suehring(Subscriber, Participant, Always)