www.pudn.com > nandflash_1G08U0A.rar > PACKPCM.H


/* 
 * packpcm.h 
 *   
 * Ver0.10 98/ 9/25 H.Matsuoka  Start 
 * Ver0.20 99/02/18 H.Matsuoka  Modify packpcmParams 
 * 
 */ 
 
#ifndef PACKPCM_H 
#define PACKPCM_H 
 
 
/* 
 *  PACKPCM data format 
 *  
 *  <-PACKPCM_HEADER_SIZE-> 
 *  +-------+-----+------+        +------------+ 
 *  |FILE_ID|size |offset|        |PPC     code| 
 *  +-------+-----+------+        +------------+ 
 *    1byte    4   4      <------>  
 *                                offset   
 *                                (byte)   
 */ 
 
#define PACKPCM_FILE_ID     (0x50)  /* 'P' */ 
#define PACKPCM_HEADER_SIZE (0x9) 
 
typedef struct 
{ 
    long          ppc_code_size;    
    long          ppc_code_offset;   
} packpcmParams; 
 
 
extern int packpcmWriteHeader (packpcmParams* ,int, unsigned char*); 
extern int packpcmReadHeader (unsigned char*, packpcmParams*); 
extern int packpcmInit(packpcmParams *, int); 
extern int packpcmDecode(unsigned char *, short *); 
extern int packpcmEncode(short *, int, unsigned char *); 
 
 
#endif  /* ADPCM_H */