On Thu, Aug 25, 2016 at 5:46 PM, Jean-Baptiste Kempf <[email protected]> wrote:
> On 25 Aug, Burt P. wrote :
>> HDCD coding is hidden in some CD audio, but not all, and using it is
>> completely optional.
>
> But you can detect that, cannot you?

Yes, but it requires scanning the whole audio to know if you will be
using peak extend.
PE requires and 6dB of room at the top for the expanded peaks.
So you have to make two full passes, or just always apply -6dB to all
16-bit audio in case HDCD/PE appears.
The current implementation does the latter, because we only get the
audio one frame of a few thousand samples at a time.
We need at least one or two seconds, 44100-88200 samples, to know we
will catch an HDCD packet.
There are some HDCD-CDs where only one track had HDCD encoding,
because it was a compilation or something.
In this case, you could have a single file flac+cue being processed,
and not know for 20 minutes into the audio that you need room for peak
extend.

Audio players can scan ahead, and choose to use HDCD processing or not.
They can even enable-disable per track, or when seeking, by scanning
ahead or behind a couple seconds, without the listener noticing in
most cases.
For avconv/ffmpeg (at least the cli), however, I think it is best left
to the user.

This is just my opinion. Maybe libav does prefer a regular decoder.

--
Burt
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to