www.pudn.com > av3dec_20050318.zip > av3dec.h
/* *********************************************************************** * COPYRIGHT AND WARRANTY INFORMATION * * Copyright 2004, Audio Video Coding Standard, Part III * * This software module was originally developed by * edited by * * DISCLAIMER OF WARRANTY * * These software programs are available to the users without any * license fee or royalty on an "as is" basis. The AVS disclaims * any and all warranties, whether express, implied, or statutory, * including any implied warranties of merchantability or of fitness * for a particular purpose. In no event shall the contributors or * the AVS be liable for any incidental, punitive, or consequential * damages of any kind whatsoever arising from the use of this program. * * This disclaimer of warranty extends to the user of this program * and user's customers, employees, agents, transferees, successors, * and assigns. * * The AVS does not represent or warrant that the program furnished * hereunder are free of infringement of any third-party patents. * Commercial implementations of AVS, including shareware, may be * subject to royalty fees to patent holders. Information regarding * the AVS patent policy is available from the AVS Web site at * http://www.avs.org.cn * * THIS IS NOT A GRANT OF PATENT RIGHTS - SEE THE AVS PATENT POLICY. ************************************************************************ */ #ifndef AV3DEC_H #define AV3DEC_H #include#include #include "common.h" #ifdef __cplusplus extern "C" { #endif ///////////////////////////////////////////// /// macro definition // ///////////////////////////////////////////// #define AV3_AUDIO_VERSION "1.0 " /* object types for av3 */ #define AV3_MAIN_LEVEL 1 #define AV3_BASIC_LEVEL 2 /* av3 header type definition*/ #define AV3_HEAD_DEFAULT 0 /* library output formats */ #define AV3_PCM_16BIT 1 #define AV3_PCM_24BIT 2 #define AV3_PCM_32BIT 3 #define AV3_PCM_FLOAT 4 /* at least AV3DEC_MIN_IBUFSIZE bytes per decoded channel should be available */ #define AV3DEC_MIN_IBUFSIZE 768 #define MAX_CHANNELS 8 #define ONLY_LONG_SEQUENCE 0x0 #define LONG_START_SEQUENCE 0x1 #define EIGHT_SHORT_SEQUENCE 0x2 #define LONG_STOP_SEQUENCE 0x3 typedef struct AV3DecConfiguration { unsigned char av3ObjectType; unsigned char header_type; unsigned long defSampleRate; //default sample rate unsigned char outputFormat; unsigned char pcmFormat; /*the output pcm data format*/ int dec_target; //decoding bitrate } AV3DecCfg, *AV3DecCfgPtr; typedef struct { uint8_t object_type; uint16_t frameLength; uint32_t frame; /* output data buffer */ void *sample_buffer; /* Configuration data */ AV3DecCfg config; } AV3DecFrameInfo, *AV3DecFrameInfoPtr; /* av3 file buffer */ typedef struct { long bytes_into_buffer; long bytes_consumed; long file_offset; unsigned char *buffer; int at_eof; FILE *infile; } av3_buffer; #ifdef __cplusplus } #endif #endif