[flac-dev] Support for ultra-high sample rates?
Olli Niemitalo
o at iki.fi
Tue Jun 2 09:12:19 UTC 2020
Browsing the sources, it looks to me that libFLAC decoder already
supports sample rates as 20-bit numbers in the STREAMINFO metadata
block so up to 1,048,575 Hz if a trick is done by having in
FRAME_HEADER of each frame the sample rate as "0000 : get from
STREAMINFO metadata block". If explicitly given in the frame header,
the maximum sample rate is 655350 Hz.
However, the libFLAC encoder produces an error for sample rates higher
than 655350 Hz and does not do the above kind of trickery to get
higher sample rates. Potentially you could modify the encoder and the
result would still work with an existing decoder. But that would not
work so well anymore for starting in the middle of a FLAC stream
without having encountered a STREAMINFO metadata block -- dunno when
that might happen.
-olli (I am not a FLAC developer)
On Tue, Jun 2, 2020 at 6:59 AM Con Kolivas <kernel at kolivas.org> wrote:
>
> Hi.
>
> I was wondering if there was any interest in extending the flac
> container format to support sample rates above the 655k current limit.
> Please note this is not for using ridiculously high sample rate
> sourced audio for some imaginary audible benefit. I've been involved
> in some experimentation with offline upsampling in software prior to
> delivery to an external DAC as a way to bypass the DAC's internal
> oversampling and found that wavpak is the only compressed container
> format that supports the 705/768 sample rates but it is very poorly
> supported and extremely slow during decompression, and fully
> uncompressed WAV data is extremely cumbersome. Most DACs do appear to
> turn off their anti-aliasing filters at sample rates above 192kHz so
> 384 may well be the limit of any theoretical benefit, but many DACs
> now support input up to 768kHz (a very small number support even
> higher.) Studio ADCs often record in the Mhz range, and although they
> apparently always decimate as they sample, there may be a theoretical
> use for the data as is. It would be nice if the flac container was
> extensible to any arbitrary value for research purposes.
>
> Thanks,
> -ck
> _______________________________________________
> flac-dev mailing list
> flac-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/flac-dev
More information about the flac-dev
mailing list