[FFmpeg-devel] [PATCH] Sun AU 32-bit float audio

Michael Niedermayer michaelni
Tue Jul 22 14:56:25 CEST 2008


On Tue, Jul 22, 2008 at 10:23:53PM +1000, pross at xvid.org wrote:
> $subject.
> 
> (Rationale: Despite FFmpeg's lack of internal floating point audio
> precision, this codec is useful to me, for pushing/pulling float audio
> to/from a propetiery network-attached D/A converter.)
[...]
> @@ -222,6 +224,12 @@
>      dst = frame;
>  
>      switch(avctx->codec->id) {
> +    case CODEC_ID_PCM_F32BE:
> +        for(;n>0;n--) {
> +            v = *samples++;
> +            bytestream_put_be32(&dst, av_flt2int(v/32768.0f));
> +        }
> +        break;

The decoder shoud return floats if floats are stored in it, and it
should set SAMPLE_FMT_FLT.

If you want it to work with ffmpeg/ffplay they can also call a function
that contains the above 4 lines of code.

If you want all lavc applications to support it, a generic audio converter
with clean API would be needed.

The above 3 are of course independant, implementation of one does not
require the other ...


PS: no i will not accept any hacks like this patch that converts it in
the decoder, iam annoyed enough that i have to cleanup h264.c from all
the hacks and trash people commited to it over time.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080722/53652a26/attachment.pgp>



More information about the ffmpeg-devel mailing list