📄 bw.h
字号:
/*------------------------------------------------------------------------
$Workfile: BW.H $
$Date: 12/10/96 6:17p $
$Revision: 6 $
* Purpose:
* Header for Bin Width Calculator.
* Notes:
*
$History: BW.H $
*
* ***************** Version 6 *****************
* User: Az Date: 12/10/96 Time: 6:17p
* Updated in $/601cman
* Added isrnum to BWCinput (for debugging).
*
* ***************** Version 5 *****************
* User: Az Date: 12/10/96 Time: 4:03p
* Updated in $/601cman
* Added special_effects_p field in BWCinit structure.
*
* ***************** Version 4 *****************
* User: Az Date: 12/10/96 Time: 1:16p
* Updated in $/601cman
* Change interface to accomodate Scene Detection function.
*
* ***************** Version 3 *****************
* User: Stevel Date: 10/03/96 Time: 2:18p
* Updated in $/601cman
* Merge with ICM project.
*
* ***************** Version 2 *****************
* User: Stevel Date: 3/11/96 Time: 12:50p
* Updated in $/601cman
* Add DLLEXPORT keyword to export functions for diagnostic test
*
* ***************** Version 1 *****************
* User: Stevel Date: 3/06/96 Time: 7:54p
* Created in $/601cman
* Initial release
This code and information is provided "as is" without warranty of any
kind, either expressed or implied, including but not limited to the
implied warranties of merchantability and/or fitness for a particular
purpose.
1996 Analog Devices, Inc.
-------------------------------------------------------------------------*/
#ifndef BW_H
#define BW_H
// Need to define SOFTCODEC To build ICM (ADV601.DLL)
#ifdef SOFTCODEC
#define DLLEXPORT
#else
#define DLLEXPORT __declspec(dllexport)
#endif
#ifndef real
#define real float
#endif
#ifndef NBLOCKS
#define NBLOCKS 42
#endif
typedef enum {GENERAL, NATURAL, SYNTHETIC} IMAGE_TYPE;
/* Currently (7/18/96) only SumOfSq is used.
The rest are for future upgrades */
typedef struct {
unsigned short SumOfSq[NBLOCKS];
real AlphaGain[NBLOCKS];
real BetaGain[NBLOCKS];
short SumValue[NBLOCKS];
short MaxValue[3];
short MinValue[3];
real OldBp;
int isrnum;
} BWCinput;
/* FieldDecim is not currently (7/18/96) used */
typedef struct {
unsigned short BWCoeff [NBLOCKS]; /* Bin Widths */
unsigned short RBWCoeff [NBLOCKS]; /* Reciprocals of BWCoeff */
unsigned short FieldDecim;
int scene_change_p; /* boolean */
} BWCoutput;
/* The BWCinit structure is filled for each compression session */
typedef struct {
unsigned short ImageWidth;
unsigned short ImageHeight;
real Bpp; /* Bits Per Pixel: required bit rate */
IMAGE_TYPE ImgType;
int scene_detection_p; /* boolean */
int special_effects_p; /* True if special effects are used. */
/* In this case the FEEDBACK MUST BE DISABLED */
} BWCinit;
typedef struct {
real BppFeedbackParm[2]; /* Not currently in use (7/18/96) */
real BppPrecision; /* Relative Precision for Bpp Estimation */
real MinBW[NBLOCKS]; /* Minimal Bin Widths, not used */
real MaxBW[NBLOCKS]; /* Maximum Bin Widths, not used */
void *PMModel; /* not used */
real FDecimThresh[12]; /* not used */
real MaxQVal2Inv; /* inverse of max. square of quantized value */
} BWCconfig;
///////////////////////////////////////////////////////////////////////////
// Exported Bin Width Calculator function prototypes
///////////////////////////////////////////////////////////////////////////
DLLEXPORT extern void bw_init (BWCinit *);
DLLEXPORT extern void bw_config ();
DLLEXPORT extern void bw_compute (BWCinput*, BWCoutput*);
#endif /*BW_H*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -