Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Laya the open source version of Jev(convaiinnovations.com ↗)
    44comments
  2. AI-generated posters don’t have to be horrible(john.hartnup.uk ↗)
    326comments
  3. Human brain is two separate organs, Stanford Medicine-led research finds(stanford.edu ↗)
    153comments
  4. “The Secret Life of Circuits” is here(coredump.cx ↗)
    32comments
  5. Android 17 is the first since 3.x to add new APIs without releasing to the AOSP(grapheneos.social ↗)
    508comments
  6. What Zig felt like, coming from Rust(besok.github.io ↗)
    1comments
  7. GPT-6 Astra Solves a WWI German Radio Cipher(prinzai.com ↗)
    113comments
  8. Tin: full-text search for Postgres(planetscale.com ↗)
    1comments
  9. San Francisco Onion Futures Company(onionfutures.com ↗)
    91comments
  10. A graphical desktop for the ZX Spectrum(github.com/mindbox77 ↗)
    discuss
  11. Black Holes or Black Hole Stars? Astronomers Spar over 'Little Red Dots'(quantamagazine.org ↗)
    1comments
  12. If math is more than proof, we need to better celebrate the rest of it(terrytao.wordpress.com ↗)
    152comments
  13. Communication by means of modulated Johnson noise(pnas.org ↗)
    17comments
  14. From Stonemasons to Carpenters(thelastsoftwareengineer.substack.com ↗)
    4comments
  15. Cloudflare Quick Tunnels(cloudflare.com ↗)
    296comments
  16. How to Write with an LLM(sockpuppet.org ↗)
    355comments
  17. You can run Git on object storage if you re-make packfiles(tigrisdata.com ↗)
    22comments
  18. SDCC – Small Device C Compiler(sourceforge.net ↗)
    21comments
  19. Saving another 100TB of RAM(cloudflare.com ↗)
    86comments
  20. Science Is Open Software(jepedersen.dk ↗)
    46comments
  21. How OpenAI Used Its Own LLMs to Design Its Jalapeño Chip(ieee.org ↗)
    108comments
  22. Why building a Rust LSP is hard(rust-glancer.github.io ↗)
    42comments
  23. NASA-IBM Lunar Foundation open-Source Geospatial AI Model(usra.edu ↗)
    5comments
  24. Ray Ozzie and the Optimism of Being Early(reproof.app ↗)
    4comments
  25. Ctenophores: Wonders of Biology(quantamagazine.org ↗)
    6comments
  26. The first new cat species discovered in 100 years(nationalgeographic.com ↗)
    116comments
  27. OpenJev(openjev.com ↗)
    274comments
  28. Goroutine Leak Profiles(go.dev ↗)
    6comments
  29. Show HN: Cactus Needle 3: 8-29MB automation models can match DeepSeek V4 Flash(cactuscompute.com ↗)
    89comments
  30. Photon-Emission-Guided Laser Fault Injection Enables RP2350 Secure Debug(ledger.com ↗)
    77comments

Minimp3 – Minimalistic, single-header library for decoding MP3

44 pointsby 8y agogithub.com
10 comments
8y agoHN ↗

I wonder if this is small enough and performant enough to run on an Arduino. Or does it rely heavily on Intel instructions?

8y agoHN ↗

It looks like it's fast because it makes use of x86 and arm SIMD extensions, but you could probably get the scalar version to run on an arduino with some effort. It would likely be slow, though.

If you are looking at arduino audio applications, I would suggest either using a MP3 codec asic or pre-decoding to wav and compensating by using larger storage.

8y agoHN ↗

Yes, It's already been used on STM32F407 and ESP32.

8y agoHN ↗

Let me download mp3 files from the internet and run them through a completely new and untested parser and decoder. That sounds like a great plan.

8y agoHN ↗

Shouldnt really be a problem unless those mp3s have malicious code for that particular decoder

8y agoHN ↗

Looks like it was inspired by http://keyj.emphy.de/minimp3/ and https://keyj.emphy.de/kjmp2/ , always good to see more people trying to implement multimedia codecs. The theory behind it all is not easy to understand, but in practice it turns into a bunch of arithmetic and table lookups.

That said, this one being floating-point and requiring intrinsics makes it less portable.

8y agoHN ↗

You absolutely correct, it's indeed inspired by Keyj`s minimp3. Float-point used because it's hard do with 4-byte fixed-point type and achieve ISO conformance. We must to use different dynamic ranges for different parts of decoder (i.e. emulate own floating point) or more than 4-byte fixed-point type. Only float-point support is needed, SSE/NEON intrinsics is not required and can be fully disabled by MINIMP3_NO_SIMD.

8y agoHN ↗

This is really cool and educational! How difficult is encoding relative to decoding?

8y agoHN ↗

Encoders usually harder, because, for example, you can't verify it using reference vectors (there no exact reference to compare with). Also encoders like h264 contains big part of decoder as well, because it must reconstruct encoded frame internally for motion compensation.