arm/aarch64: vp9lpf: Keep the comparison to E within 8 bit
authorMartin Storsjö <martin@martin.st>
Sat, 14 Jan 2017 18:49:19 +0000 (20:49 +0200)
committerMartin Storsjö <martin@martin.st>
Thu, 23 Feb 2017 22:02:36 +0000 (00:02 +0200)
commitc582cb8537367721bb399a5d01b652c20142b756
tree5c98407f9482c39205005749da642a9a1723d299
parented6a891c364f8b0850b557d9578b8920cc15a937
arm/aarch64: vp9lpf: Keep the comparison to E within 8 bit

The theoretical maximum value of E is 193, so we can just
saturate the addition to 255.

Before:                     Cortex A7      A8      A9     A53  A53/AArch64
vp9_loop_filter_v_4_8_neon:     143.0   127.7   114.8    88.0         87.7
vp9_loop_filter_v_8_8_neon:     241.0   197.2   173.7   140.0        136.7
vp9_loop_filter_v_16_8_neon:    497.0   419.5   379.7   293.0        275.7
vp9_loop_filter_v_16_16_neon:   965.2   818.7   731.4   579.0        452.0
After:
vp9_loop_filter_v_4_8_neon:     136.0   125.7   112.6    84.0         83.0
vp9_loop_filter_v_8_8_neon:     234.0   195.5   171.5   136.0        133.7
vp9_loop_filter_v_16_8_neon:    490.0   417.5   377.7   289.0        271.0
vp9_loop_filter_v_16_16_neon:   951.2   814.7   732.3   571.0        446.7

Signed-off-by: Martin Storsjö <martin@martin.st>
libavcodec/aarch64/vp9lpf_neon.S
libavcodec/arm/vp9lpf_neon.S