Signed-off-by: Mans Rullgard <mans@mansr.com>
Merging these functions allows merging some loops, which makes the results (particularly after SIMD optimizations) much faster.