mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 03:08:13 +00:00
LibAudio: Add a FLAC encoder
This encoder can handle all integer formats and sample rates, though only two channels well. It uses fixed LPC and performs a close-to-optimal parameter search on the LPC order and residual Rice parameter, leading to decent compression already.
This commit is contained in:
parent
252b1328ea
commit
625aac2367
7 changed files with 795 additions and 0 deletions
|
@ -852,6 +852,7 @@ ErrorOr<Vector<i64>, LoaderError> FlacLoaderPlugin::decode_fixed_lpc(FlacSubfram
|
|||
// http://mi.eng.cam.ac.uk/reports/svr-ftp/auto-pdf/robinson_tr156.pdf page 4
|
||||
// The coefficients for order 4 are undocumented in the original FLAC specification(s), but can now be found in
|
||||
// https://datatracker.ietf.org/doc/html/draft-ietf-cellar-flac-03#section-10.2.5
|
||||
// FIXME: Share this code with predict_fixed_lpc().
|
||||
switch (subframe.order) {
|
||||
case 0:
|
||||
// s_0(t) = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue