Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#880 closed enhancement (duplicate)

Clumsy syntax for vps_sub_layer_ordering_info_present_flag

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

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 11 years ago by DefaultCC Plugin

  • Cc bbross wjhan jct-vc@… added

comment:2 Changed 11 years ago by ksuehring

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

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.

comment:3 Changed 11 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

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