[hpsdr] FLAC compression ratio...

Gary Sitton gasitton at comcast.net
Mon Sep 23 14:58:34 PDT 2013


All:

    Having some experience with lossless compression, I know
that the smaller the compression epoch or window is, the less
the guaranteed compression can be.  In other words, in order
to absolutely guarantee 2:1 compression, i.e.  50% on an
arbitrary signal of arbitrary effective band-width, one would
need and infinitely large input buffer or FIFO to achieve this
down-sampling level.

    That's the bad news.  If however, the audio stream in question
is band-limited and filled with gaps of low noise or silence (the
case for SSB and CW), then the probability of dropping below
50% compression is diminishingly small. The only issue is putting
in a lossy fall-back mode where the least significant bits are
trimmed (automatically) to achieve 50% compression in these
worst case scenarios.

    I didn't see such a fall-back mode defined for FLAC to achieve
a fixed lower limit on compression by a segue into a mildly lossy
mode of some sort by some means.  The good news is that
this is doable, but is clearly more complicated. One brute force
way is to do a parallel compression on 14-bits and 16-bits at
the same time.  One would only use the 14-bit mode when
the 16-bit mode failed the 2:1 criterion.

    The other way to augment the certainty of a 2:1 result is
using a bigger input buffer (dynamically perhaps).  This would
result in greater latency, but might be tolerable for most SDR
applications.  The real question here is, "Is the 2:1 data rate
increase worth it?" I'm sure there are some papers out there
which address the guaranteed minimum compression problem
in a real-time environment of fixed-point data conversion.

Hope this helps!

Gary (K5AMH)





More information about the Hpsdr mailing list