Opened 3 years ago

Last modified 3 years ago

#1302 new enhancement

WP unnecessary condition for log2Wd < 1

Reported by: bbross Owned by:
Priority: trivial Milestone:
Component: RExt text Version: RExt D7 (Q1005) v8
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 (1)

comment:1 Changed 3 years ago by DefaultCC Plugin

  • Cc davidf joel teruhiko 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

  • Benjamin Bross(Reporter)
  • David Flynn(Subscriber, Always)
  • jct-vc@…(Subscriber)
  • Joel(Subscriber)
  • Karl Sharman(Always)
  • Karsten Suehring(Always)
  • Teruhiko Suzuki(Subscriber)