• Martin Storsjö's avatar
    arm: vp9: Add NEON itxfm routines · b4dc7c34
    Martin Storsjö authored
    This work is sponsored by, and copyright, Google.
    
    For the transforms up to 8x8, we can fit all the data (including
    temporaries) in registers and just do a straightforward transform
    of all the data. For 16x16, we do a transform of 4x16 pixels in
    4 slices, using a temporary buffer. For 32x32, we transform 4x32
    pixels at a time, in two steps of 4x16 pixels each.
    
    Examples of relative speedup compared to the C version, from checkasm:
                             Cortex       A7     A8     A9    A53
    vp9_inv_adst_adst_4x4_add_neon:     3.39   5.83   4.17   4.01
    vp9_inv_adst_adst_8x8_add_neon:     3.79   4.86   4.23   3.98
    vp9_inv_adst_adst_16x16_add_neon:   3.33   4.36   4.11   4.16
    vp9_inv_dct_dct_4x4_add_neon:       4.06   6.16   4.59   4.46
    vp9_inv_dct_dct_8x8_add_neon:       4.61   6.01   4.98   4.86
    vp9_inv_dct_dct_16x16_add_neon:     3.35   3.44   3.36   3.79
    vp9_inv_dct_dct_32x32_add_neon:     3.89   3.50   3.79   4.42
    vp9_inv_wht_wht_4x4_add_neon:       3.22   5.13   3.53   3.77
    
    Thus, the speedup vs C code is around 3-6x.
    
    This is mostly marginally faster than the corresponding routines
    in libvpx on most cores, tested with their 32x32 idct (compared to
    vpx_idct32x32_1024_add_neon). These numbers are slightly in libvpx's
    favour since their version doesn't clear the input buffer like ours
    do (although the effect of that on the total runtime probably is
    negligible.)
    
                               Cortex       A7       A8       A9      A53
    vp9_inv_dct_dct_32x32_add_neon:    18436.8  16874.1  14235.1  11988.9
    libvpx vpx_idct32x32_1024_add_neon 20789.0  13344.3  15049.9  13030.5
    
    Only on the Cortex A8, the libvpx function is faster. On the other cores,
    ours is slightly faster even though ours has got source block clearing
    integrated.
    
    This is an adapted cherry-pick from libav commits
    a67ae670 and
    52d196fb.
    Signed-off-by: 's avatarRonald S. Bultje <rsbultje@gmail.com>
    b4dc7c34
vp9itxfm_neon.S 43.2 KB