[FFmpeg-devel] [PATCH] Make bubblesort() a common function
Måns Rullgård
mans
Mon Nov 23 11:14:18 CET 2009
Benjamin Larsson <banan at ludd.ltu.se> writes:
> M?ns Rullg?rd wrote:
>> Vitor Sessak <vitor1001 at gmail.com> writes:
>>
>>
>>> $subj, useful for SIPR, maybe also for WMAVoice.
>>>
>>> -Vitor
>>> 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)
>>>
>>
>> Whats wrong with qsort? It's even standard C.
>>
>
> There are other issues also, qsort sorts different on different platforms.
Only when certain non-equal items compare as equal, in which case it's
not guaranteed to be stable. That's not an issue in this case.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list