Opened 12 years ago

Closed 12 years ago

#859 closed defect (fixed)

decoded_picture_hash() operator precedence issue

Reported by: Parabola Owned by: bbross
Priority: minor Milestone: D8
Component: Text Version: D9 (K1003) v9
Keywords: Cc: bbross, wjhan, jct-vc@…

Description

for( cIdx = 0; cIdx < (chroma_format_idc == 0) ? 1 : 3; cIdx++ )

would result in an infinite loop... substitute with this:

for( cIdx = 0; cIdx < (chroma_format_idc == 0 ? 1 : 3); cIdx++ )

This error is repeated in the pseudocode in "Decoded picture hash SEI message semantics"

Change History (5)

comment:1 Changed 12 years ago by DefaultCC Plugin

  • Cc bbross wjhan jct-vc@… added

comment:2 Changed 12 years ago by Parabola

Actually, my substitution is also incorrect, we need this:

for (cIdx = 0; cIdx < ((chroma_format_idc == 0) ? 1 : 3); cIdx++)

comment:3 Changed 12 years ago by Parabola

Similar problem in scaling_list_data(), should read:

for( matrixId = 0; matrixId < (( sizeId == 3 ) ? 2 : 6); matrixId++ )

comment:4 Changed 12 years ago by davidf

NB, C operator precedence rules do not require the extra parentheses. a < (b == c ? d : e) is sufficient.

comment:5 Changed 12 years ago by bbross

  • Resolution set to fixed
  • Status changed from new to closed
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

  • Benjamin Bross(Owner, Subscriber, Participant)
  • David Flynn(Participant)
  • jct-vc@…(Subscriber)
  • John Funnell(Reporter, Participant)
  • karl.sharman@…(Always)
  • Karsten Suehring(Always)
  • Woo-Jin Han(Subscriber)