Hacker News new | ask | show | jobs
by Cthulhu_ 1905 days ago
I really appreciate that CPU manufacturers started adding dedicated hardware for things like decoding MP3's. Not sure about the machine learning hardware they put in it nowadays, but then, that's mainly Apple who do a lot of that for e.g. your pictures (so they don't have to send it to their servers).
2 comments

I’m not aware of any desktop CPUs (now or before) that had hardware MP3 decoding. Do you mind enlightening me?
In my interpretation, "dedicated hardware for things like MP3s" doesn't necessarily mean "hardware MP3 decoding."

Intel MMX (multimedia extensions) introduced dedicated hardware to accelerate things like MP3 decoding.

MMX is integer math only. MP3s require floating point unless you hand code fixed point version of the decoder. In real life just recompiling with MMX support gives marginal difference https://www.cs.cmu.edu/~barbic/cs-740/mmx_project.html

MMX was pretty useless (reuses FPU registers = cant run FPU code in parallel) marketing gimmick from Intel designed to tick boxes, promoted with fake "designed for MMX" campaign https://www.mobygames.com/images/covers/l/51358-pod-windows-... spoilers: MMX enables one sound filter in the whole game, no speed difference. Ubisoft just made some extra cash by printing this on the box.

MMX was one of Intel's many Native Signal Processing (NSP) initiatives. They had plenty of ideas for making PCs dependent on Intel hardware, something Nvidia is really good at these days (physx, cuda, hairworks, gameworks). Thankfully Microsoft was quick to kill their other fancy plans https://www.theregister.co.uk/1998/11/11/microsoft_said_drop... Microsoft did the same thing to Creative with Vista killing DirectAudio, out of fear that one company was gripping positional audio monopoly on their platform.

> MP3s require floating point unless you hand code fixed point version of the decoder.

This is a weird statement. "MP3 encode/decode requires floating point unless you implement in fixed point such that you don't need floating point." It's perfectly possible to write fixed point MP3 decoders.

Sure, MMX wasn't that great, but it was Intel's first SIMD extension, was definitely intended to help with "things like MP3 decoding," and was followed by a ton of improved extensions with similar goals.

Ah, I understood that as dedicated hardware (blocks) for decoding media such as mp3 (in the same vein as h264 hardware decoders).
A Pentium II was more than enough to decode MP3's in parallel.
What's interesting is, I used to have this old 486 laptop. With Linux on it, I could run XMMS playing my MP3s and do other things and you could barely tell it was there. In Windows, playing an MP3 file with WinAmp took up so much CPU, you were stuck running only WinAmp.
Windows 9x had preemptive multitasking bolted on as an afterthought. Same engineering flaw that made it so crash-prone, with much of the kernel exposed read/write to the application for backwards compatibility with Windows 3.1. And Windows 3.1 did not have preemptive multitasking at all. Everything was cooperative running in one address space. If an application used anything from that era, the kernel could end up wasting way too many cycles handling the request. This made multitasking under high load dicey at best.

Linux is a fully preemptive OS with a kernel designed to return from system calls quickly, without blocking all the processes in the system. No surprise it fared better.

My off-brand 486dx4 120mhz was the first cpu I had that could play mp3 without skipping in Winamp.
With mpg123 or mp3blaster (or mocp even) it would run much better.