[FFmpeg-devel] [PATCH] all: replace qsort with AV_QSORT

2015-10-18 Thread Ganesh Ajjanagadde
Commit e11e32686fdb21aded1ccf70202f1fffe87bb6a2 explains why replacing qsort with AV_QSORT yields performance improvements. This replaces all existing uses of libc's qsort with AV_QSORT. Benchmarks deemed unnecessary due to existing claims about AV_QSORT. Tested with FATE. Signed-off-by: Ganesh

Re: [FFmpeg-devel] [PATCH] all: replace qsort with AV_QSORT

2015-10-18 Thread Clément Bœsch
On Sun, Oct 18, 2015 at 10:47:52AM -0400, Ganesh Ajjanagadde wrote: [...] > diff --git a/libavformat/subtitles.c b/libavformat/subtitles.c > index bb89766..16ab245 100644 > --- a/libavformat/subtitles.c > +++ b/libavformat/subtitles.c > @@ -23,6 +23,7 @@ > #include "avio_internal.h" > #include

Re: [FFmpeg-devel] [PATCH] all: replace qsort with AV_QSORT

2015-10-18 Thread Ganesh Ajjanagadde
On Sun, Oct 18, 2015 at 10:57 AM, Hendrik Leppkes wrote: > On Sun, Oct 18, 2015 at 4:47 PM, Ganesh Ajjanagadde > wrote: >> Commit e11e32686fdb21aded1ccf70202f1fffe87bb6a2 explains why replacing >> qsort with AV_QSORT yields performance improvements.

Re: [FFmpeg-devel] [PATCH] all: replace qsort with AV_QSORT

2015-10-18 Thread Ganesh Ajjanagadde
On Sun, Oct 18, 2015 at 11:01 AM, wm4 wrote: > On Sun, 18 Oct 2015 10:47:52 -0400 > Ganesh Ajjanagadde wrote: > >> Commit e11e32686fdb21aded1ccf70202f1fffe87bb6a2 explains why replacing >> qsort with AV_QSORT yields performance improvements. >> >>

Re: [FFmpeg-devel] [PATCH] all: replace qsort with AV_QSORT

2015-10-18 Thread Ganesh Ajjanagadde
On Sun, Oct 18, 2015 at 11:03 AM, Clément Bœsch wrote: > On Sun, Oct 18, 2015 at 10:47:52AM -0400, Ganesh Ajjanagadde wrote: > [...] >> diff --git a/libavformat/subtitles.c b/libavformat/subtitles.c >> index bb89766..16ab245 100644 >> --- a/libavformat/subtitles.c >> +++

Re: [FFmpeg-devel] [PATCH] all: replace qsort with AV_QSORT

2015-10-18 Thread Ganesh Ajjanagadde
On Sun, Oct 18, 2015 at 11:17 AM, wm4 wrote: > On Sun, 18 Oct 2015 11:06:57 -0400 > Ganesh Ajjanagadde wrote: > >> On Sun, Oct 18, 2015 at 11:01 AM, wm4 wrote: >> > On Sun, 18 Oct 2015 10:47:52 -0400 >> > Ganesh Ajjanagadde

Re: [FFmpeg-devel] [PATCH] all: replace qsort with AV_QSORT

2015-10-18 Thread Ganesh Ajjanagadde
On Sun, Oct 18, 2015 at 11:25 AM, Ganesh Ajjanagadde wrote: > On Sun, Oct 18, 2015 at 11:17 AM, wm4 wrote: >> On Sun, 18 Oct 2015 11:06:57 -0400 >> Ganesh Ajjanagadde wrote: >> >>> On Sun, Oct 18, 2015 at 11:01 AM, wm4

Re: [FFmpeg-devel] [PATCH] all: replace qsort with AV_QSORT

2015-10-18 Thread Carl Eugen Hoyos
Ganesh Ajjanagadde mit.edu> writes: > >> +if (q->sort == SUB_SORT_TS_POS) { > >> +AV_QSORT(q->subs, q->nb_subs, AVPacket, cmp_pkt_sub_ts_pos); > >> +} > >> +else > >> +AV_QSORT(q->subs, q->nb_subs, AVPacket, cmp_pkt_sub_pos_ts); > >> + > > > > Weird style. > > There

Re: [FFmpeg-devel] [PATCH] all: replace qsort with AV_QSORT

2015-10-18 Thread Ganesh Ajjanagadde
On Sun, Oct 18, 2015 at 11:38 AM, Henrik Gramner wrote: > On Sun, Oct 18, 2015 at 4:47 PM, Ganesh Ajjanagadde > wrote: >> +++ b/tests/checkasm/checkasm.c > [...] >> #include "libavutil/common.h" >> #include "libavutil/cpu.h" >> #include

Re: [FFmpeg-devel] [PATCH] all: replace qsort with AV_QSORT

2015-10-18 Thread Hendrik Leppkes
On Sun, Oct 18, 2015 at 4:47 PM, Ganesh Ajjanagadde wrote: > Commit e11e32686fdb21aded1ccf70202f1fffe87bb6a2 explains why replacing > qsort with AV_QSORT yields performance improvements. > > This replaces all existing uses of libc's qsort with AV_QSORT. > > Benchmarks

Re: [FFmpeg-devel] [PATCH] all: replace qsort with AV_QSORT

2015-10-18 Thread Henrik Gramner
On Sun, Oct 18, 2015 at 4:47 PM, Ganesh Ajjanagadde wrote: > +++ b/tests/checkasm/checkasm.c [...] > #include "libavutil/common.h" > #include "libavutil/cpu.h" > #include "libavutil/random_seed.h" > +#include "libavutil/qsort.h" Alphabetical order.

Re: [FFmpeg-devel] [PATCH] all: replace qsort with AV_QSORT

2015-10-18 Thread Ganesh Ajjanagadde
On Sun, Oct 18, 2015 at 11:45 AM, Carl Eugen Hoyos wrote: > Ganesh Ajjanagadde mit.edu> writes: > >> >> +if (q->sort == SUB_SORT_TS_POS) { >> >> +AV_QSORT(q->subs, q->nb_subs, AVPacket, cmp_pkt_sub_ts_pos); >> >> +} >> >> +else >> >> +

Re: [FFmpeg-devel] [PATCH] all: replace qsort with AV_QSORT

2015-10-18 Thread wm4
On Sun, 18 Oct 2015 10:47:52 -0400 Ganesh Ajjanagadde wrote: > Commit e11e32686fdb21aded1ccf70202f1fffe87bb6a2 explains why replacing > qsort with AV_QSORT yields performance improvements. > > This replaces all existing uses of libc's qsort with AV_QSORT. > > Benchmarks

Re: [FFmpeg-devel] [PATCH] all: replace qsort with AV_QSORT

2015-10-18 Thread wm4
On Sun, 18 Oct 2015 11:06:57 -0400 Ganesh Ajjanagadde wrote: > On Sun, Oct 18, 2015 at 11:01 AM, wm4 wrote: > > On Sun, 18 Oct 2015 10:47:52 -0400 > > Ganesh Ajjanagadde wrote: > > > >> Commit

Re: [FFmpeg-devel] [PATCH] all: replace qsort with AV_QSORT

2015-10-18 Thread Clément Bœsch
On Sun, Oct 18, 2015 at 11:12:03AM -0400, Ganesh Ajjanagadde wrote: > On Sun, Oct 18, 2015 at 11:03 AM, Clément Bœsch wrote: > > On Sun, Oct 18, 2015 at 10:47:52AM -0400, Ganesh Ajjanagadde wrote: > > [...] > >> diff --git a/libavformat/subtitles.c b/libavformat/subtitles.c > >>

Re: [FFmpeg-devel] [PATCH] all: replace qsort with AV_QSORT

2015-10-18 Thread Ganesh Ajjanagadde
On Sun, Oct 18, 2015 at 1:16 PM, Clément Bœsch wrote: > On Sun, Oct 18, 2015 at 11:12:03AM -0400, Ganesh Ajjanagadde wrote: >> On Sun, Oct 18, 2015 at 11:03 AM, Clément Bœsch wrote: >> > On Sun, Oct 18, 2015 at 10:47:52AM -0400, Ganesh Ajjanagadde wrote: >> > [...] >>