Opened 14 years ago Closed 14 years ago #38 closed defect (fixed)Constructor lacking for DistParam class in TComRdCost.h
Description
There is no constructor for DistParam class in TComRdCost.h. Currently, there is a reliance on setting all members to valid values outside this class before computing distortion.
For example, this can cause a problem with TComRdCost::getDistPart( Pel* piCur, Int iCurStride, Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, DFunc eDFunc ) function. When this function is called with DF_SADS or DF_HADS variants for eDFunc (I don't think such a call is present in the current code though), the function would return meaningless results and sometimes can cause encoder crash due to memory violation. This is because a member of DistParam class (cDtParam.iStep) is not set. Setting this value to 1 would be reasonable here.
The recommendation is to create a constructor for DistParam class. Furthermore, some members (pCb*, pCr*) are never used and can probably be removed to avoid confusion. Attachments (1)Change History (5)Changed 14 years ago by skanumuri@…comment:1 Changed 14 years ago by fbossen
Fixed in r174 comment:2 Changed 13 years ago by davidf
Updating component after adding WD (Text) tickets comment:3 Changed 13 years ago by davidf
comment:4 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
|
Suggested fix indicated with macro BUGFIX_38