Hacker News new | ask | show | jobs
by teo_zero 40 days ago
Nice article!

What surprises me is that the original VLC filter does not use SIMD. Sometimes I wonder why I spent my money on a "modern" CPU with a lot of new features that stay completely ignored by most software I run every day.

4 comments

It's possible it's a deliberate project decision to support very old CPUs. But it could be multi-targetting different CPUs and using SIMD whenever available.
Personally, I’m surprised it doesn’t get auto-vectorised
It surprises me that it runs on the CPU at all, honestly.
It's also a basic implementation, doing a divide per sample to renormalize and not taking advantage of the symmetry of the kernel.

Even on a GPU, you wouldn't use an algorithm this simple in production. For small radii, leveraging bilinear filtering halves the number of samples. For larger radii, hierarchical pyramid approximations are popular.

Probably a reflection of the age of that code along with the usefulness of the feature. If no one actually needs the video blurry, then it doesn't matter how efficient the filter is.
It surprises me it was even implemented.
The blur is an outlier: a 2007 filter almost nobody uses, so it never got optimized.

The hot paths in VLC (decoding via dav1d/FFmpeg, chroma conversion, surface copies, deinterlacing) are hand-tuned SIMD with runtime CPU dispatch, and most playback runs on the GPU anyway.

Are large gaussian blurs not used for modern glass effects? Worth pointing out that doing so really requires use of FFT convolutions -- an optimization that has not been implemented in the benchmarks.

Not really the question that this study is addressing though.

What glass effects would VLC render in the video?