Opened 5 years ago
Closed 5 years ago
#589 closed defect (fixed)
inconsistent definition and usage of scaling window parameters
Reported by: | taoranlu | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | spec | Version: | |
Keywords: | scaling window | Cc: | ksuehring, bbross, XiangLi, fbossen, jvet@… |
Description
In VVC D7-v9 (JVET-P2001-v9), the definition and usage of scaling window parameters are confusing.
The semantics state that they are defined in units of luma samples:
scaling_win_left_offset, scaling_win_right_offset, scaling_win_top_offset, and scaling_win_bottom_offset specify the offsets, in units of luma samples, that are applied to the picture size for scaling ratio calculation. When sclaing_window_flag is equal to 0, the values of scaling_win_left_offset, scaling_win_right_offset, scaling_win_top_offset, and scaling_win_bottom_offset are inferred to be equal to 0.
If this is the design intention, the following semantics are wrong:
The value of SubWidthC * ( scaling_win_left_offset + scaling_win_right_offset ) shall be less than pic_width_in_luma_samples, and the value of SubHeightC * ( scaling_win_top_offset + scaling_win_bottom_offset ) shall be less than pic_height_in_luma_samples.
The variables PicOutputWidthL and PicOutputHeightL are derived as follows:
PicOutputWidthL = pic_width_in_luma_samples −SubWidthC * ( scaling_win_right_offset + scaling_win_left_offset ) (7-39)
PicOutputHeightL = pic_height_in_pic_size_units − SubHeightC * ( scaling_win_bottom_offset + scaling_win_top_offset ) (7-40)
They should be corrected by removing the SubWidthC and SubHeightC:
The value of ( scaling_win_left_offset + scaling_win_right_offset ) shall be less than pic_width_in_luma_samples, and the value of ( scaling_win_top_offset + scaling_win_bottom_offset ) shall be less than pic_height_in_luma_samples.
The variables PicOutputWidthL and PicOutputHeightL are derived as follows:
PicOutputWidthL = pic_width_in_luma_samples − ( scaling_win_right_offset + scaling_win_left_offset ) (7-39)
PicOutputHeightL = pic_height_in_pic_size_units − ( scaling_win_bottom_offset + scaling_win_top_offset ) (7-40)
If the design intention is to follow the way that conformance window parameters are defined (in units of chroma samples), then the following need to be addressed instead:
1: the semantics:
should remove "in units of luma samples".
2: in clause 8.5.6.3.1, where scaling_win_left_offset and scaling_win_top_offset are referenced (and is used in unit of luma samples), the SubWidthC and SubHeightC should be added, as follows:
The variable fRefLeftOffset is set equal to ( (SubWidthC * scaling_win_left_offset ) << 10 ), where scaling_win_left_offset is the scaling_win_left_offset for the reference picture.
The variable fRefTopOffset is set equal to ( ( SubHeightC * scaling_win_top_offset ) << 10 ), where scaling_win_top_offset is the scaling_win_top_offset for the reference picture.
…..
refxSbL = ( ( ( xSb − SubWidthC * scaling_win_left_offset ) << 4 ) + refMvLX[ 0 ] ) * scalingRatio[ 0 ] (8-738)
refySbL = ( ( ( ySb − SubHeightC * scaling_win_top_offset ) << 4 ) + refMvLX[ 1 ] ) * scalingRatio[ 1 ] (8-740)
…..
refxSbC = ( ( ( xSb − SubWidthC * scaling_win_left_offset ) / SubWidthC << 5 ) + mvLX[ 0 ] ) *scalingRatio[ 0 ] (8-746)
refySbC = ( ( ( ySb − SubHeightC * scaling_win_top_offset ) / SubHeightC << 5 ) + mvLX[ 1 ] ) *scalingRatio[ 1 ] (8-748)
Change history (3)
comment:1 Changed 5 years ago by Vadim
comment:2 Changed 5 years ago by yk
Thanks! Fixed in JVET-P2001-v10, by removing SubWidthC and SubHeightC from the semantics of scaling_win_left_offset, scaling_win_right_offset, scaling_win_top_offset, and scaling_win_bottom_offset, including the equations for PicOutputWidthL, PicOutputHeightL.
comment:3 Changed 5 years ago by yk
- Resolution set to fixed
- Status changed from new to closed
SubWidthC and SubHeightC should be removed from the semantics of scaling_win_left_offset, scaling_win_right_offset, scaling_win_top_offset, and scaling_win_bottom_offset, which are expressed in luma samples, and from equations for PicOutputWidthL, PicOutputHeightL as you suggested. Thank you for checking this.