Opened 10 years ago
Last modified 17 months ago
#5482 open defect
g721 (g726): fix audiable artefacts
| Reported by: | ami_stuff | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | avcodec |
| Version: | git-master | Keywords: | g726 |
| Cc: | Lastique | Blocked By: | |
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
decodes ok with sox
https://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket1955/g721_1ch_44khz.au
also reproducible with g726 sample:
https://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket1955/g726_44khz_2bit.au
C:\>ffmpeg -i C:\g721_1ch_44khz.au out.wav
ffmpeg version N-79632-g3ce1988 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.5.0 (GCC) 20100414 (Fedora MinGW 4.5.0-1.fc14)
configuration: --prefix=/var/www/users/research/ffmpeg/snapshots/build --arch=
x86 --target-os=mingw32 --cross-prefix=i686-pc-mingw32- --cc='ccache i686-pc-min
gw32-gcc' --enable-pthreads --enable-memalign-hack --enable-runtime-cpudetect --
enable-cross-compile --enable-static --disable-shared --extra-libs='-lws2_32 -lw
inmm -lpthread' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snapsh
ots/build/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/sna
pshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3 --
enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-li
bvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-li
bopencore-amrwb --enable-libmp3lame --enable-libfreetype --enable-libvpx --disab
le-decoder=libvpx
libavutil 55. 22.101 / 55. 22.101
libavcodec 57. 38.100 / 57. 38.100
libavformat 57. 34.103 / 57. 34.103
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 44.100 / 6. 44.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, au, from 'C:\g721_1ch_44khz.au':
Duration: 00:00:30.01, start: 0.000000, bitrate: 176 kb/s
Stream #0:0: Audio: adpcm_g726le ([23][0][0][0] / 0x0017), 44100 Hz, mono, s
16, 176 kb/s
[wav @ 0x2c3eb60] Using AVStream.codec to pass codec parameters to muxers is dep
recated, use AVStream.codecpar instead.
Output #0, wav, to 'out.wav':
Metadata:
ISFT : Lavf57.34.103
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16,
705 kb/s
Metadata:
encoder : Lavc57.38.100 pcm_s16le
Stream mapping:
Stream #0:0 -> #0:0 (adpcm_g726le (g726le) -> pcm_s16le (native))
Press [q] to stop, [?] for help
size= 2585kB time=00:00:30.01 bitrate= 705.6kbits/s speed= 213x
video:0kB audio:2585kB subtitle:0kB other streams:0kB global headers:0kB muxing
overhead: 0.002946%
Attachments (1)
Change History (4)
comment:1 by , 10 years ago
| Component: | undetermined → avcodec |
|---|---|
| Keywords: | g726 added |
| Status: | new → open |
| Version: | unspecified → git-master |
comment:2 by , 3 years ago
this also decodes into terrible quality:
./ffmpeg -i sin8k.wav -acodec g726 -y g726.wav
ffmpeg version N-112362-g4c422de1db Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
configuration:
libavutil 58. 27.100 / 58. 27.100
libavcodec 60. 30.101 / 60. 30.101
libavformat 60. 15.100 / 60. 15.100
libavdevice 60. 2.101 / 60. 2.101
libavfilter 9. 11.100 / 9. 11.100
libswscale 7. 4.100 / 7. 4.100
libswresample 4. 11.100 / 4. 11.100
[aist#0:0/pcm_s16le @ 0x555b18bafb80] Guessed Channel Layout: mono
Input #0, wav, from 'sin8k.wav':
Metadata:
encoder : Lavf60.15.100
Duration: 00:00:30.00, bitrate: 128 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, 1 channels, s16, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s16le (native) -> adpcm_g726 (g726))
Press [q] to stop, [?] for help
Output #0, wav, to 'g726.wav':
Metadata:
ISFT : Lavf60.15.100
Stream #0:0: Audio: adpcm_g726 (E[0][0][0] / 0x0045), 8000 Hz, mono, s16, 32 kb/s
Metadata:
encoder : Lavc60.30.101 g726
[out#0/wav @ 0x555b18baf980] video:0kB audio:117kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.076667%
size= 117kB time=00:00:29.95 bitrate= 32.1kbits/s speed=1.75e+03x
./ffmpeg -i g726.wav -y out.wav
ffmpeg version N-112362-g4c422de1db Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
configuration:
libavutil 58. 27.100 / 58. 27.100
libavcodec 60. 30.101 / 60. 30.101
libavformat 60. 15.100 / 60. 15.100
libavdevice 60. 2.101 / 60. 2.101
libavfilter 9. 11.100 / 9. 11.100
libswscale 7. 4.100 / 7. 4.100
libswresample 4. 11.100 / 4. 11.100
Input #0, wav, from 'g726.wav':
Metadata:
encoder : Lavf60.15.100
Duration: 00:00:30.00, bitrate: 32 kb/s
Stream #0:0: Audio: adpcm_g726 (E[0][0][0] / 0x0045), 8000 Hz, mono, s16, 32 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (adpcm_g726 (g726) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to 'out.wav':
Metadata:
ISFT : Lavf60.15.100
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, mono, s16, 128 kb/s
Metadata:
encoder : Lavc60.30.101 pcm_s16le
[out#0/wav @ 0x55a97e71dac0] video:0kB audio:469kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.016250%
size= 469kB time=00:00:29.69 bitrate= 129.3kbits/s speed= 986x
the problem does not happen with "-acodec g722"
by , 3 years ago
comment:3 by , 17 months ago
| Cc: | added |
|---|
Note:
See TracTickets
for help on using tickets.



I don't think this is _LE related or a regression: I can reproduce the artefacts with e344c1ea when forcing the little endian bitstream reader so I guess this is an issue in our G.726 implementation.