summaryrefslogtreecommitdiffstats
path: root/abs/extra/projectx/IDCTFast.patch
blob: 70487bf1ccb34f3fcf9ba13178c5ad20a29ff550 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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
+}