Opened 11 years ago

Closed 9 years ago

Last modified 6 years ago

#625 closed enhancement (fixed)

support 2/3/5bit IMA ADPCM

Reported by: ami_stuff Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: adpcm roundup
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

(issue 1598)

C:\>ffmpeg -i IMAADPCM_2bits.wav
ffmpeg version N-34318-g8475ec1, Copyright (c) 2000-2011 the FFmpeg developers
  built on Oct 31 2011 17:50:05 with gcc 4.6.1
  configuration: --enable-gpl --enable-version3 --enable-runtime-cpudetect --ena
ble-avisynth --enable-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --ena
ble-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --en
able-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib

  libavutil    51. 22. 0 / 51. 22. 0
  libavcodec   53. 26. 0 / 53. 26. 0
  libavformat  53. 18. 0 / 53. 18. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 45. 3 /  2. 45. 3
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[adpcm_ima_wav @ 020A90C0] Only 4-bit ADPCM IMA WAV files are supported
[wav @ 020A2320] parser not found for codec adpcm_ima_wav, packets or times may
be invalid.
[adpcm_ima_wav @ 020A90C0] Only 4-bit ADPCM IMA WAV files are supported
    Last message repeated 26 times
[wav @ 020A2320] Could not find codec parameters (Audio: adpcm_ima_wav ([17][0][
0][0] / 0x0011), 44100 Hz, 2 channels, 352 kb/s)
IMAADPCM_2bits.wav: could not find codec parameters

Attachments (11)

IMAADPCM_2bits.wav (107.7 KB ) - added by ami_stuff 11 years ago.
IMAADPCM_3bits.wav (161.5 KB ) - added by ami_stuff 11 years ago.
IMAADPCM_5bits.wav (269.1 KB ) - added by ami_stuff 11 years ago.
adpcm.jpg (162.7 KB ) - added by ami_stuff 10 years ago.
mono.rar (1.5 MB ) - added by ami_stuff 10 years ago.
2bit_mono.wav (324.4 KB ) - added by ami_stuff 10 years ago.
3bit_mono.wav (486.5 KB ) - added by ami_stuff 10 years ago.
5bit_mono.wav (810.6 KB ) - added by ami_stuff 10 years ago.
out_IMAADPCM_2bits.wav (858.1 KB ) - added by ami_stuff 6 years ago.
out_IMAADPCM_3bits.wav (858.1 KB ) - added by ami_stuff 6 years ago.
out_IMAADPCM_2bits.2.wav (858.1 KB ) - added by ami_stuff 6 years ago.

Change History (39)

by ami_stuff, 11 years ago

Attachment: IMAADPCM_2bits.wav added

by ami_stuff, 11 years ago

Attachment: IMAADPCM_3bits.wav added

by ami_stuff, 11 years ago

Attachment: IMAADPCM_5bits.wav added

comment:1 by Carl Eugen Hoyos, 11 years ago

Component: undeterminedavcodec
Priority: normalwish
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

comment:2 by Carl Eugen Hoyos, 11 years ago

Keywords: adpcm added

comment:3 by Carl Eugen Hoyos, 10 years ago

Keywords: roundup added

comment:4 by Elon Musk, 10 years ago

What created such files?

in reply to:  4 comment:5 by ami_stuff, 10 years ago

comment:6 by ami_stuff, 10 years ago

more info (see attached jpg)

by ami_stuff, 10 years ago

Attachment: adpcm.jpg added

comment:7 by Elon Musk, 10 years ago

Useless, i need specification so I can know what tables are used for non 4-bit cases. And I'm not going to hunt for big applications that can encode/decode such files. So something small as dll that does actual decoding or even better specification is required.

comment:11 by Elon Musk, 10 years ago

The last one is most useful. Could you also upload mono files (created with same tool)?

by ami_stuff, 10 years ago

Attachment: mono.rar added

in reply to:  11 comment:12 by ami_stuff, 10 years ago

Replying to richardpl:

Could you also upload mono files (created with same tool)?

Attached.

comment:13 by Elon Musk, 10 years ago

I can't accept rar. Please use somthing more sane like xz/zip-7/gz/bzip

in reply to:  13 comment:14 by ami_stuff, 10 years ago

Replying to richardpl:

I can't accept rar. Please use somthing more sane like xz/zip-7/gz/bzip

I'm not sure what does it mean? You don't like rar archive or what? UnRAR is available for linux and AFAICT p7zip can decompress it as well.

Last edited 10 years ago by ami_stuff (previous) (diff)

comment:15 by Elon Musk, 10 years ago

I do not have it installed and do not want to install it, because it is not free.

by ami_stuff, 10 years ago

Attachment: 2bit_mono.wav added

by ami_stuff, 10 years ago

Attachment: 3bit_mono.wav added

by ami_stuff, 10 years ago

Attachment: 5bit_mono.wav added

comment:16 by Elon Musk, 9 years ago

the stereo samples are really strange - layout does not match 4bit case.

comment:17 by Elon Musk, 9 years ago

Resolution: fixed
Status: openclosed

Mono files plays fine, for stereo only 2bit and others appears to be incorrectly encoded.

in reply to:  17 comment:18 by ami_stuff, 6 years ago

Replying to richardpl:

Mono files plays fine, for stereo only 2bit and others appears to be incorrectly encoded.

attached stereo 3/5bit files plays fine in Cool Edit Pro, would be nice to support this as well ;)

by ami_stuff, 6 years ago

Attachment: out_IMAADPCM_2bits.wav added

by ami_stuff, 6 years ago

Attachment: out_IMAADPCM_3bits.wav added

comment:19 by ami_stuff, 6 years ago

attached decoding output from (2bit/3bit):

http://www.fmjsoft.com/awavestudio.html

in case it will help in anything

at least with this software there is no noise in 3bit mode

Last edited 6 years ago by ami_stuff (previous) (diff)

comment:20 by Elon Musk, 6 years ago

But output is incorrect...

by ami_stuff, 6 years ago

Attachment: out_IMAADPCM_2bits.2.wav added

comment:21 by ami_stuff, 6 years ago

Yes, but the same happens with mono files, so there is a bug in decoder (it supports 100% correctly only 4-bit mode) - at least it proves that 3bit stereo sample could be decoded not only by cool edit/audition.

here is the mono output:

https://www.datafilehost.com/d/4b69a339

I can upload 36kb dvi plugin from cool edit if you want to investigate this issue.

comment:22 by ami_stuff, 6 years ago

here is the output in 7z, shouldn't do too many things at once

https://www.datafilehost.com/d/5bfb0a59

Last edited 6 years ago by ami_stuff (previous) (diff)

comment:23 by Elon Musk, 6 years ago

Not interested, I already lost too much time on this, who knows how cool edit/audition stores samples into bitstream.

comment:24 by Elon Musk, 6 years ago

You could check if rockbox decodes stereo 3bit and 5bit files OK.

comment:25 by ami_stuff, 6 years ago

There is a mention of IMA 3bit here, but I don't know how to test it:

https://fossies.org/dox/oss-v4.2-build2011-src-gpl/ossplay_8h_source.html (AFMT_MS_IMA_ADPCM_3BITS)

Here is Cool Edit manual (DVI/IMA ADPCM):

http://dmt.zjlsedu.org/longresty/301/040/050/L000000000122370.pdf

and I found also this:

https://www.powerdeveloper.org/blog/grzegorz%20kraszewski/did-i-write-something-about-adpcm

Last edited 6 years ago by ami_stuff (previous) (diff)

comment:26 by ami_stuff, 6 years ago

Vox Studio can converrt 3bit stereo sample as well (IMAADPCM_3bits.wav), unfortunately no source code of conversion dll.

http://www.xentec.be/download/download.html

"Download the documentation which describes the calling syntax for the file conversion DLL built into Vox Studio since version 3.0. This also contains a program example. This is for experienced programmers only."

http://www.xentec.be/download/vcdlldoc.zip

It can also save 3bit IMA ADPCM, but only mono AFAICT.

Last edited 6 years ago by ami_stuff (previous) (diff)

comment:27 by Elon Musk, 6 years ago

Fixed already in master.

comment:28 by ami_stuff, 6 years ago

thx :)

Note: See TracTickets for help on using tickets.