Electronic Components Datasheet Search
  English  ▼

X  

UM0851 Datasheet(PDF) 158 Page - STMicroelectronics

Part # UM0851
Description  SPEAr is a family of highly customizable ARM-based embedded
PDF  245 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

UM0851 Datasheet(HTML) 158 Page - STMicroelectronics

Back Button UM0851 Datasheet HTML 154Page - STMicroelectronics UM0851 Datasheet HTML 155Page - STMicroelectronics UM0851 Datasheet HTML 156Page - STMicroelectronics UM0851 Datasheet HTML 157Page - STMicroelectronics UM0851 Datasheet HTML 158Page - STMicroelectronics UM0851 Datasheet HTML 159Page - STMicroelectronics UM0851 Datasheet HTML 160Page - STMicroelectronics UM0851 Datasheet HTML 161Page - STMicroelectronics UM0851 Datasheet HTML 162Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 158 / 245 page
background image
Accelerator engine device drivers
UM0851
158/245
Doc ID 16604 Rev 2
On success, mmap returns a pointer to the mapped area. On error, the value MAP_FAILED
(that is, (void *) -1) is returned, and errno is set appropriately.
The mmap function asks to map length bytes starting at offset "offset" from the file specified
by the file descriptor "fd" into memory, preferably at address "start". This "start" address is a
hint only, and is usually specified as 0.
You can use following parameters to call this function for rfd and wfd.
mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, file_desc, 0)
After completion of one codec operation (encoding/decoding), if you need to encode/decode
again without closing nodes of jpegread/jpegwrite, then user is not required to allocate/map
this memory again. Still if user needs to map it again with a different size, then you must first
unmap any memory that has been already mapped.
Write source JPEG data
After mapping memory for the write buffer, you can write input data to write buffers (data
length less than equal to size of one write buffer). This can be done by writing or copying
data directly to the mapped virtual memory addresses of write buffers.
Start encoding or decoding
Once input data is written to write buffer, encoding/decoding can be started/resumed. Use
the following system call to start and resume JPEG encoding/decoding with new input data:
ioctl(wfd, JPEGIOC_START, size);
wfd: file descriptor of write node.
JPEGIOC_START: command to start/resume jpeg encoding/decoding
size: amount of data written on jpeg write node, <= memory mapped for each jpeg write
buffer.
This is a blocking system call which unblocks or returns only when encoding/decoding with
data supplied from current write buffer is started or an error has occurred. On success, zero
is returned otherwise, -1 is returned on error and errno is set appropriately. For example:
total size of input data is 15 K, size of each write buffer is 4 K, then you need to follow these
steps to pass data to JPEG:
1.
Set current write buffer to write_buffer0
2.
Write 4K data in current write buffer
3.
Call JPEGIOC_START ioctl with size equal to 4 K
4.
Toggle current write buffer to buffer1 if current buffer is buffer0, else to buffer0 if current
buffer is buffer1
5.
Follow steps 2, 3, 4 two more times with size 4 K and one time with size 3 K.
Get encoded/decoded data
Once encoding/decoding is started, then output data must be copied from read buffer. Use
the following system call used to get the output data:
ioctl(rfd, JPEGIOC_GET_OUT_DATA_SIZE, &size);
rfd: read node file descriptor.
JPEGIOC_GET_OUT_DATA_SIZE: command to get output data.



Html Pages

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  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com