[FFmpeg-devel] [PATCH] adpcm-ima-wav header and codec
Timofei
tim
Mon Oct 15 17:55:29 CEST 2007
Hi.
I found a few bugs in the adpcm-ima codec.
This format is used in smv video by sigmatel-based mp3 players.
1) The field 'bytes-per-second' in WAV header is set incorrectly.
This breaks seeking on hardware player.
I found the bitrate value used in calculations comes from commandline
and does not reflect reality.
The adpcm-bitrate.patch puts correct bitrate in avctx.
This fixes wav header, but the ffmpeg program still prints wrong bitrate
during encoding.
2) adpcm-codec.patch
In adpcm_encode_frame() predictor for right channel gets initialized by
2nd sample of the left channel instead of 1st sample of the right channel.
The adpcm_decode_frame() loses first sample in block.
This sample initializes predictor and then gets lost instead of being
copied to output.
3) adpcm-index_step.patch - initialization of index_step added.
This patch depends on adpcm-codec.patch
4) adpcm-guard.patch - not a bug. Just removed unnecessary guarding
&=0x0f around adpcm_ima_compress_sample().
Regards.
Tim.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: adpcm-bitrate.patch
Type: text/x-patch
Size: 656 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071015/b461d35a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: adpcm-codec.patch
Type: text/x-patch
Size: 1676 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071015/b461d35a/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: adpcm-guard.patch
Type: text/x-patch
Size: 2630 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071015/b461d35a/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: adpcm-index_step.patch
Type: text/x-patch
Size: 1643 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071015/b461d35a/attachment-0003.bin>
More information about the ffmpeg-devel
mailing list