All the files we need to provide a C based implementation
of the IDCT in Linux. This is only the beginning...
The C code is a shameless backport of the Java
implementation and provides a x2 improvement
I have worked on extending the IDCT JNI Implementation
to other systems where GCC works.
Linux and Windows (with MSYS and MinGW) have been tested
and work. No big differences in Windows between the DLLs
produced here and the DLLs included in the ProjectX
Sources
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
why not just use liboil? I made an implementation which uses liboil for IDCT and it works great. This way we don't have to handle all that different architectures...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Great, no problem, contribute it :-) I've never worked with it and would like to see which solution is more convenient development- and distributionwise.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Baseline:
LIBOIL will surely be an option in the future, once it is really
well optimised for the different architectures. At this point in
time, a recompile is needed in order to adapt to the architecture.
I'd rather stay with my implementation until liboil improves. We
are speaking about an order of magnitude difference in speed.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, the difference between MMX and SSE was so small, that I decided to use the mmx routines.
You can always go to the MJPEG tools and take the SSE implementation from there. The figures come from a private project I started to benchmark possible IDCT implementations in Java and C I would find on the Internet.
About including liboil, my only concern is that in includes an external dependency, whereas my pack is autharic.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
All the files needed for the faster IDCT in Linux
Logged In: YES
user_id=1117382
I have worked on extending the IDCT JNI Implementation
to other systems where GCC works.
Linux and Windows (with MSYS and MinGW) have been tested
and work. No big differences in Windows between the DLLs
produced here and the DLLs included in the ProjectX
Sources
Portable JNI Implementation of the IDCT
Logged In: YES
user_id=768534
Originator: NO
Great work - the Linux IDCT code works fine here (Kubuntu Edgy) - these files should definitely be added to the ProjectX code!
Logged In: NO
why not just use liboil? I made an implementation which uses liboil for IDCT and it works great. This way we don't have to handle all that different architectures...
Logged In: YES
user_id=1117382
Originator: YES
Great, no problem, contribute it :-) I've never worked with it and would like to see which solution is more convenient development- and distributionwise.
Logged In: YES
user_id=1467079
Originator: NO
I made a patch against your ProjectX_Source_0.90.4-portable.zip.
I have to look how to attach it here.
to compile it, you need an already installed liboil-0.3.x
grab it here if it is not already included in your distri:
http://www.schleef.org/liboil/
btw: you forgot to use -fPIC for the lib! Without PIC, it will not work on 64-Bit archs! My patch also fix this.
Logged In: YES
user_id=1467079
Originator: NO
ok, it seems that I can't attach a file...
So please grab it here:
http://sbriesen.de/idct-liboil.diff
as mentioned before, it's a patch against ProjectX_Source_0.90.4-portable.zip
have fun!
Logged In: YES
user_id=1117382
Originator: YES
> btw: you forgot to use -fPIC for the lib! Without PIC, it will not work on
> 64-Bit archs! My patch also fix this.
Thanks !!!
Logged In: YES
user_id=1117382
Originator: YES
I have done some tests and benchmarks for the different JNI-IDCT implementations.
Here the results:
Implementation Java reference ... (+) ... 2219 miliseconds (x 1,00)
Implementation Java ffmpeg ... (+) ... 255 miliseconds (x 8,70)
Implementation C reference ... (+) ... 686 miliseconds (x 3,23)
Implementation C ffmpeg ... (+) ... 166 miliseconds (x 13,37)
Implementation C mjpeg ... (-) ... 125 miliseconds (x 17,75)
Implementation C mjpeg-mmx ... (+) ... 73 miliseconds (x 30,40)
Implementation C mjpeg-sse ... (+) ... 76 miliseconds (x 29,20)
Implementation C idct-liboil ... (+) ... 458 miliseconds (x 4,84)
apt-show-versions | grep liboil
liboil0.3-dev/testing uptodate 0.3.10-1.1
liboil0.3/testing uptodate 0.3.10-1.1
uname -a
Linux paag 2.6.18-4-686 #1 SMP Wed Feb 21 16:06:54 UTC 2007 i686 GNU/Linux
cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : Intel(R) Pentium(R) M processor 1.60GHz
stepping : 6
cpu MHz : 1598.679
cache size : 2048 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr mce cx8 sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe up est tm2
bogomips : 3199.47
After rebuilding locally:
sudo apt-get build-dep liboil
sudo apt-get source -b liboil
sudo dpkg -i ../liboil*deb
Implementation Java reference ... (+) ... 2160 miliseconds (x 1,00)
Implementation Java ffmpeg ... (+) ... 249 miliseconds (x 8,67)
Implementation C reference ... (+) ... 668 miliseconds (x 3,23)
Implementation C ffmpeg ... (+) ... 162 miliseconds (x 13,33)
Implementation C mjpeg ... (-) ... 123 miliseconds (x 17,56)
Implementation C mjpeg-mmx ... (+) ... 72 miliseconds (x 30,00)
Implementation C mjpeg-sse ... (+) ... 73 miliseconds (x 29,59)
Implementation C idct-liboil ... (+) ... 449 miliseconds (x 4,81)
Baseline:
LIBOIL will surely be an option in the future, once it is really
well optimised for the different architectures. At this point in
time, a recompile is needed in order to adapt to the architecture.
I'd rather stay with my implementation until liboil improves. We
are speaking about an order of magnitude difference in speed.
Logged In: NO
yep. but please add idct-liboil as an option. So it's right there, when it's ready. ;-)
the default can stay idct-mjpeg for now...
Logged In: NO
btw: where is idct-mjpeg-sse? It was not included in your ZIP...
Logged In: YES
user_id=1117382
Originator: YES
OK, the difference between MMX and SSE was so small, that I decided to use the mmx routines.
You can always go to the MJPEG tools and take the SSE implementation from there. The figures come from a private project I started to benchmark possible IDCT implementations in Java and C I would find on the Internet.
About including liboil, my only concern is that in includes an external dependency, whereas my pack is autharic.
New version. Just GCC dependent JNI
OK, let's see if we can sort this out. Attached is a patv
File Added: pjxgcc.tar.bz2