Electronic Components Datasheet Search
  English  ▼

X  

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

Back Button UM0851 Datasheet HTML 153Page - STMicroelectronics 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 Next Button
Zoom Inzoom in Zoom Outzoom out
 157 / 245 page
background image
UM0851
Accelerator engine device drivers
Doc ID 16604 Rev 2
157/245
u32 hdc;/ * hdc bit selects the Huffman table for the encoding of the DC
* coefficient in the data units belonging to the color component */
u32 hac; /* hac bit selects the Huffman table for the encoding of the AC
* coefficients in the data units belonging to the color component */
u32 qt;
/* QT indicates the quantization table to be used for the color component
*/
u32 nblock; /* nblock value is the number of data units (8 x 8 blocks of data) of
* the color component contained in the MCU */
u32 h;
/* Horizontal Sampling factor for component */
u32 v;
/* Vertical Sampling factor for component */
};
Use the following system call to set JPEG info for DWOH:
ioctl(wfd, JPEGIOC_SET_DEC_INFO, &dec_info);
wfd: file descriptor of jpeg write node.
JPEGIOC_SET_DEC_INFO: ioctl command for setting JPEG decoding information.
dec_info: structure containing jpeg decoding information.
Description of dec_info structure:
struct jpeg_dec_info {
struct jpeg_hdr hdr; /* jpeg image header */
int hdr_enable;
/* header processing enable/disable */
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 */
};
On success, zero is returned, otherwise on error, -1 is returned and errno is set
appropriately.
If this ioctl is not called before writing/reading data to/from JPEG, then DWH (decoding with
header processing) is performed by default.
Mapping memory for read and write
The JPEG driver needs to allocate buffers for storing the input and output data. To speed up
the encoding/decoding process, the driver uses the mmap() Linux system call. This system
call allocates physically contiguous memory for JPEG driver and returns the virtual address
of this memory to the user application. Now, user can then read and write to these virtual
addresses and the same data is reflected in the driver buffers. This saves unnecessary data
copy time between kernel and user level.
In order to further increase the performance of the encoding/decoding process, two buffers
are used both for read and write operations. By having two buffers for read and write, we are
actually parallelizing JPEG processing. By the time JPEG hardware reads/writes data
from/to read/write buffer software has written/read data to/from other buffer.
Use the following system call to map physical memory in virtual space:
void * mmap(void *start, size_t length, int prot , int flags, int fd, off_t offset);
fd: file descriptor of jpeg read/jpeg write node.
length: is total size of buffers (write or read) to allocate. Size should be multiple
of page size, i.e. 4096 bytes. Maximum size that can be allocated or mapped at once
is 4 MB, this makes size of each buffer (write or read) 2 MB. Single call to mmap for
jpegread/jpegwrite node will allocate "length" amount of memory and will return its
base address. Now user application should use this memory as two buffers of same
size.



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