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

📄 jpeglib.h

📁 基于Linux的ffmepg decoder
💻 H
📖 第 1 页 / 共 4 页
字号:
/* Data destination object for compression */struct jpeg_destination_mgr {  JOCTET * next_output_byte;	/* => next byte to write in buffer */  unsigned int * next_output_word;	/* => next word to write in buffer */									//pwhsu++:20040112  size_t free_in_buffer;	/* # of byte spaces remaining in buffer *///  JMETHOD(void, init_destination, (j_compress_ptr cinfo));  //JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo));//  JMETHOD(void, term_destination, (j_compress_ptr cinfo));};/* Data source object for decompression */#if 0struct jpeg_source_mgr {  const JOCTET * next_input_byte; /* => next byte to read from buffer */  size_t bytes_in_buffer;	/* # of bytes remaining in buffer *///  JMETHOD(void, init_source, (j_decompress_ptr cinfo));//  JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo));//  JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes));//  JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired));//  JMETHOD(void, term_source, (j_decompress_ptr cinfo));};#endif/* Memory manager object. * Allocates "small" objects (a few K total), "large" objects (tens of K), * and "really big" objects (virtual arrays with backing store if needed). * The memory manager does not allow individual objects to be freed; rather, * each created object is assigned to a pool, and whole pools can be freed * at once.  This is faster and more convenient than remembering exactly what * to free, especially where malloc()/free() are not too speedy. * NB: alloc routines never return NULL.  They exit to error_exit if not * successful. */#define JPOOL_PERMANENT	0	/* lasts until master record is destroyed */#define JPOOL_IMAGE	1	/* lasts until done with image/datastream */#define JPOOL_NUMPOOLS	2typedef struct jvirt_sarray_control * jvirt_sarray_ptr;typedef struct jvirt_barray_control * jvirt_barray_ptr;struct jpeg_memory_mgr {  /* Method pointers */  JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id,				size_t sizeofobject));  JMETHOD(void FAR *, alloc_large, (j_common_ptr cinfo, int pool_id,				     size_t sizeofobject));  JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo, int pool_id,				     JDIMENSION samplesperrow,				     JDIMENSION numrows));  JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id,				      JDIMENSION blocksperrow,				      JDIMENSION numrows));  /*  JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo,						  int pool_id,						  boolean pre_zero,						  JDIMENSION samplesperrow,						  JDIMENSION numrows,						  JDIMENSION maxaccess));  JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo,						  int pool_id,						  boolean pre_zero,						  JDIMENSION blocksperrow,						  JDIMENSION numrows,						  JDIMENSION maxaccess));  */  JMETHOD(void, realize_virt_arrays, (j_common_ptr cinfo));/*  JMETHOD(JSAMPARRAY, access_virt_sarray, (j_common_ptr cinfo,					   jvirt_sarray_ptr ptr,					   JDIMENSION start_row,					   JDIMENSION num_rows,					   boolean writable));  JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo,					    jvirt_barray_ptr ptr,					    JDIMENSION start_row,					    JDIMENSION num_rows,					    boolean writable));*/  JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id));  JMETHOD(void, self_destruct, (j_common_ptr cinfo));  /* Limit on memory allocation for this JPEG object.  (Note that this is   * merely advisory, not a guaranteed maximum; it only affects the space   * used for virtual-array buffers.)  May be changed by outer application   * after creating the JPEG object.   */  long max_memory_to_use;  /* Maximum allocation request accepted by alloc_large. */  long max_alloc_chunk;};//pwhsu++:20031020struct Compress_recon{		//pixel buffer	unsigned char PixelBuf[2][10][DCTSIZE2]; //internal MCU pixel buffer	//Quant table	UINT16 Inter_quant[4][DCTSIZE2]; //quant table		int Dma_bnum;  //Chage the internal mem for DMA pipeline	int Coef_bnum; //Chage the internal mem for COEF pipeline	int mcublkn;	int MCUnum;    //Total MCU number of the image   		int nCount;     //Count the MCU number for pipeline	};//typedef struct Compress_recon * Comp_recon_ptr;extern struct Compress_recon rinfo; //pwhsu++:20031020//---------------------------------------------//extern unsigned int *DMA_COMMAND_system;extern unsigned int *DMA_COMMAND_system_phy;extern unsigned int *outbitstr;typedef struct{  unsigned int *SMaddr;  unsigned int *LMaddr;  unsigned int BlkWidth;  unsigned int Control;  unsigned int CCA;  unsigned int Status;  unsigned int Cnt;}MDMA;extern unsigned int mcctrl;			//pwhsu++:20040109extern unsigned int *pbufaddr;		//pwhsu++:20040109#define AHB_interface//#define FPGA_demotypedef enum {	JCS_yuv420,		//0	JCS_yuv422,	    //1	JCS_yuv211,		//2	JCS_yuv333,		//3	JCS_yuv222,		//4	JCS_yuv111		//5} JCS_YUV;//yuv420 =0//yuv422 =1//yuv211 =2//yuv333 =3//yuv222 =4//yuv111 =5extern unsigned int YUVsampling ;//extern unsigned int img_qual ;		//usually set 75 < qual <100, if qual<50 the quality of image is very pool//extern unsigned int rst_interval ;	//default value is 0//extern unsigned int img_width ;//extern unsigned int img_height ;//extern unsigned int comp_num;extern unsigned int qtbl_no;extern unsigned int hufftbl_no;extern unsigned int comp_width[3];extern unsigned int mcu_height[3];//extern unsigned int comp_ptr[3];//pwhsu++:20040119extern int h_sampf[3];extern int v_sampf[3];extern int cMCUrow;#if 0#ifdef AHB_interface	#define BASE_ADDRESS		0x90700000#else	#define BASE_ADDRESS		0x1000000#endif#endif	extern unsigned int BASE_ADDRESS;	#define MDMA1 ((volatile MDMA *)(0x10400 + BASE_ADDRESS))#if 1	#define MECTL		(0x10000 + BASE_ADDRESS)	#define minSAD		(0x1000c + BASE_ADDRESS)	#define CMDADDR		(0x10010 + BASE_ADDRESS)	#define MECADDR		(0x10014 + BASE_ADDRESS)	#define HOFFSET		(0x10018 + BASE_ADDRESS)	#define ACDCPAR		(0x10040 + BASE_ADDRESS)	#define CURDEV		(0x10048 + BASE_ADDRESS)	#define MBIDX		(0x10054 + BASE_ADDRESS)	#define MCIADDR		(0x10058 + BASE_ADDRESS)	#define VOP0			(0x10060 + BASE_ADDRESS)	#define VOP1			(0x10064 + BASE_ADDRESS)	#define MVD0			(0x10068 + BASE_ADDRESS)	#define TOADR		(0x10070 + BASE_ADDRESS)	#define INCTL			(0x1007c + BASE_ADDRESS)				#define MCUBR		(0x10008 + BASE_ADDRESS)	#define MCCTL		(0x1001c + BASE_ADDRESS)	#define MCCADDR		(0x10020 + BASE_ADDRESS)	#define CPSTS		(0x10028 + BASE_ADDRESS)	#define MCUTIR		(0x1002c + BASE_ADDRESS)	#define PYDCR		(0x10030 + BASE_ADDRESS)	#define PUVDCR		(0x10034 + BASE_ADDRESS)	#define QAR			(0x10038 + BASE_ADDRESS)	#define CKR			(0x1003c + BASE_ADDRESS)	#define VADR			(0x10044 + BASE_ADDRESS)	#define BADR			(0x1004c + BASE_ADDRESS)	#define BALR			(0x10050 + BASE_ADDRESS)	#define VLDCTL		(0x1005c + BASE_ADDRESS)	#define VLASTWORD	(0x1006c + BASE_ADDRESS)	#define VLDSTS		(0x10074 + BASE_ADDRESS)	#define ABADR		(0x10078 + BASE_ADDRESS)	#define SET_MCUBR(v)		(*((volatile unsigned int *)MCUBR) =v)	#define SET_MCCTL(v)		(*((volatile unsigned int *)MCCTL) =v)	#define SET_MCCADDR(v)	(*((volatile unsigned int *)MCCADDR) =v)	#define SET_CPSTS(v)		(*((volatile unsigned int *)CPSTS) =v)	#define SET_MCUTIR(v)		(*((volatile unsigned int *)MCUTIR) =v)	#define	SET_PYDCR(v)		(*((volatile unsigned int *)PYDCR) =v)	#define SET_PUVDCR(v)	(*((volatile unsigned int *)PUVDCR) =v)	#define SET_QAR(v)		(*((volatile unsigned int *)QAR) =v)	#define SET_CKR(v)		(*((volatile unsigned int *)CKR) =v)	#define SET_VADR(v)		(*((volatile unsigned int *)VADR) =v)	#define SET_BADR(v)		(*((volatile unsigned int *)BADR) =v)	#define SET_BALR(v)		(*((volatile unsigned int *)BALR) =v)	#define SET_VLDCTL(v)		(*((volatile unsigned int *)VLDCTL) =v)	#define SET_ABADR(v)		(*((volatile unsigned int *)ABADR) =v)	#define READ_VADR(v)		(v = *((volatile unsigned int *)VADR))	#define READ_BADR(v)		(v = *((volatile unsigned int *)BADR))	#define READ_CPSTS(v)		(v = *((volatile unsigned int *)CPSTS))	#define READ_BALR(v)		(v = *((volatile unsigned int *)BALR))	#define READ_VLASTWORD(v)	(v = *((volatile unsigned int *)VLASTWORD))	#define READ_VLDSTS(v)		(v = *((volatile unsigned int *)VLDSTS))	#define READ_ABADR(v)		(v = *((volatile unsigned int *)ABADR))#else	static volatile unsigned long *MECTL		= (0x10000 + BASE_ADDRESS);//	static volatile unsigned long *lambda		= (0x10008 + BASE_ADDRESS);	static volatile unsigned long *minSAD		= (0x1000c + BASE_ADDRESS);	static volatile unsigned long *CMDADDR		= (0x10010 + BASE_ADDRESS);	static volatile unsigned long *MECADDR		= (0x10014 + BASE_ADDRESS);	static volatile unsigned long *HOFFSET		= (0x10018 + BASE_ADDRESS);//	static volatile unsigned long *MCCTL		= (0x1001c + BASE_ADDRESS);//	static volatile unsigned long *MCCADDR		= (0x10020 + BASE_ADDRESS);//	static volatile unsigned long *CPSTS		= (0x10028 + BASE_ADDRESS);//	static volatile unsigned long *QCR0		= (0x1002c + BASE_ADDRESS);//	static volatile unsigned long *QCR1		= (0x10030 + BASE_ADDRESS);//	static volatile unsigned long *QCR2		= (0x10034 + BASE_ADDRESS);	//	static volatile unsigned long *QAR		= (0x10038 + BASE_ADDRESS);//	static volatile unsigned long *CKR		= (0x1003c + BASE_ADDRESS);	static volatile unsigned long *ACDCPAR		= (0x10040 + BASE_ADDRESS);//	static volatile unsigned long *VADR		= (0x10044 + BASE_ADDRESS);	static volatile unsigned long *CURDEV		= (0x10048 + BASE_ADDRESS);//	static volatile unsigned long *BITDATA		= (0x1004c + BASE_ADDRESS);//	static volatile unsigned long *BITLEN		= (0x10050 + BASE_ADDRESS);	static volatile unsigned long *MBIDX		= (0x10054 + BASE_ADDRESS);	static volatile unsigned long *MCIADDR		= (0x10058 + BASE_ADDRESS);//	static volatile unsigned long *VLDCTL		= (0x1005c + BASE_ADDRESS);	static volatile unsigned long *VOP0		= (0x10060 + BASE_ADDRESS);	static volatile unsigned long *VOP1		= (0x10064 + BASE_ADDRESS);	static volatile unsigned long *MVD0		= (0x10068 + BASE_ADDRESS);//	static volatile unsigned long *MVD1		= (0x1006c + BASE_ADDRESS);	static volatile unsigned long *TOADR		= (0x10070 + BASE_ADDRESS);//	static volatile unsigned long *VLDSTS		= (0x10074 + BASE_ADDRESS);//	static volatile unsigned long *ASADR		= (0x10078 + BASE_ADDRESS);	static volatile unsigned long *INCTL		= (0x1007c + BASE_ADDRESS);				static volatile unsigned long *MCUBR	= (0x10008 + BASE_ADDRESS);	static volatile unsigned long *MCCTL	= (0x1001c + BASE_ADDRESS);	static volatile unsigned long *MCCADDR	= (0x10020 + BASE_ADDRESS);	static volatile unsigned long *CPSTS	= (0x10028 + BASE_ADDRESS);	static volatile unsigned long *MCUTIR	= (0x1002c + BASE_ADDRESS);	static volatile unsigned long *PYDCR	= (0x10030 + BASE_ADDRESS);	static volatile unsigned long *PUVDCR	= (0x10034 + BASE_ADDRESS);	static volatile unsigned long *QAR		= (0x10038 + BASE_ADDRESS);	static volatile unsigned long *CKR		= (0x1003c + BASE_ADDRESS);	static volatile unsigned long *VADR		= (0x10044 + BASE_ADDRESS);	static volatile unsigned long *BADR		= (0x1004c + BASE_ADDRESS);	static volatile unsigned long *BALR		= (0x10050 + BASE_ADDRESS);	static volatile unsigned long *VLDCTL	= (0x1005c + BASE_ADDRESS);	static volatile unsigned long *VLASTWORD= (0x1006c + BASE_ADDRESS);	static volatile unsigned long *VLDSTS	= (0x10074 + BASE_ADDRESS);	static volatile unsigned long *ABADR	= (0x10078 + BASE_ADDRESS);	#define SET_MCUBR(v)		STR	v, [MCUBR]		#define SET_MCCTL(v)		STR	v, [MCCTL]	#define SET_MCCADDR(v)		STR	v, [MCCADDR]	#define SET_CPSTS(v)		STR	v, [CPSTS]	#define SET_MCUTIR(v)		STR	v, [MCUTIR]	#define	SET_PYDCR(v)		STR	v, [PYDCR]	#define SET_PUVDCR(v)		STR	v, [PUVDCR]	#define SET_QAR(v)			STR	v, [QAR]	#define SET_CKR(v)			STR	v, [CKR]	#define SET_VADR(v)			STR	v, [VADR]	#define SET_BADR(v)			STR	v, [BADR]	#define SET_BALR(v)			STR	v, [BALR]	#define SET_VLDCTL(v)		STR	v, [VLDCTL]	#define SET_ABADR(v)		STR	v, [ABADR]	#define READ_VADR(v)		LDR v, [VADR]	#define READ_BADR(v)		LDR v, [BADR]	#define READ_CPSTS(v)		LDR v, [CPSTS]	#define READ_BALR(v)		LDR v, [BALR]	#define READ_VLASTWORD(v)	LDR v, [VLASTWORD]	#define READ_VLDSTS(v)		LDR v, [VLDSTS]	//ABF clean	#define READ_ABADR(v)		LDR v, [ABADR]	#endif		#define VPE 		0x90180000	extern unsigned int outfsize;		//extern unsigned char* cury;//extern unsigned char* curu;//extern unsigned char* curv;	extern unsigned char* curdata[3];extern unsigned int sreg;extern unsigned int dmactrl;/* write n bits to bitstream */static void __inlineBitstreamPutBits(unsigned int value,unsigned int size){	SET_BADR(value);	SET_BALR(size);}extern unsigned int vldreg;	  //pwhsu++:20040218extern unsigned int lmadr;	//pwhsu++:20040219extern unsigned int smadr;	//pwhsu++:20040219extern unsigned int bitslen; //pwhsu++:20040219	  

⌨️ 快捷键说明

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