/**********************************************************************
Copyright (c) 1991 MPEG/audio software simulation group, All Rights Reserved
decode.c
**********************************************************************/
/**********************************************************************
* MPEG/audio coding/decoding software, work in progress *
* NOT for public distribution until verified and approved by the *
* MPEG/audio committee. For further information, please contact *
* Chad Fogg email: <[email protected]> *
* *
* VERSION 4.1 *
* changes made since last update: *
* date programmers comment *
* 2/25/91 Douglas Wong, start of version 1.0 records *
* Davis Pan *
* 3/06/91 Douglas Wong rename: setup.h to dedef.h *
* dfilter to defilter *
* dwindow to dewindow *
* integrated "quantizer", "scalefactor" *
* combined window_samples routine into *
* filter samples *
* 3/31/91 Bill Aspromonte replaced read_filter by *
* create_syn_filter and introduced a *
* new Sub-Band Synthesis routine called *
* SubBandSynthesis() *
* 5/10/91 Vish (PRISM) Ported to Macintosh and Unix. *
* Changed "out_fifo()" so that last *
* unfilled block is also written out. *
* "create_syn_filter()" was modified so *
* that calculation precision is same as *
* in specification tables. *
* Changed "decode_scale()" to reflect *
* specifications. *
* Removed all routines used by *
* "synchronize_buffer()". This is now *
* replaced by "seek_sync()". *
* Incorporated Jean-Georges Fritsch's *
* "bitstream.c" package. *
* Deleted "reconstruct_sample()". *
* 27jun91 dpwe (Aware) Passed outFile and &sampFrames as *
* args to out_fifo() - were global. *
* Moved "alloc_*" reader to common.c. *
* alloc, sblimit, stereo passed via new *
* 'frame_params struct (were globals). *
* Added JOINT STEREO decoding, lyrs I&II*
* Affects: decode_bitalloc,buffer_samps *
* Plus a few other cleanups. *
* 6/10/91 Earle Jennings conditional expansion added in *
* II_dequantize_sample to handle range *
* problems in MSDOS version *
* 8/8/91 Jens Spille Change for MS-C6.00 *
*10/1/91 S.I. Sudharsanan, Ported to IBM AIX platform. *
* Don H. Lee, *
* Peter W. Farrett *
*10/3/91 Don H. Lee implemented CRC-16 error protection *
* newly introduced functions are *
* buffer_CRC and recover_CRC_error. *
* 2/11/92 W. Joseph Carter Ported new code to Macintosh. Most *
* important fixes involved changing *
* 16-bit ints to long or unsigned in *
* bit alloc routines for quant of 65535 *
* and passing proper function args. *
* Removed "Other Joint Stereo" option *
* and made bitrate be total channel *
* bitrate, irrespective of the mode. *
* Fixed many small bugs & reorganized. *
* 7/27/92 Juan Pineda Bug fix in SubBandSynthesis() *
*--------------------------------------------------------------------*
* 6/14/92 Juan Pineda Layer III decoding routines added. *
* Amit Gulati Follows CD 3-11172 rev2. Contains *
* hacks deal with evolving available *
* layerIII bitstreams. Some (minor) *
* modification of prior LI&II code. *
* 10/25/92 Amit Gulati Updated layerIII routines. Added code *
* for subblock_gain, switched block *
* modes, stereo pre-processing. *
* Corrected sign bits for huffman *
* decoding of quadruples region and *
* adjusted gain factor in III_dequant. *
* 11/21/92 Amit Gulati Several layerIII bugs fixed. *
* 12/15/92 Amit Gulati Corrected reordering (indexing) *
* Stan Searing within IMDCT routine. *
* 8/24/93 Masahiro Iwadare Included IS modification in Layer III.*
* Changed for 1 pass decoding. *
* 9/07/93 Toshiyuki Ishino Integrated Layer III with Ver 3.9. *
*--------------------------------------------------------------------*
* 11/20/93 Masahiro Iwadare Integrated Layer III with Ver 4.0. *
*--------------------------------------------------------------------*
* 7/14/94 Juergen Koller Bug fixes in Layer III code *
**********************************************************************/
#include "common.h"
#include "decoder.h"
#include "huffman.h"
/***************************************************************
/*
/* This module contains the core of the decoder ie all the
/* computational routines. (Layer I and II only)
/* Functions are common to both layer unless
/* otherwise specified.
/*
/***************************************************************/
/*****************************************************************
/*
/* The following routines decode the system information
/*
/****************************************************************/
/************ Layer I, Layer II & Layer III ******************/
void decode_info(bs, fr_ps)
Bit_stream_struc *bs;
frame_params *fr_ps;
{
layer *hdr = fr_ps->header;
hdr->version = get1bit(bs);
hdr->lay = 4-getbits(bs,2);
hdr->error_protection = !get1bit(bs); /* error protect. TRUE/FALSE */
hdr->bitrate_index = getbits(bs,4);
hdr->sampling_frequency = getbits(bs,2);
hdr->padding = get1bit(bs);
hdr->extension = get1bit(bs);
hdr->mode = getbits(bs,2);
hdr->mode_ext = getbits(bs,2);
hdr->copyright = get1bit(bs);
hdr->original = get1bit(bs);
hdr->emphasis = getbits(bs,2);
}
/*******************************************************************
/*
/* The bit allocation information is decoded. Layer I
/* has 4 bit per subband whereas Layer II is Ws and bit rate
/* dependent.
/*
/********************************************************************/
/**************************** Layer II *************/
void II_decode_bita
没有合适的资源?快使用搜索试试~ 我知道了~
mpeg1.rar_Fraunhofer_Work It
共32个文件
c:4个
h:3个
alloc_2:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 77 浏览量
2022-09-23
23:29:15
上传
评论
收藏 63KB RAR 举报
温馨提示
mpeg1 源码 As you can read in the source files work on these files is still in progress and they have not officially been released for public distribution. Nevertheless we at Fraunhofer Institute have tested the layer 3 part of the Decoder and believe that it is reasonably bug free. So feel free to evaluate the source code but keep in mind, that no warranties are associated with this software.
资源推荐
资源详情
资源评论
收起资源包目录
mpeg1.rar (32个子文件)
www.pudn.com.txt 218B
mpeg1_iis
huffman.c 11KB
common.c 49KB
common.h 19KB
musicout.c 23KB
tables
1cb1 164B
1th1 2KB
enwindow 10KB
2cb2 157B
alloc_1 4KB
absthr_0 5KB
dewindow 10KB
alloc_3 1KB
1cb0 157B
1cb2 150B
absthr_1 6KB
alloc_2 1KB
2th2 2KB
huffdec 19KB
1th2 2KB
1th0 2KB
2th0 2KB
2cb0 171B
absthr_2 6KB
2cb1 171B
2th1 2KB
alloc_0 4KB
makefile 409B
decode.c 53KB
huffman.h 2KB
readme 1KB
decoder.h 8KB
共 32 条
- 1
资源评论
alvarocfc
- 粉丝: 109
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功