[FFmpeg-devel] [PATCH] Make bubblesort() a common function

Vitor Sessak vitor1001
Sun Nov 22 21:17:28 CET 2009


Michael Niedermayer wrote:
> On Sun, Nov 22, 2009 at 06:50:43PM +0100, Vitor Sessak wrote:
>> $subj, useful for SIPR, maybe also for WMAVoice.
>>
>> -Vitor
> 
>>  lsp.c    |   11 +++++++++++
>>  lsp.h    |    2 ++
>>  twinvq.c |   13 +------------
>>  3 files changed, 14 insertions(+), 12 deletions(-)
>> 042b0e5130e7f816bd560309e46e92eeae8d6a67  bubblesort.diff
>> Index: libavcodec/lsp.c
>> ===================================================================
>> --- libavcodec/lsp.c	(revision 20569)
>> +++ libavcodec/lsp.c	(working copy)
>> @@ -173,3 +173,14 @@
>>          lpc2[-lp_half_order] = 0.5*(paf-qaf);
>>      }
>>  }
>> +
>> +void ff_bubblesort(float *lsp, int lp_order)
> 
> "float" should be in the function name 
> and data & len are better as they are more generic
> of course these changes could be done in a seperate patch
> 
> also it might be better to choose a function name that describes
> the task and not the implementation
> like:
> sort_nearly_sorted_floats()

Agreed, new version attached.

-Vitor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bubblesort2.diff
Type: text/x-patch
Size: 1894 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091122/c3eee648/attachment.bin>



More information about the ffmpeg-devel mailing list