www.pudn.com > bladeenc-0.90.0-src.zip > encoder.h
/*
(c) Copyright 1998, 1999 - Tord Jansson
=======================================
This file is part of the BladeEnc MP3 Encoder, based on
ISO's reference code for MPEG Layer 3 compression, and might
contain smaller or larger sections that are directly taken
from ISO's reference code.
All changes to the ISO reference code herein are either
copyrighted by Tord Jansson (tord.jansson@swipnet.se)
or sublicensed to Tord Jansson by a third party.
BladeEnc is free software; you can redistribute this file
and/or modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
*/
#ifndef ENCODER_DOT_H
#define ENCODER_DOT_H
/***********************************************************************
*
* Encoder Definitions
*
***********************************************************************/
/* General Definitions */
/* Psychacoustic Model 1 Definitions */
#define CB_FRACTION 0.33
#define MAX_SNR 1000
#define NOISE 10
#define TONE 20
#define DBMIN -200.0
#define LAST -1
#define STOP -100
#define POWERNORM 90.3090 /* = 20 * log10(32768) to normalize */
/* max output power to 96 dB per spec */
/* Psychoacoustic Model 2 Definitions */
#define LOGBLKSIZE 10
#define BLKSIZE 1024
#define HBLKSIZE 513
#define CBANDS 63
#define LXMIN 32.0
/***********************************************************************
*
* Encoder Type Definitions
*
***********************************************************************/
/* Psychoacoustic Model 1 Type Definitions */
typedef int IFFT2[FFT_SIZE/2];
typedef int IFFT[FFT_SIZE];
typedef double D9[9];
typedef double D10[10];
typedef double D640[640];
typedef double D1408[1408];
typedef double DFFT2[FFT_SIZE/2];
typedef double DFFT[FFT_SIZE];
typedef double DSBL[SBLIMIT];
typedef double D2SBL[2][SBLIMIT];
typedef struct {
int line;
double bark, hear, x;
} g_thres, *g_ptr;
typedef struct {
double x;
int type, next, map;
} mask, *mask_ptr;
/* Psychoacoustic Model 2 Type Definitions */
typedef int ICB[CBANDS];
typedef int IHBLK[HBLKSIZE];
typedef FLOAT F32[32];
typedef FLOAT F2_32[2][32];
typedef FLOAT FCB[CBANDS];
typedef FLOAT FCBCB[CBANDS][CBANDS];
typedef FLOAT FBLK[BLKSIZE];
typedef FLOAT FHBLK[HBLKSIZE];
typedef FLOAT F2HBLK[2][HBLKSIZE];
typedef FLOAT F22HBLK[2][2][HBLKSIZE];
typedef double DCB[CBANDS];
/***********************************************************************
*
* Encoder Function Prototype Declarations
*
***********************************************************************/
/* The following functions are in the file "subs.c" */
extern void fft(FLOAT[BLKSIZE], FLOAT[BLKSIZE], FLOAT[BLKSIZE],
FLOAT[BLKSIZE], int );
void windowFilterSubband( short * pBuffer, int k, double s[SBLIMIT] );
void initWindowFilterSubband( void );
#endif