[FFmpeg-devel] [PATCH] ALS decoder
Thilo Borgmann
thilo.borgmann
Sun Aug 23 23:44:25 CEST 2009
>>> +static int decode_blocks(ALSDecContext *ctx, unsigned int ra_frame,
>>> + unsigned int c, unsigned int *div_blocks,
>>> + unsigned int *js_blocks)
>>> +{
>>> ...
>>> + // store carryover raw samples
>>> + memmove((ctx->raw_samples[c]) - sconf->max_order,
>>> + (ctx->raw_samples[c]) - sconf->max_order + sconf->frame_length,
>>> + sizeof(int64_t) * sconf->max_order);
>>> +
>>> + memmove((ctx->raw_samples[c + 1]) - sconf->max_order,
>>> + (ctx->raw_samples[c + 1]) - sconf->max_order + sconf->frame_length,
>>> + sizeof(int64_t) * sconf->max_order);
>>> +
>>> + return 0;
>>> +}
>> this looks similar to decode_blocks_ind() i guess some parts could be
>> factored
> The "c++;" in the else branch of the calling function prevents this to
> be done elegantly. Thus it would require another (duplicated) if to
> factor the memmove()'s out of the functions.
I was partially wrong on that one... will be factorized in revision 7.
-Thilo
More information about the ffmpeg-devel
mailing list