[MPlayer-dev-eng] [PATCH] af_volnorm: make it work with float audio data
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sat Dec 15 22:42:56 CET 2012
On 15 Dec 2012, at 15:04, Giorgio Vazzana <mywing81 at gmail.com> wrote:
> Hi,
>
> MPlayer decodes some common audio formats in floatle, for example:
>
> ==========================================================================
> Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
> AUDIO: 44100 Hz, 2 ch, floatle, 192.0 kbit/6.80% (ratio: 23999->352800)
> Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
> ==========================================================================
>
> ==========================================================================
> Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
> AUDIO: 44100 Hz, 2 ch, floatle, 0.0 kbit/0.00% (ratio: 0->352800)
> Selected audio codec: [ffvorbis] afm: ffmpeg (FFmpeg Vorbis)
> ==========================================================================
>
> but af_volnorm doesn't seem to work with float audio data.
> The attached patch fixes this, assuming float samples are in the range
> [-1.0f, 1.0f] (is there any codec that uses a different range?)
> I have used it locally for about a month now, so I thought I'd send it upstream.
Thanks, I think the multiplication with 1.0 is just confusing, I'd just remove it completely.
Otherwise it seems right.
> * method*_int16 could use a lrintf() in the scale loop
Hm, I forgot if it's really lrintf, but some of those float -> int conversion functions are awfully slow in some cases.
More information about the MPlayer-dev-eng
mailing list