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

Michael Niedermayer michaelni
Sun Nov 22 22:28:17 CET 2009


On Sun, Nov 22, 2009 at 09:17:28PM +0100, Vitor Sessak wrote:
> 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

>  lsp.c    |    9 +++++++++
>  lsp.h    |    7 +++++++
>  twinvq.c |   13 +------------
>  3 files changed, 17 insertions(+), 12 deletions(-)
> c04080c721cb706cf640d6092c08957a3f1d4d4f  bubblesort2.diff

ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091122/aecbf968/attachment.pgp>



More information about the ffmpeg-devel mailing list