Opened 12 years ago Closed 12 years ago #859 closed defect (fixed)decoded_picture_hash() operator precedence issue
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
comment:2 Changed 12 years ago by Parabolacomment: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
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
|
Actually, my substitution is also incorrect, we need this:
for (cIdx = 0; cIdx < ((chroma_format_idc == 0) ? 1 : 3); cIdx++)