[FFmpeg-devel] [PATCH] ALS decoder

Thilo Borgmann thilo.borgmann
Mon Nov 9 09:45:41 CET 2009


Michael Niedermayer schrieb:
> On Wed, Nov 04, 2009 at 05:40:27PM +0100, Thilo Borgmann wrote:
>> Revision 25 attached.
> [...]
>> +/** Reformat block sizes from log2 format to direct form. Also assure that the
>> + *  block sizes of the last frame correspond to the actual number of samples.
>> + */
>> +static void reconstruct_block_sizes(ALSDecContext *ctx, uint32_t *div_blocks)
> 
> does it make sense to have this as seperate function? its called just once

Merged.

> 
> [...]
>> ...
> 
>> +    // decode all blocks
>> +    for (b = 0; b < ctx->num_blocks; b++) {
>> +        unsigned int s;
>> +        raw_samples_L = ctx->raw_samples[c    ] + offset;
>> +        raw_samples_R = ctx->raw_samples[c + 1] + offset;
>> +        if (read_block_data(ctx, ra_frame, raw_samples_L, div_blocks[b],
>> +                            &js_blocks[0], raw_samples_R) ||
>> +            read_block_data(ctx, ra_frame, raw_samples_R, div_blocks[b],
>> +                            &js_blocks[1], raw_samples_L)) {
> 
> Is it intended that the second function call will use raw_samples_L
> from the first call while the first call will not use raw_samples_R
> from the second call but rather what was in that array before?

Yes. In both cases only indices <0 of raw_samples_X are read.

> 
> 
> [...]
>> ...

All done in revision 26.

Thanks!
-Thilo



More information about the ffmpeg-devel mailing list