Opened 14 years ago

Closed 14 years ago

#38 closed defect (fixed)

Constructor lacking for DistParam class in TComRdCost.h

Reported by: skanumuri@… Owned by:
Priority: minor Milestone:
Component: HM Version:
Keywords: Cc: fbossen, ksuehring, davidf, jct-vc@…

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)

fix_38.cpp (826 bytes) - added by skanumuri@… 14 years ago.
Suggested fix indicated with macro BUGFIX_38

Download all attachments as: .zip

Change History (5)

Changed 14 years ago by skanumuri@…

Suggested fix indicated with macro BUGFIX_38

comment:1 Changed 14 years ago by fbossen

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r174

comment:2 Changed 13 years ago by davidf

  • Component set to HM

Updating component after adding WD (Text) tickets

comment:3 Changed 13 years ago by davidf

  • Cc fbossen ksuehring davidf added

comment:4 Changed 13 years ago by davidf

  • Cc jct-vc@… added
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

  • David Flynn(Subscriber, Participant)
  • Frank Bossen(Subscriber, Participant)
  • jct-vc@…(Subscriber)
  • karl.sharman@…(Always)
  • Karsten Suehring(Subscriber, Always)
  • skanumuri@…(Reporter)