Opened 4 years ago
Closed 4 years ago
#1436 closed defect (invalid)
Mismatch on ScalingMatrixDCRec derivation in eq.(104) between Spec and SW
Reported by: | tsukuba.takeshi | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | spec | Version: | VVC D10 vH |
Keywords: | Cc: | ksuehring, bbross, XiangLi, fbossen, jvet@… |
Description
In the spec (JVET-S2001vH), ScalingMatrixDCRec derivation is defined as in eq. (104):
ScalingMatrixDCRec[ id − 14 ] = ( ScalingMatrixDCPred + scaling_list_dc_coef[ id − 14 ] ) & 255 (104)
However, in VTM-10.2, ScalingMatrixDCRec derivation is implemented as below:
VLCReader.cpp void HLSSyntaxReader::decodeScalingList(...) { ... READ_SVLC(scalingListDcCoefMinus8, "scaling_list_dc_coef_minus8"); nextCoef += scalingListDcCoefMinus8; if (isPredictor) { predCoef = (PredListId >= SCALING_LIST_1D_START_16x16) ? scalingList->getScalingListDC(PredListId) : srcPred[0]; } scalingList->setScalingListDC(scalingListId, (nextCoef + predCoef + 256) & 255); ... }
As can be seen, there is "+256" in SW but not in Spec.
Looking at the adopt text JVET-P1034, "+256" (and also "&255") is not defined in the syntax table.
... scaling_list_dc_coef [ scalingListId ] se(v) nextCoef = scaling_list_dc_coef [ scalingListId ] + nextCoef ...
Looking at the text in JVET-P2001vC, "+256" and "%256 (or &255)" are found in ScalingMatrixDCRec derivation as below:
ScalingMatrixDCRec[ id − 14 ] = ( ScalingMatrixDCPred + scaling_list_dc_coef[ id − 14 ] + 256 ) % 256 ) (7 71)
But after the text cleanup of JVET-P2001vD, "+256" was deleted.
I don't know which one is correct.
Change history (3)
comment:1 Changed 4 years ago by fbossen
comment:2 Changed 4 years ago by tsukuba.takeshi
I agree that there is no issue.
comment:3 Changed 4 years ago by yk
- Resolution set to invalid
- Status changed from new to closed
A & 255 is the same as (A + 256) & 255
A % 256 is not the same as (A + 256) % 256
When using % 256 one needs to be careful to work with positive numbers.
However, there is no such issue with & 255.
I don't see an issue here.