Commit Graph

7 Commits

Author SHA1 Message Date
Timothy Gu 44304ae322 all: Add missing header guards 2016-01-28 19:49:48 -08:00
Ganesh Ajjanagadde 8ed79c45b4 avutil/qsort: use the do while form for AV_QSORT, AV_MSORT
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-23 08:41:16 -04:00
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