forked from pedwo/libshveu
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
153 lines (113 loc) · 4.79 KB
/
README
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
libshvio
===========
libshvio: A library for controlling the SH-Mobile VIO/VEU.
Copyright (C) 2009 Renesas Technology Corp.
Copyright (C) 2010 Renesas Electronics Corporation
The [SH-Mobile][0] processor series includes a hardware video engine unit (VIO/VEU)
that supports colorspace conversion, rotation and scaling.
This source archive contains:
* src/libshvio: the libshvio shared library
* src/tools: commandline tools
libshvio API
------------
libshvio provides simple scale and rotate capability via the shvio_resize and
shvio_rotate blocking functions.
vio = shvio_open()
do {
shvio_resize(vio, ...);
} while (processing);
shvio_close(vio);
For more flexibility, such as operating on a selection of a larger frame the
shvio_setup function can be used along with shvio_start and shvio_wait.
vio = shvio_open()
do {
shvio_setup(vio, ...);
shvio_start(vio);
shvio_wait(vio);
} while (processing);
shvio_close(vio);
For low latency and reduced memory use, bundle mode is supported via the
shvio_start_bundle function. Using this mode requires that the input and output
buffer addresses are updated before the start of the next bundle.
vio = shvio_open()
do {
shvio_setup(vio, ...);
do {
shvio_set_src(vio, ...);
shvio_set_dst(vio, ...);
shvio_start_bundle(vio, ...);
end = shvio_wait(vio);
} while (!end);
} while (processing);
shvio_close(vio);
Please see doc/libshvio/html/index.html for API details.
shvio-convert
-------------
shvio-convert is a commandline program for converting raw image or video files.
It uses the SH-Mobile VIO to perform simultaneous colorspace conversion and
either rotation or scaling on each input frame.
Usage: shvio-convert [options] [input-filename [output-filename]]
Convert raw image data using the SH-Mobile VIO.
If no output filename is specified, data is output to stdout.
Specify '-' to force output to be written to stdout.
If no input filename is specified, data is read from stdin.
Specify '-' to force input to be read from stdin.
Input options
-c, --input-colorspace (RGB565, NV12, YCbCr420, YCbCr422)
Specify input colorspace
-s, --input-size Set the input image size (qcif, cif, qvga, vga, d1)
Output options
-o filename, --output filename
Specify output filename (default: stdout)
-C, --output-colorspace (RGB565, NV12, YCbCr420, YCbCr422)
Specify output colorspace
Transform options
Note that the VIO does not support combined rotation and scaling.
-S, --output-size Set the output image size (qcif, cif, qvga, vga, d1)
[default is same as input size, ie. no rescaling]
-r, --rotate Rotate the image 90 degrees clockwise
Miscellaneous options
-h, --help Display this help and exit
-v, --version Output version information and exit
File extensions are interpreted as follows unless otherwise specified:
.yuv YCbCr420
.rgb RGB565
shvio-display
-------------
shvio-display is a commandline program for displaying raw image or video files.
It uses the SH-Mobile VIO to perform simultaneous colorspace conversion and
scaling on each input frame. It allows the user to zoom in/out and pan the image.
Usage: shvio-display [options] [input-filename]
Processes raw image data using the SH-Mobile VIO and displays on screen.
If no input filename is specified, a simple image will be created.
Input options
-c, --input-colorspace (RGB565, NV12, YCbCr420, YCbCr422)
Specify input colorspace
-s, --input-size Set the input image size (qcif, cif, qvga, vga, d1, 720p)
Control keys
+/- Zoom in/out
Cursor keys Pan
= Reset zoom and panning
q Quit
Miscellaneous options
-h, --help Display this help and exit
-v, --version Output version information and exit
File extensions are interpreted as follows unless otherwise specified:
.yuv YCbCr420
.rgb RGB565
SH-Mobile
---------
The [SH-Mobile][0] processor series includes a hardware video engine unit that
supports colorspace conversion, rotation and scaling. Some models also include
support for camera capture, JPEG processing, and DSP instructions.
[0]: http://www.renesas.com/fmwk.jsp?cnt=sh_mobile_family_landing.jsp&fp=/products/mpumcu/sh_mobile/
Kernel configuration
--------------------
libshvio uses the Linux kernel UIO support for the SH-Mobile VIO/VEU, which was
added in 2.6.27.
The following kernel boot option reserves physically contiguous memory for VIO/VEU
use:
memchunk.veu0=4m
License
-------
See the file COPYING for details.