[FFmpeg-devel] [PATCH] QCELP decoder

Kenan Gillet kenan.gillet
Fri Oct 17 18:46:31 CEST 2008


Hi,

On Thu, Oct 16, 2008 at 11:51 PM, Diego Biurrun <diego at biurrun.de> wrote:
> On Thu, Oct 16, 2008 at 03:38:03PM -0700, Kenan Gillet wrote:
>> On Oct 15, 2008, at 3:09 PM, Michael Niedermayer wrote:
>>
>> > cOn Tue, Oct 14, 2008 at 06:59:34PM -0700, Kenan Gillet wrote:
>> >>
>> >> --- libavcodec/qcelp.h     (revision 0)
>> >> +++ libavcodec/qcelp.h     (revision 0)
>> >> +static float compute_subframe_energy(const float *vector, const
>> >> int subframeno) {
>> >> +    int   i;
>> >> +    float energy = 0;
>> >> +
>> >> +    vector += 40 * subframeno;
>> >> +
>> >> +    for (i = 0; i < 40; i++)
>> >> +        energy += vector[i] * vector[i];
>> >> +
>> >> +    return energy;
>> >> +}
>> >
>> > IMHO its cleaner not to add subframeno inside the function.
>> > a simple dot_product(vector, len) should be more readable
>> > also such a function has a much better chance to be shareable
>> > between codec, and especially when things like that are optimized its
>> > better if it isnt needed to be redone for each len and other obscure
>> > variant
>>
>> done, I svn cp libavcodec/acelp_math.c into libavcodec/qcelp_math.c
>> and made it ff_dot_product.
>> or is there a better place for that ?
>
> If the file is used for both acelp and qcelp, it should not be called
> qcelp, but celp instead.

done

>
>> Should it be in a different patch ?
>
> Smaller patches get reviewed and applied faster.

round 6 summary:
- no code change from round 5
- replace svn cp by svn add to make the patch smaller
- rename qcelp_math.[ch] into celp_math.[ch]
- the patch is now broken into:
    - qcelp-round6-decoder.patch.txt
    core decoder code

    - qcelp-round6-doc-glue.patch.txt
    doc and glue code

    - qcelp-round6-filters.patch.txt
    filters functions

    - qcelp-round6-lsp.patch.txt
    lsp functions

    - qcelp-round6-math.patch.txt
    do_product


Let me know if I can do anything to ease you reviewing effort.

Thanks,

Kenan
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: qcelp-round6-decoder.patch.txt
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081017/0992ad0d/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: qcelp-round6-filters.patch.txt
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081017/0992ad0d/attachment-0001.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: qcelp-round6-lsp.patch.txt
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081017/0992ad0d/attachment-0002.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: qcelp-round6-math.patch.txt
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081017/0992ad0d/attachment-0003.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: qcelp-round6-doc-glue.patch.txt
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081017/0992ad0d/attachment-0004.txt>



More information about the ffmpeg-devel mailing list