[Libav-user] swr_convert_frame noisy (windows only)

anovak at thincast.com anovak at thincast.com
Fri Feb 25 11:19:24 EET 2022


well, then I obviously missed something.

Tested this on debian too and there the resulting data is free of any 
noise, only on windows this happens.

Input data is perfectly sound in both cases (free of any noise, normal 
mono INT16 data)
(I´ve dumped the input and output stream to a file to be sure to not 
have any other error sources in there)


Input frame is created like this:

frame->channels = 1;
frame->sample_rate = 44100;
frame->format = AV_SAMPLE_FMT_S16;
frame->channel_layout = av_get_default_channel_layout(frame->channels);

bpp = av_get_bytes_per_sample(frame->format);
frame->nb_samples = size / inputFormat->nChannels / bpp;

avcodec_fill_audio_frame(frame, frame->channels, frame->format, data, 
size, 1);

output frame has the same fields set, but a different (stereo) channel 
configuration.

Any pointers? Did I forget to initialize something?

regards
Armin

On 25.02.22 08:52, Paul B Mahol wrote:
> 
> 
> On Thu, Feb 24, 2022 at 4:34 PM <anovak at thincast.com 
> <mailto:anovak at thincast.com>> wrote:
> 
>     Hi,
> 
> 
>     I have a application converting PCM data (int16) from mono to stereo.
> 
>     (
>     https://github.com/FreeRDP/FreeRDP/blob/master/libfreerdp/codec/dsp_ffmpeg.c#L357
>     <https://github.com/FreeRDP/FreeRDP/blob/master/libfreerdp/codec/dsp_ffmpeg.c#L357>
>     )
> 
> 
>     When using swr_convert_frame the resulting data is very noisy.
> 
> 
>     Do I miss something there or is this a bug?
> 
> 
> It is not bug in swr for certain.
> 
> 
> 
>     regards
> 
>     Armin
> 
>     _______________________________________________
>     Libav-user mailing list
>     Libav-user at ffmpeg.org <mailto:Libav-user at ffmpeg.org>
>     https://ffmpeg.org/mailman/listinfo/libav-user
>     <https://ffmpeg.org/mailman/listinfo/libav-user>
> 
>     To unsubscribe, visit link above, or email
>     libav-user-request at ffmpeg.org <mailto:libav-user-request at ffmpeg.org>
>     with subject "unsubscribe".
> 
> 
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/libav-user
> 
> To unsubscribe, visit link above, or email
> libav-user-request at ffmpeg.org with subject "unsubscribe".


More information about the Libav-user mailing list