Struct ConvDirectJob
struct ConvDirectJob {
const CV_R* x;
const CV_R* hrev;
CV_R* out;
unsigned long lenX;
unsigned long lenH;
}Direct convolution's inner sum is sum_k x[k] * h[n-k]: x is walked forward, h is walked in reverse, so it isn't literally a dot product of two contiguous ranges as written. Reversing h once up front (hrev[i] = h[len_h-1-i]) turns h[n-k] into hrev[(len_h-1-n)+k] — now increasing with k, same direction as x[k] — so the whole inner loop becomes one contiguous-range call into dsp_dot_f64's SIMD FMA accumulation instead of a scalar multiply-add per sample. Long convolutions split the outputs across the thread pool.