[FFmpeg-devel] [PATCH] Video decoder and demuxer for AMV files
Måns Rullgård
mans
Mon Sep 24 23:01:27 CEST 2007
Vitor Sessak <vitor1001 at gmail.com> writes:
> Hi
>
> Diego Biurrun wrote:
>> On Mon, Sep 24, 2007 at 08:44:21PM +0200, Vitor Sessak wrote:
>>> Interestingly, while you were working with the video patch, I had a
>>> look at the audio. See attached patch.
>>>
>>> --- libavcodec/adpcm.c (revision 10534)
>>> +++ libavcodec/adpcm.c (working copy)
>>> @@ -1442,6 +1455,7 @@
>>> ADPCM_CODEC(CODEC_ID_ADPCM_IMA_DK4, adpcm_ima_dk4);
>>> ADPCM_CODEC(CODEC_ID_ADPCM_IMA_WS, adpcm_ima_ws);
>>> ADPCM_CODEC(CODEC_ID_ADPCM_IMA_SMJPEG, adpcm_ima_smjpeg);
>>> +ADPCM_CODEC(CODEC_ID_ADPCM_IMA_AMV, adpcm_ima_amv);
>> This is not alphabetical order.
>
> No it is not. The whole list is unsorted... (I'll try to give the good
> example anyway)
>
> New patch, this time against the latest svn.
>
> -Vitor
> Index: libavcodec/adpcm.c
> ===================================================================
> --- libavcodec/adpcm.c (revision 10567)
> +++ libavcodec/adpcm.c (working copy)
> @@ -1195,6 +1195,19 @@
> src++;
> }
> break;
> + case CODEC_ID_ADPCM_IMA_AMV:
> + c->status[0].predictor = *src;
> + src += 2;
> + c->status[0].step_index = *src++;
> + src++; /* skip another byte before getting to the meat */
> + while (src < buf + buf_size) {
> + *samples++ = adpcm_ima_expand_nibble(&c->status[0],
> + (*src >> 4) & 0x0F, 3);
Useless & 0xf.
> + *samples++ = adpcm_ima_expand_nibble(&c->status[0],
> + *src & 0x0F, 3);
The indentation here and in the previous statement looks odd to me.
I prefer indenting lines like these a little more to emphasise that
they are part of the same statement.
> + src++;
> + }
> + break;
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list