Issue metadata
Sign in to add a comment
|
Use FLAC to encode HRTF database |
||||||||||||||||||||||
Issue descriptionChrome now appears to support FLAC-encoded audio. We should consider using this to encode the HRTF database since FLAC is lossless so that the database would be unchanged from the current data. This could shrink the database by 2, maybe?
,
Nov 29 2016
Why would a lossless encoding introduce extra stuff? That doesn't seem very lossless to me. But we'll have to test to be sure, I guess. I guess that also means a layout test to verify that the FLAC-encoded version matches the original WAV-encoded version exactly.
,
Nov 29 2016
Adding few frames at the head and the tail for the sake of en/decoding is not losing something as far as you get the audible content correctly. That's the thing - we have to find out what 'lossless' actually means here.
,
Nov 29 2016
For the record, I used avconv to convert the file to flac and then convert back to wav. The resulting wav file is slightly longer, but the content is identical, according to octave.
,
Nov 29 2016
So the additional frames after? or before? Also avconv might do something different from FFMPEG.
,
Nov 29 2016
The actual file on disk is slightly longer. The actual audio data is exactly the same length. I did not look, but I think the WAV header is slightly longer.
,
Nov 29 2016
Ok. I stripped off the WAV header from each file and the result is that both files have exactly the same length and data. avconv put in some additional header fields.
,
Nov 29 2016
,
Dec 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/625aefda371b1533682cf59b9332404a913651f4 commit 625aefda371b1533682cf59b9332404a913651f4 Author: rtoy <rtoy@chromium.org> Date: Wed Dec 07 19:13:35 2016 Encode HRTF database using FLAC Encoding the HRTF database using FLAC shrinks the database file from 245804 bytes to 145812 bytes (40% less space), while still keeping exactly the same data. BUG= 76391 , 669545 TEST=hrtf-database.html Review-Url: https://codereview.chromium.org/2537183002 Cr-Commit-Position: refs/heads/master@{#437026} [add] https://crrev.com/625aefda371b1533682cf59b9332404a913651f4/third_party/WebKit/LayoutTests/webaudio/hrtf-database.html [modify] https://crrev.com/625aefda371b1533682cf59b9332404a913651f4/third_party/WebKit/LayoutTests/webaudio/resources/audit.js [modify] https://crrev.com/625aefda371b1533682cf59b9332404a913651f4/third_party/WebKit/LayoutTests/webaudio/resources/buffer-loader.js [add] https://crrev.com/625aefda371b1533682cf59b9332404a913651f4/third_party/WebKit/Source/platform/audio/resources/Composite.flac [add] https://crrev.com/625aefda371b1533682cf59b9332404a913651f4/third_party/WebKit/Source/platform/audio/resources/README [modify] https://crrev.com/625aefda371b1533682cf59b9332404a913651f4/third_party/WebKit/public/blink_resources.grd |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by hongchan@chromium.org
, Nov 29 2016