#include <asm/elphel/ext353.h>
#include <linux/poll.h>
Include dependency graph for cxdma353.h:
Go to the source code of this file.
Defines | |
#define | QTABLES_FPGA 0x01 |
#define | QTABLES_EXIF 0x02 |
#define | QTABLES_TABLE 0x04 |
#define | JPEG_HEADER_SIZE 0x26f |
Functions | |
void | x313_dma_start (void) |
int | x313_dma_stop (void) |
void | x313_dma_reset_chain (void) |
unsigned long | x313_dma_init (void) |
int | x313_JPEG_cmd (int cmd) |
int | x313_get_JPEG_ctrl (void) |
int | x313_JPEG_ctrl (int cmd) |
void | setJPEGHeader (int quality, int width, int height) |
int | cmoscam_open_dma (struct inode *inode, struct file *filp) |
loff_t | x313_dma_lseek (struct file *file, loff_t offset, int orig) |
ssize_t | x313_dma_read (struct file *file, char *buf, size_t count, loff_t *off) |
int | x313_mmap_dma (struct file *filp, struct vm_area_struct *vma) |
ssize_t | x313_dma_write (struct file *file, const char *buf, size_t count, loff_t *off) |
void | x313_dma_update_jpeg_header (void) |
void | jpeg_set_quality (int quality, int target, void *table) |
void | ext_fill_jpeg_mmap_desc (struct ext_jpeg_mmap_desc_t *mdesc) |
void | ext_fill_jpeg_mmap_desc_ (struct _ext_jpeg_mmap_desc_t *mdesc) |
Variables | |
unsigned char * | jpeg_header_sbuffer_ptr |
#define JPEG_HEADER_SIZE 0x26f |
Definition at line 36 of file cxdma353.h.
#define QTABLES_EXIF 0x02 |
Definition at line 27 of file cxdma353.h.
#define QTABLES_FPGA 0x01 |
Definition at line 26 of file cxdma353.h.
#define QTABLES_TABLE 0x04 |
Definition at line 28 of file cxdma353.h.
int cmoscam_open_dma | ( | struct inode * | inode, | |
struct file * | filp | |||
) |
Definition at line 816 of file cxdma.c.
References exif_header_length(), EXIF_OFFSET, JPEG_HEADER_SIZE, TRAILER_SIZE, and x313_DMA_size().
void ext_fill_jpeg_mmap_desc | ( | struct ext_jpeg_mmap_desc_t * | mdesc | ) |
Definition at line 909 of file cxdma.c.
References CCAM_DMA_SIZE, ext_jpeg_mmap_desc_t::exif_length, ext_make_jpeg_header(), ext_jpeg_mmap_desc_t::jpeg_addr, ext_jpeg_mmap_desc_t::jpeg_length, ext_jpeg_mmap_desc_t::mmap_exif_length, ext_jpeg_mmap_desc_t::mmap_jpeg_length, ext_jpeg_mmap_desc_t::mmap_start, X313_BUFFADD, and x313_DMA_size().
void ext_fill_jpeg_mmap_desc_ | ( | struct _ext_jpeg_mmap_desc_t * | mdesc | ) |
Definition at line 924 of file cxdma.c.
References ccam_dma_buf_ptr, CCAM_DMA_SIZE, _ext_jpeg_mmap_desc_t::exif_length, _ext_jpeg_mmap_desc_t::exif_start, _ext_jpeg_mmap_desc_t::jpeg_length, and _ext_jpeg_mmap_desc_t::jpeg_start.
==================================================== ! JPEG HEADER is recalculated together with the FPGA tables ! and due to limitations of the FPGA implementation (no divide) ! header table may slightly deviate from canonical one. ! JPEG quality is stored in the circular buffer, but not JPEG ! header table, so when Q changes, JPEG frame header may be ! out of sync. Possible solutions: ! 1 - always flush circular buffer whan Q is changed or ! 2 - rebuild JPEG header (if different) simulating FPGA ! writes. !====================================================
TODO: Temporary disabling IRQs here - later move FPGA table setup to IRQ-safe function
NOTE
NOTE
NOTE
Definition at line 1263 of file cxdma.c.
References DCTSIZE2, HEADER_CQTABLE, HEADER_YQTABLE, local_irq_restore, local_irq_save, MD13, port_csp0_addr, printk, QTABLES_EXIF, QTABLES_FPGA, QTABLES_TABLE, X313_WA_COMP_TA, and X313_WA_COMP_TD.
this function to be called when JPEG header is needed to be sent to user. FPGA is not modified here
Definition at line 1209 of file cxdma.c.
References HEADER_HEIGHT, HEADER_WIDTH, jpeg_set_quality(), MD9, printk, and QTABLES_EXIF.
unsigned long x313_dma_init | ( | void | ) |
Definition at line 656 of file cxdma.c.
References ccam_dma_buf_ptr, D0, MD7, printk, udelay, x313_dma_reset_jpeg(), and x313_setDMABuffer().
loff_t x313_dma_lseek | ( | struct file * | file, | |
loff_t | offset, | |||
int | orig | |||
) |
Definition at line 833 of file cxdma.c.
References exif_header_length(), EXIF_OFFSET, JPEG_HEADER_SIZE, printk, TRAILER_SIZE, and x313_DMA_size().
ssize_t x313_dma_read | ( | struct file * | file, | |
char * | buf, | |||
size_t | count, | |||
loff_t * | off | |||
) |
Definition at line 1087 of file cxdma.c.
References CCAM_DMA_SIZE, JPEG_HEADER_SIZE, MD9, printk, TRAILER_SIZE, X313_BUFFADD, and x313_DMA_size().
void x313_dma_reset_chain | ( | void | ) |
void x313_dma_start | ( | void | ) |
Definition at line 617 of file cxdma.c.
References ccam_dma_buf_ptr, CCAM_DMA_SIZE, DMA_CHUNK, EXT_DMA_0_START, MD12, port_csp0_addr, printk, and X313_WA_DMACR.
int x313_dma_stop | ( | void | ) |
Definition at line 607 of file cxdma.c.
References EXT_DMA_0_STOP, MD12, port_csp0_addr, printk, udelay, and X313_WA_DMACR.
void x313_dma_update_jpeg_header | ( | void | ) |
ssize_t x313_dma_write | ( | struct file * | file, | |
const char * | buf, | |||
size_t | count, | |||
loff_t * | off | |||
) |
Definition at line 351 of file cxdma.c.
References camSeqGetJPEG_rp(), camSeqGetJPEG_wp(), camSeqStartClip(), camSeqStop(), JPEG_CMD_ACQUIRE, JPEG_CMD_CATCHUP, JPEG_CMD_DUMP, JPEG_CMD_FORGET, JPEG_CMD_FRAMES, JPEG_CMD_GET, JPEG_CMD_JUST_STOP, JPEG_CMD_RESET, JPEG_CMD_RESET0, JPEG_CMD_RESTORE_RP, JPEG_CMD_SAVE_RP, JPEG_CMD_START, JPEG_CMD_STOP, MD11, MD5, MD6, MD8, printk, prof_msg(), x313_dma_catchup_jpeg(), x313_dma_forget_jpeg(), x313_dma_reset_jpeg(), x313_dma_restore_jpeg(), x313_dma_save_jpeg(), X313_dma_update(), x313_dma_update_jpeg_header(), x313_JPEG_dump(), and x313_setDMABuffer().
int x313_mmap_dma | ( | struct file * | filp, | |
struct vm_area_struct * | vma | |||
) |
unsigned char* jpeg_header_sbuffer_ptr |