-4

How can I compress a 44.1kHz sampled, 16-bit PCM real-time music data stream to reduce its size and send it over an AXI4 Stream interconnect in a Zynq Z7020?

Can anyone suggest a codec for such a use-case and maybe links to its implementation?

Alex P
  • 436
  • 2
  • 9
  • 44.1 kHz 16 bit mono audio uses a small bandwidth compared to the Zynq-7000 FPGA capabilities. Can you elaborate better on why you need HW compression? What is your latency requirement? Also, as you have a dual core Cortex-A9 there, why not using it? It can compress several audio streams with a wide selection of codecs much more easily than using FPGA. – Luca Ceresoli Sep 18 '19 at 06:53
  • I was under the, apparently wrong, impression that compression was needed for transmission of such data streams. Anyway, thank you for clearing this up. Both your comments are very helpful ! – Alex P Sep 18 '19 at 16:48

1 Answers1

0

Take a look at IMA ADPCM, a pretty simplistic lossy codec. It doesn't need floating operations, it produces constant bitrate stream, which is easy to handle in hw.

The quality might be not that great though, but without any specs from you it's not possible to suggest something more suitable.

Vlad
  • 5,108
  • 1
  • 9
  • 16
  • Thank you for the suggestion! Are there any lossless, relatively simple codecs? I cannot provide any other specs (except that I'm interested in single channel audio) since I do not have much knowledge of the subject and therefore my the question is, naturally, "wider". This is more of a "what's out there and for what application is it suitable" kind of question rather than "how to solve X". – Alex P Sep 17 '19 at 23:04
  • 1
    No lossless codec will ever guarantee compression in all cases. The most extreme example is random noise: as it has maximum entropy, so it cannot be compressed without losing information. As such, with a lossless codec the amount of hardware bandwidth you need to guarantee is the same as the uncompressed audio, and all the advantages of compression are gone. – Luca Ceresoli Sep 18 '19 at 06:47