From 2639156c81022885cb4d98f91395e01181305227 Mon Sep 17 00:00:00 2001 From: Sergey Sablin Date: Tue, 1 Sep 2026 11:34:39 -0700 Subject: [PATCH] ipred: fix oversized z1 top_out scratch buffer Fix a transcribed `*` in TOP_OUT_SIZE, reducing the zero-initialized stack allocation from 10,192 to 302 elements. This reduces instructions retired by 1.275% on the all-intra benchmark (1 thread, median of 5). --- src/ipred.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipred.rs b/src/ipred.rs index 7bbf57d97..b6c079a10 100644 --- a/src/ipred.rs +++ b/src/ipred.rs @@ -1638,7 +1638,7 @@ mod neon { let enable_intra_edge_filter = angle >> 10; angle &= 511; let mut dx = dav1d_dr_intra_derivative[(angle >> 1) as usize] as c_int; - const TOP_OUT_SIZE: usize = 64 + 64 * (64 + 15) * 2 + 16; + const TOP_OUT_SIZE: usize = 64 + 64 + (64 + 15) * 2 + 16; let mut top_out = [0.into(); TOP_OUT_SIZE]; let max_base_x; let upsample_above = if enable_intra_edge_filter != 0 {