?? spihtcoder.h
字號:
// SPIHTCoder.h: interface for the CSPIHTCoder class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_SPIHTCODER_H__861EEFD9_9B24_11D5_B119_5254AB32C4D0__INCLUDED_)
#define AFX_SPIHTCODER_H__861EEFD9_9B24_11D5_B119_5254AB32C4D0__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#pragma optimize("", off)
#include "Matrix2D.h"
#include "LinkList.h"
#include <stdio.h>
#include <math.h>
#define TYPE_A 0 /* binary 0 */
#define TYPE_B 1 /* binary 1 */
#define TO_MEMORY 0/* Write compressed file to memory */
#define TO_DISK 1/* Write compressed file to disk */
#define FROM_MEMORY 0/* Write compressed file to memory */
#define FROM_DISK 1/* Write compressed file to disk */
class CSPIHTCoder
{
public:
void Losslessdecoder(int width, int height, int threshold);
void Losslessencode(ElementType *example, int width, int height);
struct CSPIHTFileInfo
{
LONG lCounts;
BYTE *pFirstByte;//The first of bytes which record real compressed file;
};
void SetImageSize(int x,int y);
int threshold;
int counts;
BOOL stop;
CMatrix2D<ElementType> *MR;
void RefinementPass2(CMatrix2D<ElementType> *m,int threshold);
void SortingPass2(CMatrix2D<ElementType> *m, int threshold);
unsigned long BitCount;
unsigned char inputbyte;
char GetBit();
char * strFileNameOut;
char * strFileNameIn;
void RefinementPass1(CMatrix2D<ElementType> *m,int threshold);
void SortingPass1(CMatrix2D<ElementType> *m, int threshold);
BOOL TestSubset(CMatrix2D<ElementType> *m, int x, int y, int threshold, unsigned char type);
BOOL ZeroTree(CMatrix2D<ElementType> *m, int x, int y, int threshold);
void Initialization();
void DumpBuffer();
void PutBit(char bit);
CLinkList * LIP;
CLinkList *LIS;
CLinkList *LSP;
CSPIHTFileInfo CompressedFileInfo;
unsigned int zeroes, ones;
unsigned char outputbyte, mask;
FILE * SPIHTFile;
CMatrix2D<ElementType>* M;
int nXDim;
int nYDim;
CSPIHTCoder();
virtual ~CSPIHTCoder();
private:
protected:
LPVOID lpMeta;
CLinkList::ListElement* pNewlyAppended;
};
#pragma optimize("", on)
#endif // !defined(AFX_SPIHTCODER_H__861EEFD9_9B24_11D5_B119_5254AB32C4D0__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -