Opened 10 years ago

Closed 6 years ago

#1302 closed enhancement (fixed)

WP unnecessary condition for log2Wd < 1

Reported by: bbross Owned by:
Priority: trivial Milestone: v5
Component: RExt text Version: v4 (12/2016)
Keywords: Cc: davidf, joel, teruhiko, jct-vc@…

Description

The else branch for the condition on (log2Wd >= 1) in "8.5.3.3.3.7 Explicit weighted sample prediction process" is never entered, e.g in Eq (8‑247) but the issue is the same for v1 too:

if( log2Wd >= 1 )

pbSamples[ x ][ y ] = Clip3( 0, ( 1 << bitDepth ) − 1,

( ( predSamplesL0[ x ][ y ] * w0 + 2log2Wd − 1 ) >> log2Wd ) + o0 )

else

pbSamples[ x ][ y ] = Clip3( 0, ( 1 << bitDepth ) − 1, predSamplesL0[ x ][ y ] * w0 + o0 )

When looking at the derivation of log2Wd, it cannot be <1 so the else part can be removed as an editorial change on both v1 and v2:

luma:
log2Wd = luma_log2_weight_denom + shift1
chroma:
log2Wd = ChromaLog2WeightDenom + shift1

shift1 is set equal to Max( 2, 14 − bitDepth ) or (14- bitDepth) in v1

-> shift is ranging from 4 to 6 for v1 and from 2 to 6 for Rext, so it never gets to 0 and since luma and chroma log2WeightDenominator range from 0 to 7, log2Wd can never be smaller than 2.

Change History (3)

comment:1 Changed 10 years ago by DefaultCC Plugin

  • Cc davidf joel teruhiko jct-vc@… added

comment:2 Changed 7 years ago by bbross

  • Milestone set to v5
  • Version changed from RExt D7 (Q1005) v8 to v4 (12/2016)

Agreed by the authors of the AHG2 report JCTVC-AD0002 (checked 2016/12 release of the HEVC specification).
Fix:
In Equations 8-277 and 8-278, remove the condition checks “if( log2Wd >= 1 )” and the associated “else” clauses.

comment:3 Changed 6 years ago by bbross

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

fixed in v5 (2018/02)

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

  • Benjamin Bross(Reporter, Participant)
  • David Flynn(Subscriber)
  • jct-vc@…(Subscriber)
  • Joel(Subscriber)
  • karl.sharman@…(Always)
  • Karsten Suehring(Always)
  • Teruhiko Suzuki(Subscriber)