[FFmpeg-devel] [PATCH] avcodec/huffman: replace qsort with AV_QSORT

Ganesh Ajjanagadde gajjanag at mit.edu
Sun Oct 25 15:22:04 CET 2015


On Sun, Oct 25, 2015 at 8:12 AM, Michael Niedermayer
<michael at niedermayer.cc> wrote:
> On Sat, Oct 24, 2015 at 09:05:21AM -0400, Ganesh Ajjanagadde wrote:
>> On Thu, Oct 22, 2015 at 10:25 PM, Ganesh Ajjanagadde
>> <gajjanagadde at gmail.com> wrote:
>> >
>> > On Thu, Oct 22, 2015 at 9:28 PM, Timothy Gu <timothygu99 at gmail.com> wrote:
>> > > On Thu, Oct 22, 2015 at 5:01 PM Ganesh Ajjanagadde <gajjanagadde at gmail.com>
>> > > wrote:
>> > >>
>> > >> Sample benchmark (x86-64, Haswell, GNU/Linux), fraps-v2 from FATE:
>> > >> new:
>> > >> 280110 decicycles in qsort,       1 runs,      0 skips
>> > >> 268260 decicycles in qsort,       2 runs,      0 skips
>> > >>
>> > >> old:
>> > >> 1469910 decicycles in qsort,       1 runs,      0 skips
>> > >>  952950 decicycles in qsort,       2 runs,      0 skips
>> > >
>> > >
>> > > Usually it takes more than 2 runs to make sure something is faster than the
>> > > other (try -stream_loop 10000 on the input).
>> >
>> > In this case the gain should be obvious due to inlining. Nevertheless,
>> > here are new numbers. I chose vp6 for two reasons:
>> > 1. Above was for fraps-v2, giving vp6 for more "completeness".
>> > 2. stream_loop throws errors: Error while decoding stream #0:0:
>> > Invalid data found when processing input for fraps-v2.
>> >
>> > Here they are:
>> > vp6 (old):
>> >   78930 decicycles in qsort,       1 runs,      0 skips
>> >   45330 decicycles in qsort,       2 runs,      0 skips
>> >   27825 decicycles in qsort,       4 runs,      0 skips
>> >   17471 decicycles in qsort,       8 runs,      0 skips
>> >   12296 decicycles in qsort,      16 runs,      0 skips
>> >    9554 decicycles in qsort,      32 runs,      0 skips
>> >    8404 decicycles in qsort,      64 runs,      0 skips
>> >    7405 decicycles in qsort,     128 runs,      0 skips
>> >    6740 decicycles in qsort,     256 runs,      0 skips
>> >    7540 decicycles in qsort,     512 runs,      0 skips
>> >    9498 decicycles in qsort,    1024 runs,      0 skips
>> >    9938 decicycles in qsort,    2048 runs,      0 skips
>> >    8043 decicycles in qsort,    4095 runs,      1 skips
>> >
>> > vp6 (new):
>> >   15880 decicycles in qsort,       1 runs,      0 skips
>> >   10730 decicycles in qsort,       2 runs,      0 skips
>> >   10155 decicycles in qsort,       4 runs,      0 skips
>> >    7805 decicycles in qsort,       8 runs,      0 skips
>> >    6883 decicycles in qsort,      16 runs,      0 skips
>> >    6305 decicycles in qsort,      32 runs,      0 skips
>> >    5854 decicycles in qsort,      64 runs,      0 skips
>> >    5152 decicycles in qsort,     128 runs,      0 skips
>> >    4452 decicycles in qsort,     256 runs,      0 skips
>> >    4161 decicycles in qsort,     511 runs,      1 skips
>> >    4081 decicycles in qsort,    1023 runs,      1 skips
>> >    4072 decicycles in qsort,    2047 runs,      1 skips
>> >    4004 decicycles in qsort,    4095 runs,      1 skips
>>
>> ping
>
> LGTM
>
> thanks

pushed, thanks

>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> While the State exists there can be no freedom; when there is freedom there
> will be no State. -- Vladimir Lenin
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list