summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--release/decoder_release/hw_jpegdecapi.h154
-rwxr-xr-xrelease/encode_release/hw_jpegenc.h133
-rwxr-xr-xrelease/encode_release/rk29-ipp.h135
-rw-r--r--src_dec/common/8170enum.h691
-rw-r--r--src_dec/common/regdrv.h92
-rw-r--r--src_dec/inc/decapicommon.h152
-rw-r--r--src_dec/inc/dwl.h174
-rw-r--r--src_dec/inc/jpegdecapi.h238
8 files changed, 1769 insertions, 0 deletions
diff --git a/release/decoder_release/hw_jpegdecapi.h b/release/decoder_release/hw_jpegdecapi.h
new file mode 100644
index 0000000..66b1afa
--- /dev/null
+++ b/release/decoder_release/hw_jpegdecapi.h
@@ -0,0 +1,154 @@
+/*
+ * Copyright (C) 2015 Rockchip Electronics Co., Ltd.
+ */
+#ifndef HW_JPEGDECAPI_H
+#define HW_JPEGDECAPI_H
+
+#include "../../src_dec/inc/jpegdecapi.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+//#define DEBUG_HW_JPEG
+//#define WHALLLOG LOGE
+#define WHALLLOG(...)
+
+#ifdef DEBUG_HW_JPEG
+#define WHREDLOG LOGE
+#include <utils/Log.h>
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+#define LOG_TAG "HW_JPEG"
+#define WHLOG LOGD
+#else
+#define WHLOG(...)
+#define WHREDLOG(...)
+#endif
+
+typedef int HW_BOOL;
+
+#ifndef CODEBEGIN
+#define CODEBEGIN do{
+#endif
+
+#ifndef CODEEND
+#define CODEEND }while(0);
+#endif
+
+#define PP_IN_FORMAT_YUV422INTERLAVE 0
+#define PP_IN_FORMAT_YUV420SEMI 1
+#define PP_IN_FORMAT_YUV420PLANAR 2
+#define PP_IN_FORMAT_YUV400 3
+#define PP_IN_FORMAT_YUV422SEMI 4
+#define PP_IN_FORMAT_YUV420SEMITIELED 5
+#define PP_IN_FORMAT_YUV440SEMI 6
+#define PP_IN_FORMAT_YUV444_SEMI 7
+#define PP_IN_FORMAT_YUV411_SEMI 8
+
+#define PP_OUT_FORMAT_RGB565 0
+#define PP_OUT_FORMAT_ARGB 1
+#define PP_OUT_FORMAT_YUV422INTERLAVE 3
+#define PP_OUT_FORMAT_YUV420INTERLAVE 5
+
+#ifdef JPEG_INPUT_BUFFER
+#undef JPEG_INPUT_BUFFER
+#endif
+#define JPEG_INPUT_BUFFER 5120
+
+//modify following values in special product
+#define BRIGHTNESS 4 // -128 ~ 127
+#define CONTRAST 0 // -64 ~ 64
+#define SATURATION 0 // -64 ~ 128
+
+typedef struct
+{
+ struct hw_jpeg_source_mgr * inStream;
+ int wholeStreamLength;
+ int thumbOffset;
+ int thumbLength;
+ HW_BOOL useThumb;
+ //int (*FillInputBuf) (void *, char *, size_t );
+} SourceStreamCtl;
+
+typedef struct
+{
+ int outFomart; /* =0,RGB565;=1,ARGB 8888 */
+ //int destWidth;
+ //int destHeight;
+ int scale_denom;
+ HW_BOOL shouldDither;
+ int cropX;
+ int cropY;
+ int cropW;
+ int cropH;
+} PostProcessInfo;
+
+typedef struct{
+ VPUMemLinear_t thumbpmem;
+ HW_BOOL reuse;
+}ReusePmem;
+
+typedef struct
+{
+ void * decoderHandle;
+ char *outAddr;
+ int ppscalew;
+ int ppscaleh;
+ int outWidth;
+ int outHeight;
+ HW_BOOL shouldScale;
+ ReusePmem* thumbPmem;
+} HwJpegOutputInfo;
+
+typedef struct Hw_Jpeg_InputInfo
+{
+ SourceStreamCtl streamCtl;
+ PostProcessInfo ppInfo;
+ HW_BOOL justcaloutwh;
+ //HW_BOOL (*get_ppInfo_msg)(struct Hw_Jpeg_InputInfo* hwInfo);
+} HwJpegInputInfo;
+
+struct hw_jpeg_source_mgr{
+ HW_BOOL isVpuMem;
+ const unsigned char * next_input_byte;
+ //const char * start_input_byte;
+ long bytes_in_buffer;
+ //size_t cur_pos_inbuffer;
+ long cur_offset_instream;
+ HwJpegInputInfo* info;
+ void (*init_source)(HwJpegInputInfo* hwInfo);
+ HW_BOOL (*fill_input_buffer)(HwJpegInputInfo* hwInfo);
+ HW_BOOL (*skip_input_data)(HwJpegInputInfo* hwInfo, long num_bytes);
+ HW_BOOL (*resync_to_restart)(HwJpegInputInfo* hwInfo);
+ //void (*term_source)(HwJpegInputInfo* hwInfo);
+ HW_BOOL (*seek_input_data)(HwJpegInputInfo* hwInfo, long byte_offset);
+ int (*fill_buffer)(HwJpegInputInfo* hwInfo, void * destination, VPUMemLinear_t *newmem, int w, int h);//fill destination with stream
+ int (*fill_thumb)(HwJpegInputInfo* hwInfo, void * thumbBuf);//fill thumbBuf with thumbmsg if has thumb
+ HW_BOOL (*read_1_byte)(HwJpegInputInfo* hwInfo, unsigned char *ch);//read one byte from stream
+ void (*get_vpumemInst)(HwJpegInputInfo* hwInfo, VPUMemLinear_t* vpumem);
+};
+
+extern int hw_jpeg_decode(HwJpegInputInfo *inInfo, HwJpegOutputInfo *outInfo, char *reuseBitmap, int bm_w, int bm_h);
+
+extern int hw_jpeg_release(void *decInst);
+
+extern int hw_jpeg_VPUMallocLinear(VPUMemLinear_t *p, int size);
+
+extern int hw_jpeg_VPUFreeLinear(VPUMemLinear_t *p);
+
+//extern void hw_jpeg_VPUMemFlush(VPUMemLinear_t *p);
+
+extern int SetPostProcessor(unsigned int * reg,VPUMemLinear_t *dst,int inWidth,int inHeigth,
+ int outWidth,int outHeight,int inColor, PostProcessInfo *ppInfo);
+
+extern void resetImageInfo(JpegDecImageInfo * imageInfo);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* HW_JPEGDECAPI_H */
+
diff --git a/release/encode_release/hw_jpegenc.h b/release/encode_release/hw_jpegenc.h
new file mode 100755
index 0000000..735a636
--- /dev/null
+++ b/release/encode_release/hw_jpegenc.h
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2015 Rockchip Electronics Co., Ltd.
+ */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#ifndef __RK_HW_JPEGENC_H__
+#define __RK_HW_JPEGENC_H__
+#include "vpu_global.h"
+#include "vpu_mem_pool.h"
+
+
+typedef enum
+{
+ JPEGENC_YUV420_P = 0, //JPEGENC_YUV420_PLANAR; /* YYYY... UUUU... VVVV */
+ JPEGENC_YUV420_SP = 1, //JPEGENC_YUV420_SEMIPLANAR; /* YYYY... UVUVUV... */
+ JPEGENC_YUV422_YUYV = 2, //JPEGENC_YUV422_INTERLEAVED_YUYV; /* YUYVYUYV... */
+ JPEGENC_YUV422_UYVY = 3, //JPEGENC_YUV422_INTERLEAVED_UYVY; /* UYVYUYVY... */
+ HWJPEGENC_RGB565 = 4,
+ HWJPEGENC_RGB888 = 10
+} JpegEncType;
+
+typedef struct{
+ uint32_t num;
+ uint32_t denom;
+}rat_t;
+
+typedef struct{
+ /*IFD0*/
+ char *maker;//manufacturer of digicam, just to adjust to make inPhybusAddr to align to 64
+ int makerchars;//length of maker, contain the end '\0', so equal strlen(maker)+1
+ char *modelstr;//model number of digicam
+ int modelchars;//length of modelstr, contain the end '\0'
+ int Orientation;//usually 1
+ //XResolution, YResolution; if need be not 72, TODO...
+ char DateTime[20];//must be 20 chars-> yyyy:MM:dd0x20hh:mm:ss'\0'
+ /*Exif SubIFD*/
+ rat_t ExposureTime;//such as 1/400=0.0025s
+ rat_t ApertureFNumber;//actual f-number
+ int ISOSpeedRatings;//CCD sensitivity equivalent to Ag-Hr film speedrate
+ rat_t CompressedBitsPerPixel;
+ rat_t ShutterSpeedValue;
+ rat_t ApertureValue;
+ rat_t ExposureBiasValue;
+ rat_t MaxApertureValue;
+ int MeteringMode;
+ int Flash;
+ rat_t FocalLength;
+ rat_t FocalPlaneXResolution;
+ rat_t FocalPlaneYResolution;
+ int SensingMethod;//2 means 1 chip color area sensor
+ int FileSource;//3 means the image source is digital still camera
+ int CustomRendered;//0
+ int ExposureMode;//0
+ int WhiteBalance;//0
+ rat_t DigitalZoomRatio;// inputw/inputw
+ //int FocalLengthIn35mmFilm;
+ int SceneCaptureType;//0
+ char *makernote;
+ int makernotechars;//length of makernote, include of the end '\0'
+
+}RkExifInfo;
+
+typedef struct
+{
+ /*GPS IFD*/
+ //int GpsInfoPrecent;
+ char GPSLatitudeRef[2];//'N\0' 'S\0'
+ rat_t GPSLatitude[3];
+ char GPSLongitudeRef[2];//'E\0' 'W\0'
+ rat_t GPSLongitude[3];
+ char GPSAltitudeRef;
+ rat_t GPSAltitude;
+ rat_t GpsTimeStamp[3];
+ char GpsDateStamp[11];//"YYYY:MM:DD\0"
+
+ char *GPSProcessingMethod;//[101]
+ int GpsProcessingMethodchars;//length of GpsProcessingMethod
+}RkGPSInfo;
+
+typedef enum{
+ DEGREE_0 = 0,
+ DEGREE_90 = 1,
+ DEGREE_270 = 2,
+ DEGREE_180 = 3
+}JpegEncDegree;
+typedef struct
+{
+ int frameHeader;//if 1, insert all headers(SOI,APP0,DQT,SOF0,DRI,DHT,SOS);if 0, insert only APP0 and SOS headers
+ JpegEncDegree rotateDegree;//if degree is 90 or 270, check that width and height and thumbwidth and thumbheight must % 16 = 0.
+ int y_rgb_addr;
+ int uv_addr;
+ int yuvaddrfor180;//if rotate 180, we need another phy buf. use ipp to do rotating 180. TO DO by soft handler
+ int inputW;//inputW >= (encodedW+15)&(~15) and inputW%16=0(for YUV420)
+ int inputH;//inputH >= encodedH and inputH%8=0(for YUV420)
+ //int encodedW;//encodedW%4=0, >= 96
+ //int encodedH;//encodedH%2=0, >=32
+ JpegEncType type;
+ int qLvl;
+
+ int doThumbNail;//insert thumbnail at APP0 extension if motionjpeg, else at APP1 extension(exifinfo should not be null)
+ const void *thumbData;//if thumbData is NULL, do scale, the type above can be JPEGENC_YUV420_SP only
+ int thumbDataLen;
+ int thumbW;//if thumbData is not NULL, ignore this. even. [96,255]
+ int thumbH;//thumbW*thumbH % 8 = 0
+ int thumbqLvl;
+ RkExifInfo *exifInfo;//if dothumbnail and thumbdata is null and insert all header, this must not be null
+ RkGPSInfo *gpsInfo;//be null when gps is not set, else not be null
+ unsigned char* y_vir_addr;
+ unsigned char* uv_vir_addr;
+ vpu_display_mem_pool *pool;
+}JpegEncInInfo;
+
+typedef struct
+{
+ int outBufPhyAddr;
+ unsigned char* outBufVirAddr;
+ int finalOffset;//out invalid data offset to outBufAddr above
+ int outBuflen;//1024 + thumbnail length + init jpeg length + thumbnaillength(tmp buf)
+ int jpegFileLen;
+ int JpegHeaderLen;
+ int ThumbFileLen;
+ int (*cacheflush)(int buf_type, int offset, int len);
+}JpegEncOutInfo;
+
+extern int hw_jpeg_encode(JpegEncInInfo *inInfo, JpegEncOutInfo *outInfo);
+extern int doSoftScale(uint8_t *srcy, uint8_t *srcuv, int srcw, int srch, uint8_t *dsty, uint8_t *dstuv, int dstw, int dsth, int flag);
+#endif
+#ifdef __cplusplus
+}
+#endif
diff --git a/release/encode_release/rk29-ipp.h b/release/encode_release/rk29-ipp.h
new file mode 100755
index 0000000..9f83f82
--- /dev/null
+++ b/release/encode_release/rk29-ipp.h
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 2015 Rockchip Electronics Co., Ltd.
+ */
+#ifndef _RK29_IPP_DRIVER_H_
+#define _RK29_IPP_DRIVER_H_
+
+
+#define IPP_BLIT_SYNC 0x5017
+#define IPP_BLIT_ASYNC 0x5018
+#define IPP_GET_RESULT 0x5019
+
+
+/* Image data */
+struct rk29_ipp_image
+{
+ uint32_t YrgbMst; // image Y/rgb address
+ uint32_t CbrMst; // image CbCr address
+ uint32_t w; // image full width
+ uint32_t h; // image full height
+ uint32_t fmt; // color format
+};
+
+struct rk29_ipp_req {
+ struct rk29_ipp_image src0; // source0 image
+ struct rk29_ipp_image dst0; // destination0 image
+ //struct rk29_ipp_image src1; // source1 image
+ //struct rk29_ipp_image dst1; // destination1 image
+ uint32_t src_vir_w;
+ uint32_t dst_vir_w;
+ uint32_t timeout;
+
+ uint32_t flag; //rotate
+
+ /*store_clip_mode
+ 0:when src width is not 64-bits aligned,use dummy data make it 64-bits aligned 1:packed
+ we usually set to 0
+ */
+ uint8_t store_clip_mode;
+
+ //deinterlace_enable 1:enable 0:disable
+ uint8_t deinterlace_enable;
+ //the sum of three paras should be 32,and single para should be less than 32
+ uint8_t deinterlace_para0;
+ uint8_t deinterlace_para1;
+ uint8_t deinterlace_para2;
+
+ /* completion is reported through a callback */
+ void (*complete)(int retval);
+
+};
+
+//format enum
+enum
+{
+ IPP_XRGB_8888 = 0,
+ IPP_RGB_565 =1 ,
+ IPP_Y_CBCR_H2V1 = 2, //yuv 422sp
+ IPP_Y_CBCR_H2V2 = 3, //yuv 420sp
+ IPP_Y_CBCR_H1V1 =6, //yuv 444sp
+ IPP_IMGTYPE_LIMIT
+};
+
+typedef enum
+ {
+ IPP_ROT_90,
+ IPP_ROT_180,
+ IPP_ROT_270,
+ IPP_ROT_X_FLIP,
+ IPP_ROT_Y_FLIP,
+ IPP_ROT_0,
+ IPP_ROT_LIMIT
+ } ROT_DEG;
+
+ struct ipp_regs {
+ uint32_t ipp_config;
+ uint32_t ipp_src_img_info;
+ uint32_t ipp_dst_img_info;
+ uint32_t ipp_img_vir;
+ uint32_t ipp_int;
+ uint32_t ipp_src0_y_mst;
+ uint32_t ipp_src0_Cbr_mst;
+ uint32_t ipp_src1_y_mst;
+ uint32_t ipp_src1_Cbr_mst;
+ uint32_t ipp_dst0_y_mst;
+ uint32_t ipp_dst0_Cbr_mst;
+ uint32_t ipp_dst1_y_mst;
+ uint32_t ipp_dst1_Cbr_mst;
+ uint32_t ipp_pre_scl_para;
+ uint32_t ipp_post_scl_para;
+ uint32_t ipp_swap_ctrl;
+ uint32_t ipp_pre_img_info;
+ uint32_t ipp_axi_id;
+ uint32_t ipp_process_st;
+};
+
+#define IPP_CONFIG (0x00)
+#define IPP_SRC_IMG_INFO (0x04)
+#define IPP_DST_IMG_INFO (0x08)
+#define IPP_IMG_VIR (0x0c)
+#define IPP_INT (0x10)
+#define IPP_SRC0_Y_MST (0x14)
+#define IPP_SRC0_CBR_MST (0x18)
+#define IPP_SRC1_Y_MST (0x1c)
+#define IPP_SRC1_CBR_MST (0x20)
+#define IPP_DST0_Y_MST (0x24)
+#define IPP_DST0_CBR_MST (0x28)
+#define IPP_DST1_Y_MST (0x2c)
+#define IPP_DST1_CBR_MST (0x30)
+#define IPP_PRE_SCL_PARA (0x34)
+#define IPP_POST_SCL_PARA (0x38)
+#define IPP_SWAP_CTRL (0x3c)
+#define IPP_PRE_IMG_INFO (0x40)
+#define IPP_AXI_ID (0x44)
+#define IPP_SRESET (0x48)
+#define IPP_PROCESS_ST (0x50)
+
+/*ipp config*/
+#define STORE_CLIP_MODE (1<<26)
+#define DEINTERLACE_ENABLE (1<<24)
+#define ROT_ENABLE (1<<8)
+#define PRE_SCALE (1<<4)
+#define POST_SCALE (1<<3)
+
+#define IPP_BLIT_COMPLETE_EVENT BIT(1)
+
+#define IS_YCRCB(img) ((img == IPP_Y_CBCR_H2V1) | (img == IPP_Y_CBCR_H2V2) | \
+ (img == IPP_Y_CBCR_H1V1) )
+#define IS_RGB(img) ((img == IPP_RGB_565) | (img == IPP_ARGB_8888) | \
+ (img == IPP_XRGB_8888) ))
+#define HAS_ALPHA(img) (img == IPP_ARGB_8888)
+
+
+int ipp_blit_async(const struct rk29_ipp_req *req);
+int ipp_blit_sync(const struct rk29_ipp_req *req);
+#endif /*_RK29_IPP_DRIVER_H_*/
diff --git a/src_dec/common/8170enum.h b/src_dec/common/8170enum.h
new file mode 100644
index 0000000..a39f6e2
--- /dev/null
+++ b/src_dec/common/8170enum.h
@@ -0,0 +1,691 @@
+ HWIF_DEC_PIC_INF,
+ HWIF_DEC_TIMEOUT,
+ HWIF_DEC_SLICE_INT,
+ HWIF_DEC_ERROR_INT,
+ HWIF_DEC_ASO_INT,
+ HWIF_DEC_BUFFER_INT,
+ HWIF_DEC_BUS_INT,
+ HWIF_DEC_RDY_INT,
+ HWIF_DEC_IRQ,
+ HWIF_DEC_IRQ_DIS,
+ HWIF_DEC_E,
+ HWIF_DEC_AXI_RD_ID,
+ HWIF_DEC_TIMEOUT_E,
+ HWIF_DEC_STRSWAP32_E,
+ HWI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BASE,
+ HWIF_PIC_SLICE_AM,
+ HWIF_COEFFS_PART_AM,
+ HWIF_DIFF_MV_BASE,
+ HWIF_PINIT_RLIST_F9,
+ HWIF_PINIT_RLIST_F8,
+ HWIF_PINIT_RLIST_F7,
+ HWIF_PINIT_RLIST_F6,
+ HWIF_PINIT_RLIST_F5,
+ HWIF_PINIT_RLIST_F4,
+ HWIF_ICOMP1_E,
+ HWIF_ISCALE1,
+ HWIF_ISHIFT1,
+ HWIF_SEGMENT_BASE,
+ HWIF_SEGMENT_UPD_E,
+ HWIF_SEGMENT_E,
+ HWIF_I4X4_OR_DC_BASE,
+ HWIF_PINIT_RLIST_F15,
+ HWIF_PINIT_RLIST_F14,
+ HWIF_PINIT_RLIST_F13,
+ HWIF_PINIT_RLIST_F12,
+ HWIF_PINIT_RLIST_F11,
+ HWIF_PINIT_RLIST_F10,
+ HWIF_ICOMP2_E,
+ HWIF_ISCALE2,
+ HWIF_ISHIFT2,
+ HWIF_DCT3_START_BIT,
+ HWIF_DCT4_START_BIT,
+ HWIF_DCT5_START_BIT,
+ HWIF_DCT6_START_BIT,
+ HWIF_DCT7_START_BIT,
+ HWIF_RLC_VLC_BASE,
+ HWIF_DEC_OUT_BASE,
+ HWIF_REFER0_BASE,
+ HWIF_REFER0_FIELD_E,
+ HWIF_REFER0_TOPC_E,
+ HWIF_JPG_CH_OUT_BASE,
+ HWIF_REFER1_BASE,
+ HWIF_REFER1_FIELD_E,
+ HWIF_REFER1_TOPC_E,
+ HWIF_JPEG_SLICE_H,
+ HWIF_REFER2_BASE,
+ HWIF_REFER2_FIELD_E,
+ HWIF_REFER2_TOPC_E,
+ HWIF_AC1_CODE6_CNT,
+ HWIF_AC1_CODE5_CNT,
+ HWIF_AC1_CODE4_CNT,
+ HWIF_AC1_CODE3_CNT,
+ HWIF_AC1_CODE2_CNT,
+ HWIF_AC1_CODE1_CNT,
+ HWIF_REFER3_BASE,
+ HWIF_REFER3_FIELD_E,
+ HWIF_REFER3_TOPC_E,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
+ HWIF_LEFT_CROSS,
+ HWIF_PP_IN_H_EXT,
+ HWIF_PP_IN_W_EXT,
+ HWIF_CROP_STARTY_EXT,
+ HWIF_CROP_STARTX_EXT,
+ HWIF_DISPLAY_WIDTH,
+ HWIF_ABLEND1_BASE,
+ HWIF_ABLEND2_BASE,
diff --git a/src_dec/common/regdrv.h b/src_dec/common/regdrv.h
new file mode 100644
index 0000000..99d9d12
--- /dev/null
+++ b/src_dec/common/regdrv.h
@@ -0,0 +1,92 @@
+/*------------------------------------------------------------------------------
+-- --
+-- This software is confidential and proprietary and may be used --
+-- only as expressly authorized by a licensing agreement from --
+-- --
+-- Hantro Products Oy. --
+-- --
+-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
+-- ALL RIGHTS RESERVED --
+-- --
+-- The entire notice above must be reproduced --
+-- on all copies and should not be removed. --
+-- --
+--------------------------------------------------------------------------------
+--
+-- Description :
+--
+--------------------------------------------------------------------------------
+--
+-- Version control information, please leave untouched.
+--
+-- $RCSfile: regdrv.h,v $
+-- $Revision: 1.19 $
+-- $Date: 2010/05/11 09:33:47 $
+--
+------------------------------------------------------------------------------*/
+
+#ifndef REGDRV_H
+#define REGDRV_H
+
+/*------------------------------------------------------------------------------
+ Include headers
+------------------------------------------------------------------------------*/
+
+#include "vpu_type.h"
+
+/*------------------------------------------------------------------------------
+ Module defines
+------------------------------------------------------------------------------*/
+
+#define DEC_8170_IRQ_RDY 0x01
+#define DEC_8170_IRQ_BUS 0x02
+#define DEC_8170_IRQ_BUFFER 0x04
+#define DEC_8170_IRQ_ASO 0x08
+#define DEC_8170_IRQ_ERROR 0x10
+#define DEC_8170_IRQ_SLICE 0x20
+#define DEC_8170_IRQ_TIMEOUT 0x40
+
+#define DEC_8190_IRQ_RDY DEC_8170_IRQ_RDY
+#define DEC_8190_IRQ_BUS DEC_8170_IRQ_BUS
+#define DEC_8190_IRQ_BUFFER DEC_8170_IRQ_BUFFER
+#define DEC_8190_IRQ_ASO DEC_8170_IRQ_ASO
+#define DEC_8190_IRQ_ERROR DEC_8170_IRQ_ERROR
+#define DEC_8190_IRQ_SLICE DEC_8170_IRQ_SLICE
+#define DEC_8190_IRQ_TIMEOUT DEC_8170_IRQ_TIMEOUT
+
+typedef enum
+{
+/* include script-generated part */
+#include "8170enum.h"
+ HWIF_DEC_IRQ_STAT,
+ HWIF_PP_IRQ_STAT,
+ HWIF_LAST_REG,
+
+ /* aliases */
+ HWIF_MPEG4_DC_BASE = HWIF_I4X4_OR_DC_BASE,
+ HWIF_INTRA_4X4_BASE = HWIF_I4X4_OR_DC_BASE,
+ HWIF_RESV2HWGOLDEN_BASE = HWIF_REFER4_BASE,
+ HWIF_RESV2HWPART1_BASE = HWIF_REFER13_BASE,
+ HWIF_RESV2HWPART2_BASE = HWIF_RLC_VLC_BASE,
+ HWIF_RESV2HWPROBTBL_BASE = HWIF_QTABLE_BASE,
+ /* progressive JPEG */
+ HWIF_PJPEG_COEFF_BUF = HWIF_DIR_MV_BASE,
+
+ /* MVC */
+ HWIF_MVC_E = HWIF_RESV1_E,
+ HWIF_INTER_VIEW_BASE = HWIF_REFER15_BASE,
+
+} hwIfName_e;
+
+/*------------------------------------------------------------------------------
+ Data types
+------------------------------------------------------------------------------*/
+
+/*------------------------------------------------------------------------------
+ Function prototypes
+------------------------------------------------------------------------------*/
+
+void SetDecRegister(RK_U32 * regBase, RK_U32 id, RK_U32 value);
+RK_U32 GetDecRegister(const RK_U32 * regBase, RK_U32 id);
+
+#endif /* #ifndef REGDRV_H */
diff --git a/src_dec/inc/decapicommon.h b/src_dec/inc/decapicommon.h
new file mode 100644
index 0000000..1c462dc
--- /dev/null
+++ b/src_dec/inc/decapicommon.h
@@ -0,0 +1,152 @@
+/*------------------------------------------------------------------------------
+-- --
+-- This software is confidential and proprietary and may be used --
+-- only as expressly authorized by a licensing agreement from --
+-- --
+-- Hantro Products Oy. --
+-- --
+-- (C) COPYRIGHT 2007 HANTRO PRODUCTS OY --
+-- ALL RIGHTS RESERVED --
+-- --
+-- The entire notice above must be reproduced --
+-- on all copies and should not be removed. --
+-- --
+--------------------------------------------------------------------------------
+--
+-- Description : Common Decoder API definitions
+--
+--------------------------------------------------------------------------------
+--
+-- Version control information, please leave untouched.
+--
+-- $RCSfile: decapicommon.h,v $
+-- $Date: 2010/05/11 09:33:19 $
+-- $Revision: 1.17 $
+--
+------------------------------------------------------------------------------*/
+#ifndef __DECAPICOMMON_H__
+#define __DECAPICOMMON_H__
+
+#include "vpu_type.h"
+
+#define MPEG4_NOT_SUPPORTED (RK_U32)(0x00)
+#define MPEG4_SIMPLE_PROFILE (RK_U32)(0x01)
+#define MPEG4_ADVANCED_SIMPLE_PROFILE (RK_U32)(0x02)
+#define MPEG4_CUSTOM_NOT_SUPPORTED (RK_U32)(0x00)
+#define MPEG4_CUSTOM_FEATURE_1 (RK_U32)(0x01)
+#define H264_NOT_SUPPORTED (RK_U32)(0x00)
+#define H264_BASELINE_PROFILE (RK_U32)(0x01)
+#define H264_MAIN_PROFILE (RK_U32)(0x02)
+#define H264_HIGH_PROFILE (RK_U32)(0x03)
+#define VC1_NOT_SUPPORTED (RK_U32)(0x00)
+#define VC1_SIMPLE_PROFILE (RK_U32)(0x01)
+#define VC1_MAIN_PROFILE (RK_U32)(0x02)
+#define VC1_ADVANCED_PROFILE (RK_U32)(0x03)
+#define MPEG2_NOT_SUPPORTED (RK_U32)(0x00)
+#define MPEG2_MAIN_PROFILE (RK_U32)(0x01)
+#define JPEG_NOT_SUPPORTED (RK_U32)(0x00)
+#define JPEG_BASELINE (RK_U32)(0x01)
+#define JPEG_PROGRESSIVE (RK_U32)(0x02)
+#define PP_NOT_SUPPORTED (RK_U32)(0x00)
+#define PP_SUPPORTED (RK_U32)(0x01)
+#define PP_DITHERING (RK_U32)(0x10000000)
+#define PP_SCALING (RK_U32)(0x0C000000)
+#define PP_DEINTERLACING (RK_U32)(0x02000000)
+#define PP_ALPHA_BLENDING (RK_U32)(0x01000000)
+#define VP7_NOT_SUPPORTED (RK_U32)(0x00)
+#define VP7_SUPPORTED (RK_U32)(0x01)
+#define VP8_NOT_SUPPORTED (RK_U32)(0x00)
+#define VP8_SUPPORTED (RK_U32)(0x01)
+#define REF_BUF_NOT_SUPPORTED (RK_U32)(0x00)
+#define REF_BUF_SUPPORTED (RK_U32)(0x01)
+#define REF_BUF_INTERLACED (RK_U32)(0x02)
+#define REF_BUF_DOUBLE (RK_U32)(0x04)
+#define AVS_NOT_SUPPORTED (RK_U32)(0x00)
+#define AVS_SUPPORTED (RK_U32)(0x01)
+#define JPEG_EXT_NOT_SUPPORTED (RK_U32)(0x00)
+#define JPEG_EXT_SUPPORTED (RK_U32)(0x01)
+#define MVC_NOT_SUPPORTED (RK_U32)(0x00)
+#define MVC_SUPPORTED (RK_U32)(0x01)
+
+#define H264_NOT_SUPPORTED_FUSE (RK_U32)(0x00)
+#define H264_FUSE_ENABLED (RK_U32)(0x01)
+#define MPEG4_NOT_SUPPORTED_FUSE (RK_U32)(0x00)
+#define MPEG4_FUSE_ENABLED (RK_U32)(0x01)
+#define MPEG2_NOT_SUPPORTED_FUSE (RK_U32)(0x00)
+#define MPEG2_FUSE_ENABLED (RK_U32)(0x01)
+#define JPEG_NOT_SUPPORTED_FUSE (RK_U32)(0x00)
+#define JPEG_FUSE_ENABLED (RK_U32)(0x01)
+#define VP7_NOT_SUPPORTED_FUSE (RK_U32)(0x00)
+#define VP7_FUSE_ENABLED (RK_U32)(0x01)
+#define VP8_NOT_SUPPORTED_FUSE (RK_U32)(0x00)
+#define VP8_FUSE_ENABLED (RK_U32)(0x01)
+#define VC1_NOT_SUPPORTED_FUSE (RK_U32)(0x00)
+#define VC1_FUSE_ENABLED (RK_U32)(0x01)
+#define JPEG_PROGRESSIVE_NOT_SUPPORTED_FUSE (RK_U32)(0x00)
+#define JPEG_PROGRESSIVE_FUSE_ENABLED (RK_U32)(0x01)
+#define REF_BUF_NOT_SUPPORTED_FUSE (RK_U32)(0x00)
+#define REF_BUF_FUSE_ENABLED (RK_U32)(0x01)
+#define AVS_NOT_SUPPORTED_FUSE (RK_U32)(0x00)
+#define AVS_FUSE_ENABLED (RK_U32)(0x01)
+#define RV_NOT_SUPPORTED_FUSE (RK_U32)(0x00)
+#define RV_FUSE_ENABLED (RK_U32)(0x01)
+#define MVC_NOT_SUPPORTED_FUSE (RK_U32)(0x00)
+#define MVC_FUSE_ENABLED (RK_U32)(0x01)
+
+#define PP_NOT_SUPPORTED_FUSE (RK_U32)(0x00)
+#define PP_FUSE_ENABLED (RK_U32)(0x01)
+#define PP_FUSE_DEINTERLACING_ENABLED (RK_U32)(0x40000000)
+#define PP_FUSE_ALPHA_BLENDING_ENABLED (RK_U32)(0x20000000)
+#define MAX_PP_OUT_WIDHT_1920_FUSE_ENABLED (RK_U32)(0x00008000)
+#define MAX_PP_OUT_WIDHT_1280_FUSE_ENABLED (RK_U32)(0x00004000)
+#define MAX_PP_OUT_WIDHT_720_FUSE_ENABLED (RK_U32)(0x00002000)
+#define MAX_PP_OUT_WIDHT_352_FUSE_ENABLED (RK_U32)(0x00001000)
+
+/* Macro to copy support flags and picture max width from DWL HW config
+ * to Decoder HW config */
+#define SET_DEC_BUILD_SUPPORT(decHwCfg, dwlHwCfg) \
+ decHwCfg.maxDecPicWidth = dwlHwCfg.maxDecPicWidth; \
+ decHwCfg.maxPpOutPicWidth = dwlHwCfg.maxPpOutPicWidth; \
+ decHwCfg.h264Support = dwlHwCfg.h264Support; \
+ decHwCfg.jpegSupport = dwlHwCfg.jpegSupport; \
+ decHwCfg.jpegESupport = dwlHwCfg.jpegESupport; \
+ decHwCfg.mpeg2Support = dwlHwCfg.mpeg2Support; \
+ decHwCfg.mpeg4Support = dwlHwCfg.mpeg4Support; \
+ decHwCfg.vc1Support = dwlHwCfg.vc1Support; \
+ decHwCfg.ppSupport = dwlHwCfg.ppSupport; \
+ decHwCfg.ppConfig = dwlHwCfg.ppConfig; \
+ decHwCfg.resv3Support = dwlHwCfg.resv3Support; \
+ decHwCfg.resv2Support = dwlHwCfg.resv2Support; \
+ decHwCfg.vp7Support = dwlHwCfg.vp7Support; \
+ decHwCfg.vp8Support = dwlHwCfg.vp8Support; \
+ decHwCfg.refBufSupport = dwlHwCfg.refBufSupport; \
+ decHwCfg.avsSupport = dwlHwCfg.avsSupport; \
+ decHwCfg.resv0Support = dwlHwCfg.resv0Support; \
+ decHwCfg.customMpeg4Support = dwlHwCfg.customMpeg4Support; \
+ decHwCfg.mvcSupport = dwlHwCfg.mvcSupport;
+
+typedef struct DecHwConfig_
+{
+ RK_U32 mpeg4Support; /* one of the MPEG4 values defined above */
+ RK_U32 customMpeg4Support; /* one of the MPEG4 custom values defined above */
+ RK_U32 h264Support; /* one of the H264 values defined above */
+ RK_U32 vc1Support; /* one of the VC1 values defined above */
+ RK_U32 mpeg2Support; /* one of the MPEG2 values defined above */
+ RK_U32 jpegSupport; /* one of the JPEG values defined above */
+ RK_U32 jpegProgSupport; /* one of the Progressive JPEG values defined above */
+ RK_U32 maxDecPicWidth; /* maximum picture width in decoder */
+ RK_U32 ppSupport; /* PP_SUPPORTED or PP_NOT_SUPPORTED */
+ RK_U32 ppConfig; /* Bitwise list of PP function */
+ RK_U32 maxPpOutPicWidth; /* maximum post-processor output picture width */
+ RK_U32 resv3Support;
+ RK_U32 refBufSupport; /* one of the REF_BUF values defined above */
+ RK_U32 resv2Support;
+ RK_U32 vp7Support; /* one of the VP7 values defined above */
+ RK_U32 vp8Support; /* one of the VP8 values defined above */
+ RK_U32 avsSupport; /* one of the AVS values defined above */
+ RK_U32 jpegESupport; /* one of the JPEG EXT values defined above */
+ RK_U32 resv0Support;
+ RK_U32 mvcSupport; /* one of the MVC values defined above */
+} DecHwConfig;
+
+#endif /* __DECAPICOMMON_H__ */
diff --git a/src_dec/inc/dwl.h b/src_dec/inc/dwl.h
new file mode 100644
index 0000000..06e4c11
--- /dev/null
+++ b/src_dec/inc/dwl.h
@@ -0,0 +1,174 @@
+/*------------------------------------------------------------------------------
+-- --
+-- This software is confidential and proprietary and may be used --
+-- only as expressly authorized by a licensing agreement from --
+-- --
+-- Hantro Products Oy. --
+-- --
+-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
+-- ALL RIGHTS RESERVED --
+-- --
+-- The entire notice above must be reproduced --
+-- on all copies and should not be removed. --
+-- --
+--------------------------------------------------------------------------------
+--
+-- Description : Sytem Wrapper Layer
+--
+------------------------------------------------------------------------------
+--
+-- Version control information, please leave untouched.
+--
+-- $RCSfile: dwl.h,v $
+-- $Revision: 1.19 $
+-- $Date: 2010/05/11 09:33:19 $
+--
+------------------------------------------------------------------------------*/
+#ifndef __DWL_H__
+#define __DWL_H__
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include "vpu_type.h"
+#include "decapicommon.h"
+#include "vpu_mem.h"
+#include "vpu.h"
+
+#define NULL ((void *)0)
+#define DWL_OK 0
+#define DWL_ERROR -1
+
+#define DWL_HW_WAIT_OK DWL_OK
+#define DWL_HW_WAIT_ERROR DWL_ERROR
+#define DWL_HW_WAIT_TIMEOUT 1
+
+#define DWL_CLIENT_TYPE_H264_DEC 1U
+#define DWL_CLIENT_TYPE_MPEG4_DEC 2U
+#define DWL_CLIENT_TYPE_JPEG_DEC 3U
+#define DWL_CLIENT_TYPE_PP 4U
+#define DWL_CLIENT_TYPE_VC1_DEC 5U
+#define DWL_CLIENT_TYPE_MPEG2_DEC 6U
+#define DWL_CLIENT_TYPE_AVS_DEC 9U /* TODO: fix */
+#define DWL_CLIENT_TYPE_VP8_DEC 10U
+
+ /* Linear memory area descriptor */
+ typedef struct DWLLinearMem
+ {
+ RK_U32 *virtualAddress;
+ RK_U32 busAddress;
+ RK_U32 size;
+ } DWLLinearMem_t;
+
+ /* DWLInitParam is used to pass parameters when initializing the DWL */
+ typedef struct DWLInitParam
+ {
+ RK_U32 clientType;
+ } DWLInitParam_t;
+
+ /* Hardware configuration description */
+
+ typedef struct DWLHwConfig
+ {
+ RK_U32 maxDecPicWidth; /* Maximum video decoding width supported */
+ RK_U32 maxPpOutPicWidth; /* Maximum output width of Post-Processor */
+ RK_U32 h264Support; /* HW supports h.264 */
+ RK_U32 jpegSupport; /* HW supports JPEG */
+ RK_U32 mpeg4Support; /* HW supports MPEG-4 */
+ RK_U32 customMpeg4Support; /* HW supports custom MPEG-4 features */
+ RK_U32 vc1Support; /* HW supports VC-1 Simple */
+ RK_U32 mpeg2Support; /* HW supports MPEG-2 */
+ RK_U32 ppSupport; /* HW supports post-processor */
+ RK_U32 ppConfig; /* HW post-processor functions bitmask */
+ RK_U32 resv3Support;
+ RK_U32 refBufSupport; /* HW supports reference picture buffering */
+ RK_U32 resv2Support;
+ RK_U32 vp7Support; /* HW supports VP7 */
+ RK_U32 vp8Support; /* HW supports VP8 */
+ RK_U32 avsSupport; /* HW supports AVS */
+ RK_U32 jpegESupport; /* HW supports JPEG extensions */
+ RK_U32 resv0Support;
+ RK_U32 mvcSupport; /* HW supports H264 MVC extension */
+ } DWLHwConfig_t;
+
+ typedef struct DWLHwFuseStatus
+ {
+ RK_U32 h264SupportFuse; /* HW supports h.264 */
+ RK_U32 mpeg4SupportFuse; /* HW supports MPEG-4 */
+ RK_U32 mpeg2SupportFuse; /* HW supports MPEG-2 */
+ RK_U32 resv3SupportFuse;
+ RK_U32 jpegSupportFuse; /* HW supports JPEG */
+ RK_U32 resv2SupportFuse;
+ RK_U32 vp7SupportFuse; /* HW supports VP7 */
+ RK_U32 vp8SupportFuse; /* HW supports VP8 */
+ RK_U32 vc1SupportFuse; /* HW supports VC-1 Simple */
+ RK_U32 jpegProgSupportFuse; /* HW supports Progressive JPEG */
+ RK_U32 ppSupportFuse; /* HW supports post-processor */
+ RK_U32 ppConfigFuse; /* HW post-processor functions bitmask */
+ RK_U32 maxDecPicWidthFuse; /* Maximum video decoding width supported */
+ RK_U32 maxPpOutPicWidthFuse; /* Maximum output width of Post-Processor */
+ RK_U32 refBufSupportFuse; /* HW supports reference picture buffering */
+ RK_U32 avsSupportFuse; /* one of the AVS values defined above */
+ RK_U32 resv0SupportFuse;
+ RK_U32 mvcSupportFuse;
+ RK_U32 customMpeg4SupportFuse; /* Fuse for custom MPEG-4 */
+
+ } DWLHwFuseStatus_t;
+
+/* HW ID retriving, static implementation */
+ RK_U32 DWLReadAsicID(void);
+
+/* HW configuration retrieving, static implementation */
+ void DWLReadAsicConfig(DWLHwConfig_t * pHwCfg);
+
+/* HW fuse retrieving, static implementation */
+ void DWLReadAsicFuseStatus(DWLHwFuseStatus_t * pHwFuseSts);
+
+/* DWL initilaization and release */
+ const void *DWLInit(DWLInitParam_t * param);
+ RK_S32 DWLRelease(const void *instance);
+
+/* HW sharing */
+ RK_S32 DWLReserveHw(const void *instance);
+ void DWLReleaseHw(const void *instance);
+
+/* Frame buffers memory */
+ RK_S32 DWLMallocRefFrm(const void *instance, RK_U32 size, DWLLinearMem_t * info);
+ void DWLFreeRefFrm(const void *instance, DWLLinearMem_t * info);
+
+/* SW/HW shared memory */
+ RK_S32 DWLMallocLinear(const void *instance, RK_U32 size, DWLLinearMem_t * info);
+ void DWLFreeLinear(const void *instance, DWLLinearMem_t * info);
+
+/* D-Cache coherence */
+ void DWLDCacheRangeFlush(const void *instance, DWLLinearMem_t * info); /* NOT in use */
+ void DWLDCacheRangeRefresh(const void *instance, DWLLinearMem_t * info); /* NOT in use */
+
+/* Register access */
+ void DWLWriteReg(const void *instance, RK_U32 offset, RK_U32 value);
+ RK_U32 DWLReadReg(const void *instance, RK_U32 offset);
+
+ void DWLWriteRegAll(const void *instance, const RK_U32 * table, RK_U32 size); /* NOT in use */
+ void DWLReadRegAll(const void *instance, RK_U32 * table, RK_U32 size); /* NOT in use */
+
+/* HW starting/stopping */
+ void DWLEnableHW(const void *instance, RK_U32 offset, RK_U32 value);
+ void DWLDisableHW(const void *instance, RK_U32 offset, RK_U32 value);
+
+/* HW synchronization */
+ RK_S32 VPUWaitHwReady(int socket, RK_U32 timeout);
+
+ RK_S32 DWLWaitHwReady(const void *instance, RK_U32 timeout);
+/* SW/SW shared memory */
+ void *DWLmalloc(RK_U32 n);
+ void DWLfree(void *p);
+ void *DWLcalloc(RK_U32 n, RK_U32 s);
+ void *DWLmemcpy(void *d, const void *s, RK_U32 n);
+ void *DWLmemset(void *d, RK_S32 c, RK_U32 n);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DWL_H__ */
diff --git a/src_dec/inc/jpegdecapi.h b/src_dec/inc/jpegdecapi.h
new file mode 100644
index 0000000..97a979d
--- /dev/null
+++ b/src_dec/inc/jpegdecapi.h
@@ -0,0 +1,238 @@
+/*------------------------------------------------------------------------------
+-- --
+-- This software is confidential and proprietary and may be used --
+-- only as expressly authorized by a licensing agreement from --
+-- --
+-- Hantro Products Oy. --
+-- --
+-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
+-- ALL RIGHTS RESERVED --
+-- --
+-- The entire notice above must be reproduced --
+-- on all copies and should not be removed. --
+-- --
+--------------------------------------------------------------------------------
+--
+-- Description : JPEG decoder header file
+--
+------------------------------------------------------------------------------
+--
+-- Version control information, please leave untouched.
+--
+-- $RCSfile: jpegdecapi.h,v $
+-- $Revision: 1.8 $
+-- $Date: 2008/11/12 12:47:03 $
+--
+------------------------------------------------------------------------------*/
+#ifndef __JPEGDECAPI_H__
+#define __JPEGDECAPI_H__
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*------------------------------------------------------------------------------
+
+ Table of contents
+
+ 1. Include headers
+ 2. External compiler flags
+ 3. Module defines
+ 4. Local function prototypes
+ 5. Functions
+
+------------------------------------------------------------------------------*/
+
+/*------------------------------------------------------------------------------
+ 1. Include headers
+------------------------------------------------------------------------------*/
+#include "vpu_type.h"
+#include "decapicommon.h"
+
+/*------------------------------------------------------------------------------
+ 2. Module defines
+------------------------------------------------------------------------------*/
+#define JPEGDEC_YCbCr400 0x080000U
+#define JPEGDEC_YCbCr420_SEMIPLANAR 0x020001U
+#define JPEGDEC_YCbCr422_SEMIPLANAR 0x010001U
+#define JPEGDEC_YCbCr440 0x010004U
+#define JPEGDEC_YCbCr411_SEMIPLANAR 0x100000U
+#define JPEGDEC_YCbCr444_SEMIPLANAR 0x200000U
+
+#define JPEGDEC_BASELINE 0x0
+#define JPEGDEC_PROGRESSIVE 0x1
+#define JPEGDEC_NONINTERLEAVED 0x2
+
+/*------------------------------------------------------------------------------
+ 3. Data types
+------------------------------------------------------------------------------*/
+
+ typedef void *JpegDecInst;
+
+ typedef enum
+ {
+ JPEGDEC_SLICE_READY = 2,
+ JPEGDEC_FRAME_READY = 1,
+ JPEGDEC_STRM_PROCESSED = 3,
+ JPEGDEC_SCAN_PROCESSED = 4,
+ JPEGDEC_OK = 0,
+ JPEGDEC_ERROR = -1,
+ JPEGDEC_UNSUPPORTED = -2,
+ JPEGDEC_PARAM_ERROR = -3,
+ JPEGDEC_MEMFAIL = -4,
+ JPEGDEC_INITFAIL = -5,
+ JPEGDEC_INVALID_STREAM_LENGTH = -6,
+ JPEGDEC_STRM_ERROR = -7,
+ JPEGDEC_INVALID_INPUT_BUFFER_SIZE = -8,
+ JPEGDEC_HW_RESERVED = -9,
+ JPEGDEC_INCREASE_INPUT_BUFFER = -10,
+ JPEGDEC_SLICE_MODE_UNSUPPORTED = -11,
+ JPEGDEC_DWL_HW_TIMEOUT = -253,
+ JPEGDEC_DWL_ERROR = -254,
+ JPEGDEC_HW_BUS_ERROR = -255,
+ JPEGDEC_SYSTEM_ERROR = -256,
+
+ JPEGDEC_FORMAT_NOT_SUPPORTED = -1000
+ } JpegDecRet;
+
+ enum
+ {
+ JPEGDEC_NO_UNITS = 0, /* No units, X and Y specify
+ * the pixel aspect ratio */
+ JPEGDEC_DOTS_PER_INCH = 1, /* X and Y are dots per inch */
+ JPEGDEC_DOTS_PER_CM = 2 /* X and Y are dots per cm */
+ };
+
+ enum
+ {
+ JPEGDEC_THUMBNAIL_JPEG = 0x10,
+ JPEGDEC_THUMBNAIL_NOT_SUPPORTED_FORMAT = 0x11,
+ JPEGDEC_NO_THUMBNAIL = 0x12,
+ JPEGDEC_THUMBNAIL_EXIF = 0x13
+ };
+
+ enum
+ {
+ JPEGDEC_IMAGE = 0,
+ JPEGDEC_THUMBNAIL = 1
+ };
+
+ typedef struct
+ {
+ RK_U32 *pVirtualAddress;
+ RK_U32 busAddress;
+ } JpegDecLinearMem;
+
+/* Image information */
+ typedef struct
+ {
+ RK_U32 displayWidth;
+ RK_U32 displayHeight;
+ RK_U32 outputWidth; /* Number of pixels/line in the image */
+ RK_U32 outputHeight; /* Number of lines in in the image */
+ RK_U32 version;
+ RK_U32 units;
+ RK_U32 xDensity;
+ RK_U32 yDensity;
+ RK_U32 outputFormat; /* JPEGDEC_YCbCr400
+ * JPEGDEC_YCbCr420
+ * JPEGDEC_YCbCr422
+ */
+ RK_U32 codingMode; /* JPEGDEC_BASELINE
+ * JPEGDEC_PROGRESSIVE
+ * JPEGDEC_NONINTERLEAVED
+ */
+
+ RK_U32 thumbnailType; /* Thumbnail exist or not or not supported */
+ RK_U32 displayWidthThumb;
+ RK_U32 displayHeightThumb;
+ RK_U32 outputWidthThumb; /* Number of pixels/line in the image */
+ RK_U32 outputHeightThumb; /* Number of lines in in the image */
+ RK_U32 outputFormatThumb; /* JPEGDEC_YCbCr400
+ * JPEGDEC_YCbCr420
+ * JPEGDEC_YCbCr422
+ */
+ RK_U32 codingModeThumb; /* JPEGDEC_BASELINE
+ * JPEGDEC_PROGRESSIVE
+ * JPEGDEC_NONINTERLEAVED
+ */
+
+ } JpegDecImageInfo;
+
+/* Decoder input JFIF information */
+ typedef struct
+ {
+ JpegDecLinearMem streamBuffer; /* input stream buffer */
+ RK_U32 streamLength; /* input stream length or buffer size */
+ RK_U32 bufferSize; /* input stream buffer size */
+ RK_U32 decImageType; /* Full image or Thumbnail to be decoded */
+ RK_U32 sliceMbSet; /* slice mode: mcu rows to decode */
+ JpegDecLinearMem pictureBufferY; /* luma output address ==> if user allocated */
+ JpegDecLinearMem pictureBufferCbCr; /* chroma output address ==> if user allocated */
+ JpegDecLinearMem pictureBufferCr; /* chroma output address ==> if user allocated */
+
+ } JpegDecInput;
+
+/* Decoder output */
+ typedef struct
+ {
+ JpegDecLinearMem outputPictureY; /* Pointer to the Luma output image */
+ JpegDecLinearMem outputPictureCbCr; /* Pointer to the Chroma output image */
+ JpegDecLinearMem outputPictureCr; /* Pointer to the Chroma output image */
+
+ } JpegDecOutput;
+
+ typedef struct
+ {
+ RK_U32 major; /* API major version */
+ RK_U32 minor; /* API minor version */
+
+ } JpegDecApiVersion;
+
+ typedef struct
+ {
+ RK_U32 swBuild; /* Software build ID */
+ RK_U32 hwBuild; /* Hardware build ID */
+ DecHwConfig hwConfig; /* hardware supported configuration */
+
+ } JpegDecBuild;
+
+/*------------------------------------------------------------------------------
+ 4. Function prototypes
+------------------------------------------------------------------------------*/
+
+/* Version information */
+ JpegDecApiVersion JpegGetAPIVersion(void);
+
+/* Build information */
+ JpegDecBuild JpegDecGetBuild(void);
+
+/* Initialization */
+ JpegDecRet JpegDecInit(JpegDecInst * pDecInst);
+
+/* Release */
+ void JpegDecRelease(JpegDecInst decInst);
+
+/* Get image information of the JFIF */
+ JpegDecRet JpegDecGetImageInfo(JpegDecInst decInst,
+ JpegDecInput * pDecIn,
+ JpegDecImageInfo * pImageInfo);
+
+/* Decode JFIF */
+ JpegDecRet JpegDecDecode(JpegDecInst decInst,
+ JpegDecInput * pDecIn, JpegDecOutput * pDecOut);
+
+/*------------------------------------------------------------------------------
+ Prototype of the API trace funtion. Traces all API entries and returns.
+ This must be implemented by the application using the decoder API!
+ Argument:
+ string - trace message, a null terminated string
+------------------------------------------------------------------------------*/
+ void JpegDecTrace(const char *string);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif