[FFmpeg-devel] [PATCH] TwinVQ decoder
Vitor Sessak
vitor1001
Fri Aug 21 16:40:23 CEST 2009
Loren Merritt wrote:
> I'm not entirely convinced it's a good idea to merge two window sizes
> into one wtype variable, but I haven't seen the alternative code so I'm
> not sure.
>
>> * Evaluates the LPC amplitude spectrum envelope from the line spectrum
>> pairs.
>> * Probably for speed reasons, the coefficients are evaluated as
>> * siiiibiiiiisiiiibiiiiisiiiibiiiiisiiiibiiiiis ...
>> * where s is an evaluated value, i is a value interpolated from the
>> others
>> * and b might be either calculated or interpolated, depending on an
>> * unexplained condition.
>> *
>> * @param step the size of a block "siiiibiiii"
>
> Are there supposed to be 4 or 5 "i"s there?
Fixed
>> int sizes[4];
>
> You only use 3 elements, and 1 of those is a duplicate.
Removed it, together with the get_sizes() function.
>> if (!j || j == mtab->fmode[ftype].sub-1) {
>> if (!j && wtype == 4) sub_wtype = 4;
>> if ( j && wtype == 7) sub_wtype = 7;
>> }
>
> Can you simplify that to
> if (!j && wtype == 4)
> sub_wtype = 4;
> else if (j == mtab->fmode[ftype].sub-1 && wtype == 7)
> sub_wtype = 7;
> or does that break when mtab->fmode[ftype].sub == 1 ?
I've tested and it works fine. New patch attached.
-Vitor
PS @Michael: May I just commit it if Loren has no more comments? This
code has already been reviewed by quite a few talented developers...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: twin.diff
Type: text/x-diff
Size: 1882 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090821/d4be471c/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: twinvq.c
Type: text/x-csrc
Size: 37475 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090821/d4be471c/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: twinvq_data.h
Type: text/x-chdr
Size: 13509 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090821/d4be471c/attachment.h>
More information about the ffmpeg-devel
mailing list