Opened 12 years ago

Closed 12 years ago

#734 closed defect (fixed)

HM8.0 bug in SAO + PCM + lossless

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


1) In HM8.0, when ALF is removed from the software, TComAdaptiveLoopFilter::PCMLFDisableProcess() was also removed, although it is necessary to prevent SAO from altering PCM or lossless-coded CUs.

2) Even if we revert the function, it has a bug as discribed below.

PCMLFDisableProcess() calls xPCMRestoration().
xPCMRestoration() calls xPCMCURestoration() for each CU if (pcm_enabled_flag = 1 and pcm_loop_filter_disable_flag = 1) OR transquant_bypass_enable_flag = 1.
xPCMCURestoration() restores the unfiltered pixel values with the following condition:

if ((pcCU->getIPCMFlag(uiAbsZorderIdx))
pcCU->isLosslessCoded( uiAbsZorderIdx))

This should be corrected as follows:

if ((pcCU->getIPCMFlag(uiAbsZorderIdx) && pcPic->getSlice(0)->getSPS()->getPCMFilterDisableFlag())
pcCU->isLosslessCoded( uiAbsZorderIdx))

The current condition ignores pcm_loop_filter_disable_flag, so it misjudges when

pcm_enabled_flag = 1
pcm_loop_filter_disable_flag = 0
transquant_bypass_enable_flag = 1
pcm_flag = 1
cu_transquant_bypass_flag = 0

Because pcm_loop_filter_disable_flag = 0, this I_PCM CU should be SAO filtered, but with the current condition it won't.

Attachments (1) (2.5 KB) - added by kchono 12 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 12 years ago by DefaultCC Plugin

  • Cc fbossen ksuehring davidf jct-vc@… added

Changed 12 years ago by kchono

comment:2 Changed 12 years ago by kchono

The issue is true and the bug fix is correct. Attached zip contains two bug fix patches to HM-8.0: "ticket734-fix1.patch" fixes the filtering condition according to (2), "ticket734-fix2.patch" on top of "ticket734-fix1.patch" copies the disabled functions of TComAdaptiveLoopFilter to TComSampleAdaptiveOffset.

So "ticket734-fix2.patch" can fix all issues without reverting ALF code.

comment:3 Changed 12 years ago by ksuehring

  • Milestone set to HM-8.1
  • Resolution set to fixed
  • Status changed from new to closed

the patches were applied in r2778 and r2779

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)
  • Frank Bossen(Subscriber)
  • jct-vc@…(Subscriber)
  • karl.sharman@…(Always)
  • Karsten Suehring(Subscriber, Participant, Always)
  • Keiichi Chono(Participant)
  • Madhukar Budagavi(Reporter)