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

📄 buffers.h

📁 傅立叶变换和小波变换是图像压缩的重要工具。该代大戏是利用小波变换进行图像压缩。
💻 H
字号:
#ifndef BUFFERS_H
#define BUFFERS_H

#include <crblib/inc.h>

//====================================================

typedef struct
{
	int		rowLen,numRows;
	float *	rowMalloc;

	float * rows[16];
	int		rowCenter;

} RowBuffer;

RowBuffer * RowBuffer_Create(int width,int numRows);
void RowBuffer_Init(RowBuffer * tb,int width,int numRows);
void RowBuffer_DeInit(RowBuffer * tb);
void RowBuffer_Destroy(RowBuffer * tb);

float * RowBuffer_Row(RowBuffer * tb, int i);
float * RowBuffer_RawRow(RowBuffer * tb, int i);

void RowBuffer_Clear(RowBuffer * rb,int width);

//====================================================

typedef struct
{
	float	* plane;

	int		width,height,stride; // cur
	int		halfw,halfh;
	float	* untransptr;

} PlaneBuffer;

void PlaneBuffer_Copy(const PlaneBuffer * fm,PlaneBuffer * to);

//====================================================

typedef struct
{
	bool IsPlaneBuffer; //else RowBuffer
	int width,halfh;

	PlaneBuffer PB;
	RowBuffer   RB;

} RowAbstract;

void RowAbstract_Advance(RowAbstract *RA,int count);
float * RowAbstract_Row(RowAbstract *RA,int i);

//====================================================

#endif // BUFFERS_H

⌨️ 快捷键说明

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