Electronic Components Datasheet Search
  English  ▼

X  

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

Back Button 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 UM0851 Datasheet HTML 163Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 159 / 245 page
background image
UM0851
Accelerator engine device drivers
Doc ID 16604 Rev 2
159/245
size: variable which will store size of output data in bytes. This must always be
equal to size of individual read buffer. If it is less than size of individual read
buffer, end of encoding/decoding is indicated.
This is a blocking system call which unblocks or returns only when the output data size less
than equal to the size of the individual read buffer is written to current read buffer after
encoding/decoding. On success, zero is returned otherwise, -1 is returned on error and
errno is set appropriately. For example: total size of output data is 15 K, size of each write
buffer is 4 K, then user needs to do following steps to read data from JPEG:
1.
Set current read buffer to read_buffer0
2.
Call JPEGIOC_GET_OUT_DATA_SIZE ioctl
3.
Check value of parameter size, if it is less than 4 K end of encoding/decoding is
indicated
4.
Read data from current read buffer
5.
Toggle current read buffer to buffer1 if current buffer is buffer0, else to buffer0 if current
buffer is buffer1
6.
Follow steps 2, 3, 4, 5 till the time step 3 doesn't indicate end of encoding/decoding.
Writing input data to write buffer and reading output data from read buffer have to be done
simultaneously. It is recommended to use different threads/processes for reading and
writing. This will speed up encoding/decoding process.
Get JPEG information
Once encoding/decoding is finished user can read JPEG information (JPEG header
information and compression tables). Use the following system call to get JPEG information:
ioctl(rfd, JPEGIOC_GET_INFO, &jpeg_info);
rfd: read node file descriptor.
JPEGIOC_GET_INFO: command to get jpeg information.
jepg_info: instance of struct jpeg_info. After successful completion of this system
call, it will contain information of JPEG header and compression tables.
On success, zero is returned otherwise, -1 is returned on error and errno is set
appropriately.
struct jpeg_hdr_info is defined below:
struct jpeg_info {
struct jpeg_hdr hdr;/* jpeg image header */
char qnt_mem[QNT_MEM_SIZE]; /* quantization memory */
char hmin_mem[HMIN_MEM_SIZE]; /* Huff min memory */
char hbase_mem[HBASE_MEM_SIZE]; /* Huff base memory */
char hsymb_mem[HSYMB_MEM_SIZE]; /* Huff symb memory */
char dht_mem[DHT_MEM_SIZE]; /* DHT memory */
char henc_mem[HENC_MEM_SIZE]; /* Huff enc memory */
};
struct jpeg_hdr is already defined earlier in section "Set JPEG Info".
This ioctl is mainly useful for DWH (decoding with header processing enabled).
Munmap
Once the application is finished with JPEG processing, it should unmap the memory that
has been mapped for read and write buffers. Use the following system call to unmap
memory:



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