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

📄 dct.h

📁 可以选择各种压缩方式对读入的图像进行压缩和解压
💻 H
字号:
#include <math.h>
#include <malloc.h>
#include <stdlib.h>
#include <stdio.h>
#include "types.h"

blstype dctqt(ptype **P,unsigned int width, unsigned int height, 
        btype  (*(&Q))[8][8], int mode, int level, bool adaptor, btype QTable[8][8]);

int	idctqt(btype Q[][8][8],  ptype ** (&P), unsigned int height, unsigned int width,
			   int mode, btype QTable[8][8]);

void modifyQTable(double dct[][8][8], blstype N, btype QTable[8][8]);
blstype DivisionFdct(ptype **a, unsigned int width, unsigned int height, 
                            double  (* (&Dct))[8][8]);
void AcdseeTable(btype QTable[8][8],int n);
void mode2table(int mode, int level, btype QTable[8][8]);
void Quantization(double Dct[][8][8], btype QuanTable[][8][8], 
     btype QTable[8][8], blstype NM);
void HistQuan(double va[][8][8],btype vb[][8][8],blstype NM,int grade);

void Fdct(btype va[][8],double vb[][8]);
void Idct(double va[8][8],ptype vb[][8]);
 
void Histogram(double va[][8],btype vb[][8],int grade);










////blstype Quantization(btype QuanTable[][8][8],int row,int column,short int *a);
////a:指向图像数据的起始地址的指针;QuanTable:返回量化后的数据;row:图像的行数;column:图像的列数
//blstype Quantization(ptype **a, unsigned int width, unsigned int height, btype (**QuanTable)[8][8], btype QTable[8][8]);
//
//
////void IQuantization(short int *IQuanTable,btype a[][8][8], int row, int column);
////a:图像量化后的数据;IQuanTable:指向图像反量化后数据的起始地址;row:图像的行数;column:图像的列数
//int IQuantization(ptype ***P,  btype a[][8][8], unsigned int height, unsigned int width, btype QTable[8][8]);
//void Fdct(btype va[][8],double vb[][8]);
////va:数据;vb:DCT系数
//void Idct(double va[8][8], ptype vb[][8]);
// //va:DCT系数;vb:数据

//blstype dctqt(ptype **P,unsigned int width, unsigned int height,
//			  btype & (*Q)[8][8], int mode, int level, bool adapornot); //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//
//void	idctqt(btype Q2[][8][8], blstype n, ptype & **P2, unsigned int height, unsigned int width,
//			   int mode, int level, bool adapornot);
//



//void mode2table(int mode, bool adapt, ptype **P, btype QTable[8][8]);
//
//BOOL Quantization(double (*Dct)[8][8], btype (*QuanTable)[8][8], btype QTable[8][8], blstype NM);
//BOOL DivisionFdct(ptype **a, unsigned int width, unsigned int height, double (*Dct)[8][8], blstype &NM);
//BOOL IQuantization(btype (*QuanTable)[8][8], double (*Dct)[8][8], btype QTable[8][8], blstype NM);
//BOOL IdctCombination(double (*Dct)[8][8], ptype **a, unsigned int width, unsigned int height);
//
//void Histogram(double va[][8],btype vb[][8],int grade=6);
//void HistQuan(double va[][8][8],btype (*vb)[8][8],blstype NM,int grade=6);
//void HistIQuan(double va[][8][8],btype (*vb)[8][8],blstype NM);
//
//void AcdseeTable(btype QTable[8][8],int n=101);
//max and min data of QTable are 151 and 1; if n>100 or n<0 or n is not input,JPEG table selected

⌨️ 快捷键说明

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