📄 buffers.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 + -