⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jpeg_api_common.h

📁 ADI blackfin DSP的基于device friver的jpeg压缩算法
💻 H
字号:
/*****************************************************************************
Copyright(c) 2005 Analog Devices, Inc.  All Rights Reserved. This software is 
proprietary and confidential to Analog Devices, Inc. and its licensors.
******************************************************************************

$RCSfile: JPEG_api_common.h,v $
$Revision: 1.1 $
$Date: 2006/07/17 07:18:18 $

Project:	JPEG IMAGE CODEC
Title:		Common header file
Author(s):	A.S
Revised by: 

Description:
API Declarations for JPEG Encoder and Decoder Libraries

References:
	
******************************************************************************
Tab Setting:			4
Target Processor:		Blackfin
Target Tools Revision:	ccblkfn		C/C++ compiler					6.3.0.0
						easmblkfn	BlackFin assembler				2.2.4.1
						elfar		ELF Librarian/Archive Utility	4.4.1.2
						linker		Linker							2.8.8.2
******************************************************************************

Modification History:
====================
$Log: JPEG_api_common.h,v $
Revision 1.1  2006/07/17 07:18:18  bmk
JPEG-MJPEG User access files


******************************************************************************/

#ifndef JPEG_API_COMMON_H
#define JPEG_API_COMMON_H

#include "IMG_common.h"
#include "JPEG_Struct.h"


/****************************************************************************
 * 		Typedefs/Enumerations												*
 ****************************************************************************/

/* JPEG Image parameters */
typedef struct
{
    /* Encoder and Decoder: */
									/* The image frame is in multiples of 8x8 blocks */
	int32		height;				/* Height of the Image Frame (pixels) */
	int32		width;				/* Width of the Image Frame (pixels) */
    int32		codingType;     	/* Format of the image : baseline, lossless etc */
    int32		frameFormat;    	/* eg. 444 or 422 or 420 or 400 */

    unsigned char   *inputBuffer;   /* Address of input bit stream buffer */
    unsigned char   *outputBuffer;  /* Address of output image buffer */

    /* Encoder only: */
    int         precision;          /* 8 bits; not externally modifiable */
    int         qualityFactor;      /* Encoding quality (0 to 100%) */
    int         threshold;          /* 1 for adaptive encoding; 0 otherwise */  
    
									/* The image can be any size within the image frame */
	int32		actualHeight;		/* Height of the image (pixels) within the image frame */
	int32		actualWidth;		/* Width of the image (pixels) within the image Frame */
}tJpegParam;


/* JPEG Configuration Parameters */
typedef enum{
	JPEG_FRAME_WIDTH,   /* Maximum dimension value in horizontal direction. */
	JPEG_FRAME_HEIGHT,  /* Maximum dimension value in vertical direction. */
	JPEG_IMAGEFORMAT,      /* 1 for YUV4:2:0, 2 for YUV 4:2:2, 3 for YUV 4:4:4, 4 for YUV 4:0:0 and 5 for RGB 24. */
	
	JPEG_QUALITYFACTOR,    /* Quality of encoding: 1 (worst quality) to 100 (best) */
	JPEG_ENCODINGMODE,     /* SEQUENTIAL for sequential (baseline); PROGRESSIVE for progressive encoding */
	JPEG_THRESHOLD,        /* Adaptive thresholding on (1) or off (0), only in sequential encoding mode */
	
	JPEG_POINTER_INPUT,    /* Address of input image frame */
	JPEG_POINTER_OUTPUT,   /* Address of encoded output */

	JPEG_IMAGE_WIDTH,  /* Actual width dimension of the image, excludes padding. */
	JPEG_IMAGE_HEIGHT  /* Actual height dimension of the image, excludes padding. */

} JPEG_config;

/* MCU Buffer Configuration items to pass to JPEG_McuBuffer_CONFIG() */
typedef enum{
    MCU_POINTER_C1,     /* Address of Lum or R component data for the given image format and size */
    MCU_POINTER_C2,     /* Address of Cr or G component data for the given image format and size */
    MCU_POINTER_C3,     /* Address of Cb or B component data for the given image format and size */
    MCU_FRAME_WIDTH,            /* Height of padded frame */
    MCU_FRAME_HEIGHT,           /* Width of padded frame */
    MCU_IMAGE_FORMAT,           /* Image format (YUV420, YUV422, YUV444, RGB or MONOCHROME */
    MCU_ORIGINAL_FRAME_WIDTH,   /* Original height of frame (before padding) */
    MCU_ORIGINAL_FRAME_HEIGHT,  /* Original width of frame (before padding) */
    MCU_ENCODING_MODE,          /* Encoding mode (SEQUENTIAL, PROGRESSIVE or LOSSLESS) */
    MCU_ENCODER,                /* Set to 1 if this is an encoder; 0 for a decoder */
    MCU_COMP_FRAME              /* Frame position */
} eMcu_config;


/* Bits Buffer Configuration items to pass to JPEG_BitsBuffer_CONFIG() */
typedef enum{
    BITSBUF_POINTER,         /* Address of buffer to write bitstream to */
    BITSBUF_ENCODER          /* Set to 1 if this is an encoder; 0 for a decoder */
} eBitsBuf_config;

/****************************************************************************
 * 		Function Declarations												*
 ****************************************************************************/

extern int      JPEG_Param_CONFIG(tJpegParam *param, JPEG_config item, unsigned int value);
extern int      JPEG_Param_STATUS(tJpegParam *param, JPEG_config item, unsigned int *value);
extern int	JPEG_Param_INIT(tJpegParam *param);

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -