Opened 6 years ago
Closed 5 years ago
#132 closed defect (fixed)
Mismatch between specification and software in the order of syntax elements for intra prediction
Reported by: | vdrugeon | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | VTM | Version: | VTM-3.0 |
Keywords: | Cc: | ksuehring, bbross, XiangLi, fbossen, jvet@… |
Description
I believe that there is a mismatch between software and specification text regarding the order of syntax elements in the bitstream for intra prediction.
In VVC Draft 3 v4, the pcm information is placed before the reference line information:
if( CuPredMode[ x0 ][ y0 ] = = MODE_INTRA ) {
if( pcm_enabled_flag &&
cbWidth >= MinIpcmCbSizeY && cbWidth <= MaxIpcmCbSizeY &&
cbHeight >= MinIpcmCbSizeY && cbHeight <= MaxIpcmCbSizeY )
pcm_flag[ x0 ][ y0 ]
if( pcm_flag[ x0 ][ y0 ] ) {
while( !byte_aligned( ) )
pcm_alignment_zero_bit
pcm_sample( cbWidth, cbHeight, treeType)
} else {
if( treeType = = SINGLE_TREE | | treeType = = DUAL_TREE_LUMA ) {
if( ( y0 % CtbSizeY ) > 0 )
intra_luma_ref_idx[ x0 ][ y0 ]
if (intra_luma_ref_idx[ x0 ][ y0 ] = = 0)
intra_luma_mpm_flag[ x0 ][ y0 ]
if( intra_luma_mpm_flag[ x0 ][ y0 ] )
intra_luma_mpm_idx[ x0 ][ y0 ]
else
intra_luma_mpm_remainder[ x0 ][ y0 ]
}
if( treeType = = SINGLE_TREE | | treeType = = DUAL_TREE_CHROMA )
intra_chroma_pred_mode[ x0 ][ y0 ]
}
} else { /* MODE_INTER */
However, in VTM-3.0, it seems that the reference line information is placed before the pcm information (source code from function bool CABACReader::coding_unit( CodingUnit &cu, Partitioner &partitioner, CUCtx& cuCtx )):
#if JVET_L0283_MULTI_REF_LINE
extend_ref_line( cu );
#endif
pcm samples
if( CU::isIntra(cu) && cu.partSize == SIZE_2Nx2N )
{
pcm_flag( cu );
if( cu.ipcm )
{
TransformUnit& tu = cs.addTU( cu, partitioner.chType );
pcm_samples( tu );
return end_of_ctu( cu, cuCtx );
}
}
prediction data ( intra prediction modes / reference indexes + motion vectors )
cu_pred_data( cu );
Change history (7)
comment:1 Changed 6 years ago by bbross
- Version changed from VVC D3 v4 to VVC D3 v6
comment:2 Changed 6 years ago by bbross
- Version changed from VVC D3 v6 to VVC D3 v7
comment:3 Changed 6 years ago by bbross
- Version changed from VVC D3 v7 to VVC D3 v8
comment:4 Changed 6 years ago by bbross
- Component changed from spec to VTM
- Version changed from VVC D3 v8 to VTM-3.0
comment:5 Changed 6 years ago by vdrugeon
Actually, I just noticed that the particular issue described above has been solved after the release of VTM-3.0, so that it is already fixed in the current (yet untagged) version of the software on the repository.
However, there seems to be another issue related to the order of syntax elements in the encoder and the decoder. It seems that the order of coding of syntax elements has to be fixed in the encoder.
In the current encoder, pcm samples are encoded before the prediction mode and partitioning data. Here is the relevant code from CABACWriter::coding_unit
#if JVET_L0209_PCM
pcm samples
if( CU::isIntra(cu) )
{
pcm_data( cu, partitioner );
if( cu.ipcm )
{
end_of_ctu( cu, cuCtx );
return;
}
}
#endif
prediction mode and partitioning data
pred_mode ( cu );
#if JVET_L0283_MULTI_REF_LINE
extend_ref_line(cu);
#endif
But in the decoder, pcm samples are decoded after. Here is the relevant code from CABACReader::coding_unit
prediction mode and partitioning data
pred_mode ( cu );
--> create PUs
CU::addPUs( cu );
#if JVET_L0209_PCM
pcm samples
if( CU::isIntra(cu) )
{
pcm_flag( cu, partitioner );
if( cu.ipcm )
{
TransformUnit& tu = cs.addTU( cu, partitioner.chType );
pcm_samples( tu );
return end_of_ctu( cu, cuCtx );
}
}
#endif
#if JVET_L0283_MULTI_REF_LINE
extend_ref_line( cu );
#endif
I believe that this issue does not appear in the common test conditions because PCM is probably not used in inter coded pictures.
comment:6 Changed 5 years ago by jonathang
I think this ticket can be closed. The problem has been solved by removing PCM (Adoption of O0525 contribution).
comment:7 Changed 5 years ago by vdrugeon
- Resolution set to fixed
- Status changed from new to closed
Yes, this is an old bug report and it can now be closed
During plenary discussion, it was decided to change VTM to match the draft text.