Skip to content
  • David Barker's avatar
    More accurate chroma warping · f7a5ee53
    David Barker authored
    Previously, the projected positions of chroma pixels would effectively
    undergo double rounding, since we round both when calculating x4 / y4
    and when calculating the filter index. Further, the two roundings
    were different: x4 / y4 used ROUND_POWER_OF_TWO_SIGNED, whereas
    the filter index uses ROUND_POWER_OF_TWO.
    
    It is slightly more accurate (and faster) to replace the first
    rounding by a shift; this is motivated by the fact that
    ROUND_POWER_OF_TWO(x >> a, b) == ROUND_POWER_OF_TWO(x, a + b)
    
    Change-Id: Ia52b05745168d0aeb05f0af4c75ff33eee791d82
    f7a5ee53