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

📄 bmp2jpg.c

📁 source codes jpeg_vhdl
💻 C
字号:
#include <stdio.h>#include "ejpgl.h"extern INFOHEADER *bmpheader;signed char pixelmatrix[MACRO_BLOCK_SIZE][MACRO_BLOCK_SIZE*3];signed char YMatrix[MATRIX_SIZE][MATRIX_SIZE];signed char CrMatrix[MATRIX_SIZE][MATRIX_SIZE];signed char CbMatrix[MATRIX_SIZE][MATRIX_SIZE];int main(int argc, char* argv[]){	int compression,sample;	unsigned int col, cols, row, rows;  	openBMPJPG(argc, argv[1], argv[2]); 	rows = bmpheader->height>>4;       cols = bmpheader->width>>4;	dct_init_start();	zzq_encode_init_start(compression);	vlc_init_start();				        for (row = 0; row < rows; row++) {      		for (col = 0; col < cols; col++) {			get_MB(row, col, pixelmatrix);			for(sample=0;sample<5;sample++) {				if(sample<4) {					RGB2YCrCb(pixelmatrix,YMatrix,CrMatrix,CbMatrix,sample);  							dct(YMatrix,0);				} else {					dct(CrMatrix,1);										dct(CbMatrix,2);										}			}		}         }		dct_stop_done();	zzq_encode_stop_done();	vlc_stop_done();	closeBMPJPG();	return 0;	}

⌨️ 快捷键说明

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