[FFmpeg-devel] [PATCH] ALS decoder
Thilo Borgmann
thilo.borgmann
Thu Aug 20 02:04:09 CEST 2009
> Some small things I missed when reviewing on ffmpeg-soc.
>
>> +/** Computes ceil(log2(x)) using av_log2.
>> + */
>> +static inline int ceil_log2(int x) {
>> + return x > 0 ? av_log2((x - 1) << 1) : 0;
>> +}
>
>
> That can be x > 1 since the result for x=1 is 0.
Done.
>
>> +
>> + // read all residuals
>> + // TODO: decode directly into ctx->raw_samples[] instead of storing the residuals
>> + if (sconf->bgmc_mode) {
>> + // TODO: BGMC mode
>> + } else {
>> + int64_t *current_res = raw_samples;
>> +
>> + for (sb = 0; sb < sub_blocks; sb++) {
>> + for (k = start; k < sb_length; k++) {
>> + current_res[k] = decode_rice(gb, s[sb]);
>> + }
>> + current_res += sb_length;
>> + start = 0;
>> + }
>> + }
>
>
> It seems you already decode the residuals directly into raw_samples, so
> that TODO can be removed?
Of course. Done.
Revision 2 attached.
Thanks!
Thilo
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: als_decoder.rev2.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090820/9d47cccb/attachment.asc>
More information about the ffmpeg-devel
mailing list