English
Language : 

UM0851 Datasheet, PDF (154/245 Pages) STMicroelectronics – SPEAr is a family of highly customizable ARM-based embedded
Accelerator engine device drivers
Figure 41. JPEG driver framework
UM0851
User
spac e
Ke rnel
spa ce
DMAC
driver
User application
Linux Char device framework
JPEG controller driver
Har dw are
DMA controller
JPEG controller
JPEG Codec
The JPEG driver exposes two device nodes to the user application, jpegread and jpegwrite.
You can write input data to the jpegwrite node and get output data from the jpegread node.
You can write/read data to/from jpeg chunk by chunk. This means that you do not need very
big buffers for input and output data. You can take buffers of small size and write/read data
to/from JPEG again and again. The following sections describe usage of JPEG driver in
detail. Note that the sections are in the sequence in which JPEG driver is required to be
programmed.
Using the JPEG codec in Linux
To access the JPEG driver-specific data types in user applications, include
<linux/spr_jpeg_syn_usr.h>. The JPEG device is allocated major number dynamically. To
obtain the major number of the JPEG device, run the following command after board boot-
up:
cat /proc/devices
Character devices:
1 mem
2 pty
3 ttyp
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
5 /dev/ptmx
7 vcs
9 st
10 misc
13 input
154/245
Doc ID 16604 Rev 2