Opened 9 months ago
Closed 8 months ago
#1073 closed defect (fixed)
MotionModelIdc undefined when cu_affine_type_flag is not present
Reported by: | hanhuang | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | VVC D10 |
Component: | spec | Version: | VVC D9 vB |
Keywords: | Cc: | vzakharc, yuwenhe, jvet@… |
Description
In the JVET-R2001-vA, the MotionModelIdc is undefined when cu_affine_type_flag is not present.
In equation (164), MotionModelIdc[ x ][ y ] = inter_affine_flag[ x0 ][ y0 ] + cu_affine_type_flag[ x0 ][ y0 ]. However, there's no inference value when cu_affine_type_flag is not present.
It's suggested to add inference rule when cu_affine_type_flag is not present as follows: When cu_affine_type_flag[ x0 ][ y0 ] is not present, it is inferred to be equal to 0.
Also note that in equation (163), when merge_subblock_flag[ x0 ][ y0 ] equals to 1, the value of MotionModelIdc[ x ][ y ] is actually temporally set to 1 as the final value will be depend on the decoding process of subblock motion vector components and reference indices. Therefore, it's suggested to initialize MotionModelIdc[ x ][ y ] to 0 at the beginning of coding unit semantics and remove equation (163). The semantics of cu_affine_type_flag can be cleaned as following:
cu_affine_type_flag[ x0 ][ y0 ] equal to 1 specifies that for the current coding unit, when decoding a P or B slice, 6-parameter affine model based motion compensation is used to generate the prediction samples of the current coding unit. cu_affine_type_flag[ x0 ][ y0 ] equal to 0 specifies that 4-parameter affine model based motion compensation is used to generate the prediction samples of the current coding unit. When cu_affine_type_flag[ x0 ][ y0 ] is not present, it is inferred to be equal to 0.
The variable MotionModelIdc[ x ][ y ] is derived as follows for x = x0..x0 + cbWidth − 1 and y = y0..y0 + cbHeight − 1:
MotionModelIdc[ x ][ y ] = inter_affine_flag[ x0 ][ y0 ] + cu_affine_type_flag[ x0 ][ y0 ]
Change history (7)
comment:1 Changed 9 months ago by hanhuang
- Component changed from 360Lib to spec
comment:2 Changed 8 months ago by bbross
- Milestone set to VVC D10
- Version set to VVC D9 vB
comment:3 Changed 8 months ago by bbross
- Priority changed from minor to blocker
comment:4 Changed 8 months ago by chhuanb
comment:5 follow-up: ↓ 6 Changed 8 months ago by zhangkai
It looks unnecessary to initialize MotionModelIdc[ x ][ y ] to 0 at the beginning of coding unit semantics and remove equation (163).
Another possible fix without adding an inferred value cu_affine_type_flag[ x0 ][ y0 ] is to modify the equations as below:
...
– If general_merge_flag[ x0 ][ y0 ] is equal to 1, the following applies:
MotionModelIdc[ x ][ y ] = merge_subblock_flag[ x0 ][ y0 ] (165)
– Otherwise (general_merge_flag[ x0 ][ y0 ] is equal to 0), the following applies:
MotionModelIdc[ x ][ y ] = inter_affine_flag[ x0 ][ y0 ]? (1 +( sps_6param_affine_enabled_flag ？cu_affine_type_flag[ x0 ][ y0 ]：0)：0
comment:6 in reply to: ↑ 5 Changed 8 months ago by hanhuang
FYI. The suggested fix in this ticket is aligned with s/w, which initializes the value of cu_affine_type_flag as 0. And it's more clean to initialize the value instead of putting many conditions.
Replying to zhangkai:
It looks unnecessary to initialize MotionModelIdc[ x ][ y ] to 0 at the beginning of coding unit semantics and remove equation (163).
Another possible fix without adding an inferred value cu_affine_type_flag[ x0 ][ y0 ] is to modify the equations as below:
...
– If general_merge_flag[ x0 ][ y0 ] is equal to 1, the following applies:
MotionModelIdc[ x ][ y ] = merge_subblock_flag[ x0 ][ y0 ] (165)
– Otherwise (general_merge_flag[ x0 ][ y0 ] is equal to 0), the following applies:
MotionModelIdc[ x ][ y ] = inter_affine_flag[ x0 ][ y0 ]? (1 +( sps_6param_affine_enabled_flag ？cu_affine_type_flag[ x0 ][ y0 ]：0)：0
comment:7 Changed 8 months ago by bbross
- Resolution set to fixed
- Status changed from new to closed
Thanks for confirming and this is fixed in JVET-S2001-v9.
I confirm that the suggested fix is correct.