[FFmpeg-trac] #1792(swresample:new): libswresample mono to stereo conversion is lowering the amplitude

FFmpeg trac at avcodec.org
Mon Oct 8 00:32:53 CEST 2012


#1792: libswresample mono to stereo conversion is lowering the amplitude
-------------------------------------+-------------------------------------
               Reporter:             |                  Owner:  michael
  albertzeyer                        |                 Status:  new
                   Type:  defect     |              Component:  swresample
               Priority:  normal     |               Keywords:
                Version:             |               Blocking:
  unspecified                        |  Analyzed by developer:  0
             Blocked By:             |
Reproduced by developer:  0          |
-------------------------------------+-------------------------------------
 I am resampling sound data with libswresample. I have one sample case
 where I resample

 44100Hz, sint16, mono

 to

 44100Hz, sint16, stereo.

 I.e. this is just a mono to stereo conversion.

 I was expecting that

 {{{leftSample = rightSample = monoSample;}}}

 However, I was more getting something mostly like:

 {{{leftSample = rightSample = monoSample / 1.41;}}}
 (maybe 1.41 ~= sqrt(2) ?)

 Is this a bug? Or expected? I don't have profesional audio background but
 I heard that a normal mono to stereo conversion is as what I would expect.
 I also have seen many different implementations where it is done like
 this, e.g. [https://github.com/avuserow/ffmpeg-
 replaygain/blob/master/gain_analysis.c the main ReplayGain
 implementation].

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1792>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list