summaryrefslogtreecommitdiffstats
path: root/abs/extra/projectx/IDCTFast.patch
diff options
context:
space:
mode:
Diffstat (limited to 'abs/extra/projectx/IDCTFast.patch')
-rw-r--r--abs/extra/projectx/IDCTFast.patch86
1 files changed, 86 insertions, 0 deletions
diff --git a/abs/extra/projectx/IDCTFast.patch b/abs/extra/projectx/IDCTFast.patch
new file mode 100644
index 0000000..70487bf
--- /dev/null
+++ b/abs/extra/projectx/IDCTFast.patch
@@ -0,0 +1,86 @@
+diff -ru Project-X_0.91.0//noguisources.lst Project-X_0.91.0.new/noguisources.lst
+--- Project-X_0.91.0//noguisources.lst 2011-03-27 15:48:48.000000000 +0200
++++ Project-X_0.91.0.new/noguisources.lst 2011-04-09 16:54:28.886676016 +0200
+@@ -67,6 +67,7 @@
+ src/net/sourceforge/dvb/projectx/video/IDCTRefNative.java
+ src/net/sourceforge/dvb/projectx/video/IDCTSseNative.java
+ src/net/sourceforge/dvb/projectx/video/MpvDecoder.java
++src/net/sourceforge/dvb/projectx/video/IDCTFast.java
+ src/net/sourceforge/dvb/projectx/video/Preview.java
+ src/net/sourceforge/dvb/projectx/video/PreviewObject.java
+ src/net/sourceforge/dvb/projectx/video/Video.java
+Binary files Project-X_0.91.0//ProjectX.jar and Project-X_0.91.0.new/ProjectX.jar differ
+diff -ru Project-X_0.91.0//sources.lst Project-X_0.91.0.new/sources.lst
+--- Project-X_0.91.0//sources.lst 2011-03-27 15:02:42.000000000 +0200
++++ Project-X_0.91.0.new/sources.lst 2011-04-09 16:54:12.916676017 +0200
+@@ -67,6 +67,7 @@
+ src/net/sourceforge/dvb/projectx/video/IDCTRefNative.java
+ src/net/sourceforge/dvb/projectx/video/IDCTSseNative.java
+ src/net/sourceforge/dvb/projectx/video/MpvDecoder.java
++src/net/sourceforge/dvb/projectx/video/IDCTFast.java
+ src/net/sourceforge/dvb/projectx/video/Preview.java
+ src/net/sourceforge/dvb/projectx/video/PreviewObject.java
+ src/net/sourceforge/dvb/projectx/video/Video.java
+diff -ru Project-X_0.91.0//src/net/sourceforge/dvb/projectx/video/MpvDecoder.java Project-X_0.91.0.new/src/net/sourceforge/dvb/projectx/video/MpvDecoder.java
+--- Project-X_0.91.0//src/net/sourceforge/dvb/projectx/video/MpvDecoder.java 2011-03-27 15:01:38.000000000 +0200
++++ Project-X_0.91.0.new/src/net/sourceforge/dvb/projectx/video/MpvDecoder.java 2011-04-09 16:51:16.936676017 +0200
+@@ -74,6 +74,7 @@
+
+ private IDCTRefNative idct;
+ private IDCTSseNative idctsse;
++ private IDCTFast idctfast;
+
+ private int preview_horizontal_size = 512;
+ private int preview_vertical_size = 288;
+@@ -133,14 +134,20 @@
+ public MpvDecoder()
+ {
+ Arrays.fill(pixels2, 0xFF505050);
++ idctfast = new IDCTFast();
+
+ idct = new IDCTRefNative();
+ idctsse = new IDCTSseNative();
++ if (IDCTFast.isLibraryLoaded())
++ idctfast.init();
++
+
+ if (IDCTRefNative.isLibraryLoaded())
+ idct.init();
+
+- if (IDCTRefNative.isLibraryLoaded() || IDCTSseNative.isLibraryLoaded())
++ if (IDCTFast.isLibraryLoaded()
++ || IDCTRefNative.isLibraryLoaded()
++ || IDCTSseNative.isLibraryLoaded())
+ acceleration = true;
+ }
+
+@@ -2394,7 +2401,21 @@
+ //form_predictions(bx, by, macroblock_type, motion_type, PMV, motion_vertical_field_select, dmvector);
+
+
+- if (IDCTSseNative.isLibraryLoaded() && isAccelerated())
++ if (IDCTFast.isLibraryLoaded() && isAccelerated())
++ {
++ /* copy or add block data into picture */
++ for (comp=0; comp<block_count; comp++)
++ {
++ /* ISO/IEC 13818-2 section Annex A: inverse DCT */
++ idctfast.referenceIDCT(block[comp]);
++
++ /* ISO/IEC 13818-2 section 7.6.8: Adding prediction and coefficient data */
++ Add_Block(comp, bx, by, dct_type, (macroblock_type[0] & MACROBLOCK_INTRA)==0);
++ }
++ }
++
++
++ else if (IDCTSseNative.isLibraryLoaded() && isAccelerated())
+ {
+ /* copy or add block data into picture */
+ for (comp=0; comp<block_count; comp++)
+@@ -3913,4 +3934,4 @@
+ ///
+
+
+-}
+\ No newline at end of file
++}