⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bitstream.h

📁 dsp上用c语言实现的aac音频算法的编解码器代码
💻 H
字号:
/**********************************************************************MPEG-4 Audio VMBit stream moduleThis software module was originally developed byHeiko Purnhagen (University of Hannover)and edited byin the course of development of the MPEG-2 NBC/MPEG-4 Audio standardISO/IEC 13818-7, 14496-1,2 and 3. This software module is animplementation of a part of one or more MPEG-2 NBC/MPEG-4 Audio toolsas specified by the MPEG-2 NBC/MPEG-4 Audio standard. ISO/IEC givesusers of the MPEG-2 NBC/MPEG-4 Audio standards free license to thissoftware module or modifications thereof for use in hardware orsoftware products claiming conformance to the MPEG-2 NBC/ MPEG-4 Audiostandards. Those intending to use this software module in hardware orsoftware products are advised that this use may infringe existingpatents. The original developer of this software module and his/hercompany, the subsequent editors and their companies, and ISO/IEC haveno liability for use of this software module or modifications thereofin an implementation. Copyright is not released for non MPEG-2NBC/MPEG-4 Audio conforming products. The original developer retainsfull right to use the code for his/her own purpose, assign or donatethe code to a third party and to inhibit third party from using thecode for non MPEG-2 NBC/MPEG-4 Audio conforming products. Thiscopyright notice must be included in all copies or derivative works.Copyright (c) 1996.**********************************************************************//* * $Id: bitstream.h,v 1.14 2004/07/04 12:10:52 corrados Exp $ */#ifndef BITSTREAM_H#define BITSTREAM_H#ifdef __cplusplusextern "C" {#endif /* __cplusplus */#include "frame.h"#include "coder.h"#include "channels.h"/* * Raw bitstream constants */#define LEN_SE_ID 3#define LEN_TAG 4#define LEN_GLOB_GAIN 8#define LEN_COM_WIN 1#define LEN_ICS_RESERV 1#define LEN_WIN_SEQ 2#define LEN_WIN_SH 1#define LEN_MAX_SFBL 6#define LEN_MAX_SFBS 4#define LEN_CB 4#define LEN_SCL_PCM 8#define LEN_PRED_PRES 1#define LEN_PRED_RST 1#define LEN_PRED_RSTGRP 5#define LEN_PRED_ENAB 1#define LEN_MASK_PRES 2#define LEN_MASK 1#define LEN_PULSE_PRES 1#define LEN_TNS_PRES 1#define LEN_TNS_NFILTL 2#define LEN_TNS_NFILTS 1#define LEN_TNS_COEFF_RES 1#define LEN_TNS_LENGTHL 6#define LEN_TNS_LENGTHS 4#define LEN_TNS_ORDERL 5#define LEN_TNS_ORDERS 3#define LEN_TNS_DIRECTION 1#define LEN_TNS_COMPRESS 1#define LEN_GAIN_PRES 1#define LEN_NEC_NPULSE 2#define LEN_NEC_ST_SFB 6#define LEN_NEC_POFF 5#define LEN_NEC_PAMP 4#define NUM_NEC_LINES 4#define NEC_OFFSET_AMP 4#define LEN_NCC 3#define LEN_IS_CPE 1#define LEN_CC_LR 1#define LEN_CC_DOM 1#define LEN_CC_SGN 1#define LEN_CCH_GES 2#define LEN_CCH_CGP 1#define LEN_D_CNT 4#define LEN_D_ESC 12#define LEN_F_CNT 4#define LEN_F_ESC 8#define LEN_BYTE 8#define LEN_PAD_DATA 8#define LEN_PC_COMM 8#ifdef DRM# define LEN_HCR_REORDSD 14# define LEN_HCR_LONGCW 6# define FIRST_PAIR_HCB 5# define QUAD_LEN 4# define PAIR_LEN 2# define ESC_HCB 11#endif#define ID_SCE 0#define ID_CPE 1#define ID_CCE 2#define ID_LFE 3#define ID_DSE 4#define ID_PCE 5#define ID_FIL 6#define ID_END 7/* MPEG ID's */#define MPEG2 1#define MPEG4 0/* AAC object types */#define MAIN 1#define LOW  2#define SSR  3#define LTP  4#define BYTE_NUMBIT 8       /* bits in byte (char) */#define LONG_NUMBIT 32      /* bits in unsigned long */#define bit2byte(a) (((a)+BYTE_NUMBIT-1)/BYTE_NUMBIT)typedef struct{  unsigned char *data;      /* data bits */  int numBit;          /* number of bits in buffer */  int size;            /* buffer size in bytes */  int currentBit;      /* current bit position in bit stream */  int numByte;         /* number of bytes read/written (only file) */} BitStream;int WriteBitstream(faacEncHandle hEncoder,                   CoderInfo *coderInfo,                   ChannelInfo *channelInfo,                   BitStream *bitStream,                   int numChannels);BitStream *OpenBitStream(int size, unsigned char *buffer);int CloseBitStream(BitStream *bitStream);int PutBit(BitStream *bitStream,           unsigned int data,           int numBit);#ifdef __cplusplus}#endif /* __cplusplus */#endif /* BITSTREAM_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -