Skip to content
  • Rupert Swarbrick's avatar
    Simplify the ALL_ZERO_FLAG logic in av1_rd_pick_intra_mode_sb · 799ff701
    Rupert Swarbrick authored
    Since the CONFIG_EXT_INTER #if/#endif lines have been removed, it's a
    bit clearer what's going on here and this patch cleans up the code.
    
    Firstly, the patch pulls the cheap checks on best_mbmode.ref_frame out
    to the front of the block, so we needn't call gm_get_motion_vector at
    all for compound predictions.
    
    Next, second element of the zeromv array is never used, so we needn't
    compute it.
    
    Finally, the patch removes the calls to lower_mv_precision. These
    shouldn't be needed, but it's not exactly obvious why not so the patch
    adds some comments to gm_get_motion_vector to explain what's going on
    and adds an assertion to make sure they are true. It also adds a call
    to integer_mv_precision on the early return path of
    gm_get_motion_vector, correcting an apparent bug when CONFIG_AMVR is
    true.
    
    This patch shouldn't make any difference to encoder or decoder
    behaviour.
    
    Change-Id: I0b4a01063574d080bbf6d30187f4e1748c60939d
    799ff701