Opened 4 years ago

Closed 4 years ago

# Mismatch between Spec and VTM for deriving sliceWidthInTiles[ i + j ] (6.5.1)

Reported by: Owned by: shih-ta.hsiang minor spec VVC D10 vE ksuehring, bbross, XiangLi, fbossen, jvet@…

### Description

In 6.5.1, if( sliceWidthInTiles[ i ] = = 1 && sliceHeightInTiles[ i ] = = 1 ) and NumSlicesInTile[ i ] > 1, tileIdx += sliceWidthInTiles[ i ] involves an undefined value for sliceWidthInTiles[ i ] after setting i += NumSlicesInTile[ i ] − 1.
In VTM-9.3, if( sliceWidthInTiles[ i ] = = 1 && sliceHeightInTiles[ i ] = = 1 ), both sliceWidthInTiles[ i + j ] and sliceHeightInTiles[ i + j ] are set equal to 1 for each j = 0 .. NumSlicesInTile[ i ] - 1
Recommned to align Spec with VTM as follows:

for( j = 0; j < NumSlicesInTile[ i ]; j++ ) {

AddCtbsToSlice( i + j, tileColBd[ tileX ], tileColBd[ tileX + 1 ], ctbY, ctbY + sliceHeightInCtus[ i + j ] )
ctbY += sliceHeightInCtus[ i + j ]
sliceWidthInTiles[ i + j ] = 1
sliceHeightInTiles[ i + j ] = 1

}

### comment:1 Changed 4 years ago by yk

I think the pseudo code pieces "tileIdx += sliceWidthInTiles[ i ]" and "tileIdx += ( sliceHeightInTiles[ i ] − 1 ) * NumTileColumns)" in Equation 21 would never be executed for a value of i when sliceHeightInTiles[ i ] is not defined in the equation (because of of the execution of "i += NumSlicesInTile[ i ] − 1" before jumping to the above-mentioned places in the equation when sliceWidthInTiles[ i ] = = 1 && sliceHeightInTiles[ i ] = = 1 && NumSlicesInTile[ i ] > 1). Therefore, personally I don't see a need of adding what's suggested. Please correct me if I am wrong.

### comment:2 Changed 4 years ago by chiaming

Considering the case involving

(a) number of slices in a picture is larger than 1, and
(b) number of slices in the current tile is also larger than 1.

The value of i will be increased by "i += NumSlicesInTile[ i ] − 1". And if the "increased i" is still less than number of slices in a picture, the following pseudo code segment will be executed.
Then, sliceWidthInTiles[ i ] and sliceHeightInTiles[ i ] are both undefined, and tileIdx will be used in the next for loop index.

```  if( i < pps_num_slices_in_pic_minus1 ) {
if( pps_tile_idx_delta_present_flag )
tileIdx  +=  pps_tile_idx_delta_val[ i ]
else {
tileIdx  +=  sliceWidthInTiles[ i ]
if( tileIdx % NumTileColumns  = =  0 )
tileIdx  +=  ( sliceHeightInTiles[ i ] − 1 ) * NumTileColumns
}
}
```

### comment:3 Changed 4 years ago by yk

Thanks! I see, you are right. To be safe, it'd be great if someone else can confirm.

### comment:4 Changed 4 years ago by hendry197

The problem, IMO, is valid. In the case that Shih-Ta described, the i-th slice is still the slice inside the same tile. The issue here is the value i has been changed due to the addition with NuhSlicesInTile[i] - 1.

Aligning with VTM should be correct as it is the intent.

### comment:5 Changed 4 years ago by yk

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

Thanks to you all. Fixed in a version being prepared for JVET-S2001-vF.

Note: See TracTickets for help on using tickets.