HPM SDK
HPMicro Software Development Kit
hpm_jpeg_drv.h File Reference
#include "hpm_common.h"
#include "hpm_jpeg_regs.h"

Go to the source code of this file.

Data Structures

struct  jpeg_sampling_t
 data format definition More...
 
struct  jpeg_pixel_t
 
struct  jpeg_job_config_t
 jpeg encoding and decoding configuration parameters More...
 

Macros

#define JPEG_EVENT_BUSY   JPEG_STAT_BUSY_MASK
 Define events of the jpeg module. More...
 
#define JPEG_EVENT_OUT_DMA_FINISH   JPEG_STAT_OUT_DMA_TRANSFER_DONE_MASK
 
#define JPEG_EVENT_IN_DMA_FINISH   JPEG_STAT_IN_DMA_TRANSFER_DONE_MASK
 
#define JPEG_EVENT_ERROR   (JPEG_STAT_RESTART_MARKER_ERROR_MASK | (0xF << 7))
 
#define JPEG_BYTE_ORDER_3210   (0U)
 byte order in a word More...
 
#define JPEG_BYTE_ORDER_2301   (1U)
 
#define JPEG_BYTE_ORDER_1032   (2U)
 
#define JPEG_BYTE_ORDER_0123   (3U)
 
#define JPEG_SUPPORTED_FORMAT_420   (0U)
 jpeg pixel conversion format More...
 
#define JPEG_SUPPORTED_FORMAT_422H   (1U)
 
#define JPEG_SUPPORTED_FORMAT_422V   (2U)
 
#define JPEG_SUPPORTED_FORMAT_444   (3U)
 
#define JPEG_SUPPORTED_FORMAT_400   (4U)
 

Typedefs

typedef enum jpeg_table jpeg_table_t
 jpeg encoding and decoding configuration parameters More...
 
typedef enum jpeg_pixel_format jpeg_pixel_format_t
 

Enumerations

enum  jpeg_table {
  jpeg_table_qmem = 0x201002 , jpeg_table_huffenc = 0x201803 , jpeg_table_huffmin = 0x400104 , jpeg_table_huffbase = 0x200405 ,
  jpeg_table_huffsymb = 0x101506
}
 jpeg encoding and decoding configuration parameters More...
 
enum  jpeg_pixel_format {
  jpeg_pixel_format_argb8888 = 0 , jpeg_pixel_format_rgb565 , jpeg_pixel_format_yuv422h1p , jpeg_pixel_format_yuv422h2p ,
  jpeg_pixel_format_yuv420 , jpeg_pixel_format_y8
}
 

Functions

static void jpeg_clear_cfg (JPEG_Type *ptr)
 clear jpeg cfg Register More...
 
static void jpeg_disable (JPEG_Type *ptr)
 jpeg function disable More...
 
static void jpeg_enable (JPEG_Type *ptr)
 jpeg function enable More...
 
static void jpeg_stop (JPEG_Type *ptr)
 stop a encoder/decoder conversion More...
 
static void jpeg_start (JPEG_Type *ptr)
 start a new encoder/decoder conversion More...
 
static uint32_t jpeg_get_status (JPEG_Type *ptr)
 obtain jpeg Status Register More...
 
static void jpeg_clear_status (JPEG_Type *ptr, uint32_t mask)
 clear jpeg Status Register More...
 
static uint32_t jpeg_get_encoded_length (JPEG_Type *ptr)
 Out DMA Bytes Counter. More...
 
static void jpeg_software_reset (JPEG_Type *ptr)
 jpeg Software Reset More...
 
void jpeg_reset (JPEG_Type *ptr)
 stop a encoder/decoder conversion and Software Reset More...
 
void jpeg_enable_irq (JPEG_Type *ptr, uint32_t mask)
 jpeg enable interrupt More...
 
void jpeg_disable_irq (JPEG_Type *ptr, uint32_t mask)
 jpeg disable interrupt More...
 
void jpeg_init (JPEG_Type *ptr)
 stop a encoder/decoder conversion and Software Reset More...
 
hpm_stat_t jpeg_fill_table (JPEG_Type *ptr, jpeg_table_t table, uint8_t *data, uint32_t count)
 fill tables for jpeg controller More...
 
hpm_stat_t jpeg_start_decode (JPEG_Type *ptr, jpeg_job_config_t *config, uint32_t length)
 it will start decoding, and the process status needs to be checked by querying JPEG_EVENT More...
 
hpm_stat_t jpeg_start_encode (JPEG_Type *ptr, jpeg_job_config_t *config)
 
  • it will start encoding, and the process status needs to be checked by querying JPEG_EVENT
More...