[FFmpeg-cvslog] r14409 - in trunk: ffmpeg.c libavcodec/allcodecs.c libavcodec/avcodec.h libavcodec/pcm.c libavcodec/utils.c

Michael Niedermayer michaelni
Sat Jul 26 10:49:13 CEST 2008


On Sat, Jul 26, 2008 at 09:08:15AM +0200, pross wrote:
> Author: pross
> Date: Sat Jul 26 09:08:15 2008
> New Revision: 14409
> 
> Log:
> add CODEC_ID_PCM_F32BE (32-bit floating point PCM big endian decoder)
[...]
> @@ -222,6 +227,16 @@ static int pcm_encode_frame(AVCodecConte
>      dst = frame;
>  
>      switch(avctx->codec->id) {
> +    case CODEC_ID_PCM_F32BE:
> +        {
> +        float *fsamples = data;
> +        for(;n>0;n--) {
> +            float fv = *fsamples++;
> +            bytestream_put_be32(&dst, av_flt2int(fv));
> +        }
> +        samples = (void*)fsamples;
> +        }
> +        break;
>      case CODEC_ID_PCM_S32LE:
>          encode_from16(4, 1, 0, &samples, &dst, n);
>          break;
[...]
> @@ -407,6 +431,15 @@ static int pcm_decode_frame(AVCodecConte
>          src2[c] = &src[c*n];
>  
>      switch(avctx->codec->id) {
> +    case CODEC_ID_PCM_F32BE:
> +        {
> +        float *fsamples = data;
> +        n = buf_size >> 2;
> +        for(;n>0;n--)
> +            *fsamples++ = av_int2flt(bytestream_get_be32(&src));
> +        samples = (void*)fsamples;
> +        break;
> +        }
>      case CODEC_ID_PCM_S32LE:
>          decode_to16(4, 1, 0, &src, &samples, buf_size);
>          break;

i did not approve these 2 hunks, besides av_int2flt/av_flt2int are slow


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

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- 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-cvslog/attachments/20080726/94c4ead2/attachment.pgp>



More information about the ffmpeg-cvslog mailing list