Electronic Components Datasheet Search
  English  ▼

X  

UM0851 Datasheet(PDF) 160 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) 160 Page - STMicroelectronics

Back Button 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 UM0851 Datasheet HTML 163Page - STMicroelectronics UM0851 Datasheet HTML 164Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 160 / 245 page
background image
Accelerator engine device drivers
UM0851
160/245
Doc ID 16604 Rev 2
munmap(adrs, size);
adrs: is address of mapped memory
size: is size of mapped memory
On success zero is returned otherwise, -1 is returned on error and errno is set appropriately.
Close
After unmapping memory, you must close JPEG nodes. Use the following system call to do
this:
close(fd);
Close returns zero on success, or -1 if error occurred, errno is set appropriately. This
function must be called both for read and write nodes.
JPEG codec usage
JPEG read and write are not synchronized enough, for example, one chunk of input data
may produce output data varying in size. Due to this, you need to write and read
simultaneously to JPEG driver, otherwise JPEG codec may be wasting time sitting idle. It is
recommended to use two processes or threads to read and write data simultaneously from
the JPEG driver. This will increase speed of JPEG processing. The following example is for
encoding/decoding a JPEG image. Here input data is read by application from a file and is
passed to JPEG driver. After that, it is processed by JPEG codec based no processing type
(encoding/decoding), and output data is read by application again.
#include <sys/mman.h>
#include "include/linux/spr_jpeg_syn_usr.h"
struct jpeg_info jpeg_info;
volatile unsigned char *wbuf[2] = {NULL, NULL}, *rbuf[2] = {NULL, NULL};
unsigned int wsize = 4*4096, rsize = 4*4096;
unsigned int ssize = XXX;/* set size of input data here */
int rfd, wfd, cur_rbuf = 1, cur_wbuf = 1;
pid_t pid;
void jpegread()
{
int size = 0, status;
/* while encoding/decoding is not over */
do
{
shuffle_buf(cur_rbuf);
if((status = ioctl(rfd, JPEGIOC_GET_OUT_DATA_SIZE, &size)) != 0)
return -1;
/* Add code here for manipulating decoded data present in rbuf[cur_rbuf] */
}while(size == rsize);
/* get jpeg info after encoding/decoding is over */
ioctl(rfd, JPEGIOC_GET_INFO, &jpeg_info);
/* unmap buf */
munmap((char *)rbuf[0], 2*rsize);
close(rfd);
}
void jpegwrite()



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