#880 closed enhancement (duplicate)Clumsy syntax for vps_sub_layer_ordering_info_present_flag
Description
There is a loop in the VPS syntax that opens thusly: for( i = ( vps_sub_layer_ordering_info_present_flag ? 0 : vps_max_sub_layers_minus1 ); i <= vps_max_sub_layers_minus1; i++ ) {
This takes longer to understand that it should because it does not use idiomatic C-style constructs. It looks "hackish". To improve clarity suggest changing to: for( i = 0; vps_sub_layer_ordering_info_present_flag && i <= vps_max_sub_layers_minus1; i++ ) {
or if (vps_sub_layer_ordering_info_present_flag) for( i = 0; i <= vps_max_sub_layers_minus1; i++ ) { Change History (3)comment:1 Changed 12 years ago by DefaultCC Plugin
comment:2 Changed 12 years ago by ksuehring
comment:3 Changed 12 years ago by Parabola
Agreed - you lost me. "i <= xxxxx_minus1" does not read as clearly as the more idiomatic "i < (xxxxx_minus1 + 1)" to this implementer. 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
|
Closed as duplicate of #862.
It seems we have lost you already with that loop condition. The loop has to be parsed either once (when vps_sub_layer_ordering_info_present_flag is equal to 0) or (vps_max_sub_layers_minus1 + 1) times (when vps_sub_layer_ordering_info_present_flag is equal to 1). This is achieved by the "<=" condition.
Ticket #862 contains a suggested syntax improvement which eliminates the "<=".
It has been discussed between editors if it would be more logical, to use vps_max_sub_layers_minus1 as the index, when vps_sub_layer_ordering_info_present_flag is equal to zero, because the values are inferred from higher layer IDs . The new syntax would parse to index 0.
I'm closing this as duplicate of #862 because all further discussion should be filed there.