File: README.ps2

package info (click to toggle)
effectv 0.3.11-1
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 748 kB
  • ctags: 1,316
  • sloc: ansic: 12,575; makefile: 216; perl: 38
file content (136 lines) | stat: -rw-r--r-- 4,262 bytes parent folder | download | duplicates (3)
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
This document describes how to use EffecTV on PlayStation2 Linux (PS2 Linux)
environment.

Before Install
==============
Video capture devices supported by PS2 Linux are only USB devices. In addition,
the default kernel of PS2 Linux is very old, version 2.2.1, so a few USB
cameras are supported. I tested ov511 based USB camera (WebCamPlus), and it
works but is little buggy.

Install
=======
Requirements
------------
SDL(1.2.1 or later) is required to install EffecTV package. RPM package of SDL
for PS2 can be found at:

http://www.libsdl.org/download-1.2.php

ov511 device driver
-------------------
Before compiling external device drivers, you must install the kernel source to
your PS2. The RPM package of kernel source is included in PS2 Linux DVD.

If you want to use ov511 based USB camera, you need to download a new driver
from:

http://alpha.dyndns.org/ov511/download.html

Download version 1.65 or later, then extract it and apply a patch attached to
the end of this document. You can apply the patch by following command.

$ patch -p1 < README.ps2

Then make a module. Please note that CONFIG_VIDEO_DEV must be enabled. You need
make decompression module(ov511_decomp.o) if you want compression support.
Please read README file of ov511 driver.

If you have another USB devices and does not work on PS2 Linux even if it is
supported by 2.2.1, you may want to try the latest driver. It may not work
on PS2 Linux without some modification. I hope my ov511 patch will help you.

EffecTV
-------
If you have installed the RPM package of EffecTV, you need not to read this
section.

Edit line 15 to 17 of 'config.mk' and set "ARCH = ps2-linux" like following.

# ARCH = i686-linux
## Linux for PlayStation2
ARCH = ps2-linux

Then make it. Note that you need to install devel package of SDL to compile
EffecTV. 

Launch
======
Using YUV based system for input images is very good for the performance.
For example, when you use ov511 based USB camera, use yuv420p format.
To change the format, use "-palette" option like following.

$ effectv -palette yuv420p

TODO
====
It will be nice when the codes are optimized with Multimedia Extension ops of
EmotionEngine.

Patch
=====
----------from here----------
diff -ru ov511-1.65.orig/Makefile ov511-1.65/Makefile
--- ov511-1.65.orig/Makefile	2003-02-25 17:03:29.000000000 +0900
+++ ov511-1.65/Makefile	2003-12-31 02:45:47.000000000 +0900
@@ -1,9 +1,10 @@
 #################################### OPTIONS ##################################
 # Change this to /usr/include if you get header file errors
-INCLUDEDIR = /lib/modules/`uname -r`/build/include
+INCLUDEDIR = /usr/src/linux/include
 
 CFLAGS = -D__KERNEL__ -DMODULE -DOUTSIDE_KERNEL -O2 -Wall -Wstrict-prototypes \
-	-fomit-frame-pointer -I$(INCLUDEDIR)
+	-fomit-frame-pointer -I$(INCLUDEDIR) -G 0 -mno-abicalls -fno-pic \
+	-mcpu=r5900 -mips1 -pipe -mlong-calls -DEXPORT_SYMTAB
 
 CC = gcc
 
diff -ru ov511-1.65.orig/ov511.c ov511-1.65/ov511.c
--- ov511-1.65.orig/ov511.c	2003-03-09 18:48:20.000000000 +0900
+++ ov511-1.65/ov511.c	2003-12-31 02:46:06.000000000 +0900
@@ -142,6 +142,20 @@
 
 #define FATAL_ERROR(rc) ((rc) < 0 && (rc) != -EPERM)
 
+	
+#define wait_event_interruptible(wq, condition)				\
+({									\
+	int __ret = 0;							\
+	do {								\
+		init_waitqueue_head(&wq);				\
+		if (signal_pending(current)) {				\
+			__ret = -EINTR;					\
+			break;						\
+		}							\
+	} while (!(condition));						\
+	__ret;								\
+})
+
 /**********************************************************************
  * Module Parameters
  * (See ov511.txt for detailed descriptions of these)
@@ -471,6 +485,11 @@
 }
 
 #else	/* if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 4, 18) */
+ 
+static inline void * vmalloc_32(unsigned long size)
+{
+	return vmalloc(size);
+}
 
 /* Given PGD from the address space's page table, return the kernel
  * virtual mapping of the physical memory mapped at ADR.
diff -ru ov511-1.65.orig/ov511.h ov511-1.65/ov511.h
--- ov511-1.65.orig/ov511.h	2003-03-06 17:14:00.000000000 +0900
+++ ov511-1.65/ov511.h	2003-12-31 02:46:06.000000000 +0900
@@ -6,6 +6,8 @@
 #include <linux/smp_lock.h>
 #include <linux/usb.h>
 
+#define VID_HARDWARE_OV511 27
+
 #define OV511_DEBUG	/* Turn on debug messages */
 
 #ifdef OV511_DEBUG