Commit Graph

5 Commits

Author SHA1 Message Date
Michael Niedermayer 0567715a6b qsort: flip compare direction to match libc qsort()
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-22 22:48:00 +02:00
Michael Niedermayer f87dacb27d libavutil: add a merge sort.
compared to qsort this is slower but its stable and doesnt have a O(n^2) worst
case

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-18 18:40:02 +02:00
Michael Niedermayer 096db654af qsort doxy
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-18 18:39:35 +02:00
Michael Niedermayer 88f87ebaa3 qsort: add some forgotten ()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-18 18:39:17 +02:00
Michael Niedermayer 3a0a2f33a6 libavutil: add AV_QSORT()
about 2-5 times faster than gnu libcs qsort()
And should be 100% binary identical across platforms.

I will bump the version once the API is certainly stable and
everyone is happy with the API.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-18 16:32:31 +02:00