[FFmpeg-devel] [PATCH] Make bubblesort() a common function
Mon Nov 23 20:54:56 CET 2009
On Mon, Nov 23, 2009 at 10:14:18AM +0000, M?ns Rullg?rd wrote:
> 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.
only as long as there are no NANs in there, which i would assume but
havnt checked i its impossible for NANs to end in there
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel