Opened 12 years ago

Closed 12 years ago

#533 closed defect (invalid)

Incorrect derivation of ColumnWidth and RowHeight with uniform_spacing_flag

Reported by: stworrall Owned by: bbross
Priority: minor Milestone:
Component: Text Version: D6 (H1003) dI/dJ/dK
Keywords: Cc: bbross, wjhan, jct-vc@…

Description

This following report is based on I0030.

When uniform_spacing_flag is used, the pseudocode for deriving ColumnWidth and RowHeight does not work properly (see equations 7-20 and 7-21). As an example, for a picture width of 23 CTBs and with three tiles, three tiles of 8 CTBs in width will be allocated.

The following pseudocode is suggested as a replacement for ColumnWidth and RowHeight derivations respectively:

if( uniform_spacing_flag ) {

MinTileWidth = Floor( PicWidthInCtbs / (num_tile_columns_minus1 + 1) )
TotalColumnWidths = 0
for( i = 0; i <= num_tile_columns_minus1; i++ ) {

ColumnWidth[ i ] = MinTileWidth

TotalColumnWidths += MinTileWidth
ColumnWidthInLumaSamples[ i ] = ColumnWidth[ i ] << Log2CtbSize

}
i = 0
while( TotalColumnWidths++ < PicWidthInCtbs ) {

ColumnWidthInLumaSamples[ i ] += 1 << Log2CtbSize
ColumnWidth[ i++ ] ++

if( i > num_tile_columns_minus1 )

i = 0

}

} else {

for( i = 0; i <= num_tile_columns_minus1; i++ ) {

ColumnWidth[ i ] = column_width[ i ]

ColumnWidthInLumaSamples[ i ] = ColumnWidth[ i ] << Log2CtbSize

}

}

if( uniform_spacing_flag ) {

MinTileHeight = Floor( PicHeightInCtbs / (num_tile_rows_minus1 + 1) )
TotalRowHeights = 0
for( i = 0; i <= num_tile_rows_minus1; i++ ) {

RowHeight[ i ] = MinTileHeight

TotalRowHeights += MinTileHeight

}
i = 0
while( TotalRowHeights++ < PicHeightInCtbs ) {

RowHeight[ i++ ] ++

if( i > num_tile_rows_minus1 )

i = 0

}

} else {

for( i = 0; i <= num_tile_rows_minus1; i++ ) {

RowHeight[ i ] = row_height[ i ]

}

}

Change History (8)

comment:1 Changed 12 years ago by DefaultCC Plugin

  • Cc bbross wjhan jct-vc@… added

comment:2 follow-up: Changed 12 years ago by shilin.xu

By using the same example (a picture width of 23 CTBs and with three vertical tiles), the equations 7-20 and 7-21 in I0030 should generate three tiles whose widths are 7, 8, and 8, respectively, rather than 8, 8 and 8. Could you please tell me how you get the 8, 8 and 8 result? Thank you very much.

Shilin

comment:3 in reply to: ↑ 2 Changed 12 years ago by stworrall

Replying to shilin.xu:

By using the same example (a picture width of 23 CTBs and with three vertical tiles), the equations 7-20 and 7-21 in I0030 should generate three tiles whose widths are 7, 8, and 8, respectively, rather than 8, 8 and 8. Could you please tell me how you get the 8, 8 and 8 result? Thank you very much.

Shilin

Dear Shilin,

If we consider the more general case, 7-20 can be simplified as follows:

ColumnWidth[ i ] =
( ( i + 1 ) * PicWidthInCtbs ) / ( num_tile_columns_minus1 + 1 ) – ( i * PicWidthInCtbs ) / ( num_tile_columns_minus1 + 1 )

ColumnWidth[ i ] = ( ( i + 1 - i ) * PicWidthInCtbs ) / ( num_tile_columns_minus1 + 1 )

ColumnWidth[ i ] = PicWidthInCtbs / ( num_tile_columns_minus1 + 1 )

This means that all of the ColumnWidth array values will always be the same. The same is true for the RowHeight derivation. So in the previous example (picture width of 23 CTB, three vertical tiles), all of the three tiles will have a width of 8.

Stewart.

comment:4 follow-up: Changed 12 years ago by shilin.xu

Dear Stewart,

Actually the "/" operator in JCTVC-H1003_dK specifically means integer division with truncation of the result toward zero (please refer to section 5.1). Consequently we can not simplify 7-20 in your way due to the truncation.

Shilin

comment:5 in reply to: ↑ 4 Changed 12 years ago by stworrall

Replying to shilin.xu:

Dear Stewart,

Actually the "/" operator in JCTVC-H1003_dK specifically means integer division with truncation of the result toward zero (please refer to section 5.1). Consequently we can not simplify 7-20 in your way due to the truncation.

Shilin

Dear Shilin,

Ok, thanks for the clarification. I agree that the existing spec works.

Regards,
Stewart.

comment:6 follow-up: Changed 12 years ago by bbross

Can the ticket be closed then?

comment:7 in reply to: ↑ 6 Changed 12 years ago by stworrall

Replying to bbross:

Can the ticket be closed then?

Yes, please feel free to close it.

Regards,
Stewart.

comment:8 Changed 12 years ago by ksuehring

  • Resolution set to invalid
  • 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)
  • jct-vc@…(Subscriber)
  • karl.sharman@…(Always)
  • Karsten Suehring(Participant, Always)
  • Shilin Xu(Participant)
  • Stewart Worrall(Reporter, Participant)
  • Woo-Jin Han(Subscriber)