buffers.h
来自「傅立叶变换和小波变换是图像压缩的重要工具。该代大戏是利用小波变换进行图像压缩。」· C头文件 代码 · 共 61 行
H
61 行
#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 + =
减小字号Ctrl + -
显示快捷键?