Opened 14 years ago Closed 14 years ago #151 closed defect (fixed)Decoding mismatch/crash when RDOQ off
Description
Decoding mismatch/crash was observed when RDOQ off (HM3.0). For example for BasketballPass_416x240_50.yuv, QP=32, 9 frames, decoding mismatch occurs. The encoding and decoding logs are as follows.
Encoding:
Input File : E:\Sequences\JCTVC_Seqs\D01_BasketballPass_416x240_50.yuv
TOOL CFG: ALF:0 IBD:0 HAD:1 SRD:0 RDQ:0 SQP:0 ASR:0 PAD:0 LDC:1 NRF:0 BQP:1 GPB:1 LComb:1 LCMod:0 FEN:1 RQT:1 MRG:1 LMC:1 Slice:0 EntropySlice:0 CIP:0 SAO:1
POC 0 ( I-SLICE, QP 32 ) 39776 bits [Y 35.7291 dB U 39.5039 dB V 39.3209 dB] [ET 1 ] [L0 ] [L1 ] [MD5:d9a6ef5e818feaa199a227af58784ca6]
SUMMARY --------------------------------------------------------
I Slices--------------------------------------------------------
P Slices--------------------------------------------------------
B Slices--------------------------------------------------------
RVM: 0.000
Decoding:
HM software: Decoder Version [3.0][Windows][VS 1500][32 bit]
POC 0 ( I-SLICE, QP 32 ) [DT 0.015] [L0 ] [L1 ] [MD5:d9a6ef5e818feaa199a227af58784ca6,(OK)]
*ERROR* A decoding mismatch occured: signalled md5sum does not match
Sometimes, decoding crash was also observed. So far, the bug has not been located. Fortunately, this bug does not affect behavior under common conditions. Change History (9)comment:1 Changed 14 years ago by Vadimcomment:2 Changed 14 years ago by Xiang Li
Yeah, it seems that this bug only affects VLC and chroma. I used CABAC instead of CAVLC in the above simulation and the mismatch disappeared. Moreover, the first mismatch in the above simulation was on chroma component.
By the way, we have not tried cases other than lowdelay_loco. comment:3 Changed 14 years ago by Vadim
I believe this code should fix a problem, insert it in xQuantLTR function just before loop if( m_iSymbolMode == 0 && eTType != TEXT_LUMA && iWidth > 8 ) { memset( piQCoef, 0, sizeof( TCoeff ) * iWidth*iHeight ); const UInt uiScanIdx = pcCU->getCoefScanIdx(uiAbsPartIdx, iWidth, eTType==TEXT_LUMA, pcCU->isIntra(uiAbsPartIdx)); UInt uiBlSize = 8; //Min(8,iWidth); UInt uiLog2BlkSize = g_aucConvertToBit[ pcCU->isIntra( uiAbsPartIdx ) ? iWidth : uiBlSize ] + 2; UInt uiNoCoeff = uiBlSize*uiBlSize; UInt uiBlSizeInBit = g_aucConvertToBit[uiBlSize] + 2; UInt uiWidthInBit = g_aucConvertToBit[iWidth] + 2; for( Int n = 0; n < uiNoCoeff; n++ ) { Long iLevel; Int iSign; UInt uiBlockPos; uiBlockPos = g_auiSigLastScan[uiScanIdx][uiLog2BlkSize-1][n]; if( !pcCU->isIntra( uiAbsPartIdx ) ) { uiBlockPos = ((uiBlockPos>>uiBlSizeInBit) <<uiWidthInBit) + (uiBlockPos&(uiBlSize-1)); } iLevel = (Long) piCoef[uiBlockPos]; iSign = (iLevel < 0 ? -1: 1); iLevel = (abs(iLevel) * uiQ + iAdd ) >> iQBits; uiAcSum += iLevel; iLevel *= iSign; piQCoef[uiBlockPos] = iLevel; } // for n } else for( Int n = 0; n < iWidth*iHeight; n++ ) ... comment:4 follow-up: ↓ 5 Changed 14 years ago by Xiang Li
With Vadim's code, I didn't observe any mismatch in RAHE, RALC, LDHE and LDLC (JCTVC-E700 conditions except that first 105 frames of each sequence were coded). The performance seems reasonable. Compared with RDOQ off, RDOQ on provides gains as follows
RAHE: -6.42% -2.49% -2.71%
Can we put Vadim's bug fix into HM-3.0-dev-bugfix branch? We have two cases in CE4 to be tested with RDOQ off. Thanks! comment:5 in reply to: ↑ 4 Changed 14 years ago by Xiang Li
Sorry for the wrong numbers. The gains should be
comment:6 Changed 14 years ago by fbossen
Fixed in r850 comment:7 Changed 13 years ago by davidf
Updating component after adding WD (Text) tickets comment:8 Changed 13 years ago by davidf
comment:9 Changed 13 years ago by davidf
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
|
I think problem is in chroma quantization, in VLC case it is up to 8x8 low frequency and also scan dependent. But, with RDOQ off it simply quantizes coefficients in zigzag order and clears after 64 position.
Conditional check should be added to xQuantLTR function in the same manner as it is done in codeCoeffNxN