91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 298KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-12
  • 語言: 其他
  • 標(biāo)簽: mp3??編碼??

資源簡(jiǎn)介

實(shí)現(xiàn)對(duì)wav文件進(jìn)行mp3編碼,已在vc下編譯調(diào)試通過,保證好使

資源截圖

代碼片段和文件信息

/*?bitstream.c?*/

#include?“types.h“

extern?int?*scalefac_band_long;

static?void?encodeSideInfo(?L3_side_info_t??*si?);
static?int?encodeMainData(int?l3_enc[2][2][samp_per_frame2]
????????????????L3_side_info_t??*si?);
static?void?Huffmancodebits(?int?*ix?gr_info?*gi?);
static?int?HuffmanCode(int?table_select?int?x?int?y?unsigned?int?*code
????????????????unsigned?int?*extword?int?*codebits?int?*extbits);
static?int?L3_huffman_coder_count1(?struct?huffcodetab?*h
????????????????int?v?int?w?int?x?int?y?);

/*?bitstream?buffers.
?*?At?a?24K?samplerate?and?8k?bitrate?in?stereo?sideinfo?can?be?up?to?86?frames
?*?ahead?of?its?main?data?(?very?silly?combination?)?*/
#define?FIFO_SIZE?128
static?struct
{
??int?si_len;?/*?number?of?bytes?in?side?info?*/
??int?fr_len;?/*?number?of?data?bytes?in?frame?*/
??unsigned?char?side[40];?/*?side?info?max?len?=?(288?bits?/?8)?+?1?which?gets?cleared?*/
}?fifo[FIFO_SIZE];

static?unsigned?char?main_[4096];??/*?main?data?buffer?(length?always?less?than?this)?*/
static?int?wr=0?rd=0;?/*?read?and?write?index?for?side?fifo?*/
static?int?by=0?bi=0;?/*?byte?and?bit?counts?within?main?or?side?stores?*/
static?int?count=0;??/*?byte?counter?within?current?frame?*/
static?int?bits=0;???/*?bit?counter?used?when?encoding?side?and?main?data?*/

static?struct
{
??FILE?*f;??????????/*?bitstream?output?file?handle?*/
??unsigned?int?i;???/*?file?buffer?index?*/
??unsigned?char?*b;?/*?buffer?pointer?*/
}?bs;

static?unsigned?char?header[4];

#define?BUFFER_SIZE?0x8000?????/*?output?buffer?size?in?bytes?*/

/*
?*?putbytes
?*?--------
?*?put?n?bytes?in?the?output?buffer.?Empty?the?buffer?when?full.
?*/
void?putbytes(unsigned?char?*data?int?n)
{
??unsigned?int?free?=?BUFFER_SIZE?-?bs.i;

??if(n?>=?free)
??{
//????memcpy(&bs.b[bs.i]data(short)free);
????memcpy(&bs.b[bs.i]datafree);
????n?-=?free;
????fwrite(bs.bsizeof(unsigned?char)BUFFER_SIZEbs.f);
//????memcpy(bs.b&data[free](short)n);
????memcpy(bs.b&data[free]n);
????bs.i?=?n;
??}
??else
??{
//????memcpy(&bs.b[bs.i]data(short)n);
????memcpy(&bs.b[bs.i]datan);
????bs.i?+=?n;
??}
}

/*
?*?setbytes
?*?--------
?*?set?n?bytes?in?the?output?buffer.?Empty?the?buffer?when?full.
?*/
void?setbytes(unsigned?char?data?int?n)
{
??unsigned?int?free?=?BUFFER_SIZE?-?bs.i;

??if(n?>=?free)
??{
//????memset(&bs.b[bs.i]data(short)free);
????memset(&bs.b[bs.i]datafree);
????n?-=?free;
????fwrite(bs.bsizeof(unsigned?char)BUFFER_SIZEbs.f);
//????memset(bs.bdata(short)n);
????memset(bs.bdatan);
????bs.i?=?n;
??}
??else
??{
//????memset(&bs.b[bs.i]data(short)n);
????memset(&bs.b[bs.i]datan);
????bs.i?+=?n;
??}
}

/*
?*?open_bit_stream
?*?---------------
?*?open?the?device?to?write?the?bit?stream?into?it
?*/
void?open_bit_stream(char?*filename)
{
??static?unsigned?char?buff[BUFFER_SIZE];

??if?((bs.f?=?fopen(filename?“wb“))?==?NULL)
????error(“Unable?to

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件??????19276??2009-12-21?14:59??mp3_encode_fixed\Debug\bitstream.obj

?????文件??????14151??2009-12-29?11:33??mp3_encode_fixed\Debug\coder.obj

?????文件??????12558??2009-12-18?20:03??mp3_encode_fixed\Debug\huffman.obj

?????文件???????6599??2010-04-15?20:21??mp3_encode_fixed\Debug\layer3.obj

?????文件??????36535??2009-12-24?16:16??mp3_encode_fixed\Debug\loop.obj

?????文件??????13484??2010-04-15?20:20??mp3_encode_fixed\Debug\main.obj

?????文件?????237648??2010-04-15?20:21??mp3_encode_fixed\Debug\mp3_encode_fixed.exe

?????文件?????214700??2010-04-15?20:21??mp3_encode_fixed\Debug\mp3_encode_fixed.ilk

?????文件?????223664??2010-04-15?20:21??mp3_encode_fixed\Debug\mp3_encode_fixed.pch

?????文件?????566272??2010-04-15?20:21??mp3_encode_fixed\Debug\mp3_encode_fixed.pdb

?????文件???????2440??2009-12-09?14:38??mp3_encode_fixed\Debug\testtime.obj

?????文件???????2304??2009-12-18?18:16??mp3_encode_fixed\Debug\utils.obj

?????文件??????58368??2010-04-19?19:18??mp3_encode_fixed\Debug\vc60.idb

?????文件??????53248??2010-04-15?20:21??mp3_encode_fixed\Debug\vc60.pdb

?????文件???????9058??2009-12-29?11:16??mp3_encode_fixed\Debug\wave.obj

?????文件??????17261??2010-04-14?20:22??mp3_encode_fixed\include\table1.h

?????文件??????41023??2009-12-18?20:06??mp3_encode_fixed\include\table2.h

?????文件???????3743??2010-04-15?20:21??mp3_encode_fixed\include\types.h

?????文件????????237??2009-12-21?10:33??mp3_encode_fixed\include\utils.h

?????文件???????5150??2010-04-14?20:29??mp3_encode_fixed\mp3_encode_fixed.dsp

?????文件????????540??2009-11-30?10:32??mp3_encode_fixed\mp3_encode_fixed.dsw

?????文件??????91136??2010-04-27?15:32??mp3_encode_fixed\mp3_encode_fixed.ncb

?????文件??????51712??2010-04-27?15:32??mp3_encode_fixed\mp3_encode_fixed.opt

?????文件????????266??2010-04-19?19:18??mp3_encode_fixed\mp3_encode_fixed.plg

?????文件??????15325??2009-12-21?14:25??mp3_encode_fixed\source\bitstream.c

?????文件???????4046??2009-12-29?11:33??mp3_encode_fixed\source\coder.c

?????文件??????13993??2009-12-18?20:03??mp3_encode_fixed\source\huffman.c

?????文件???????4426??2010-04-15?20:21??mp3_encode_fixed\source\layer3.c

?????文件??????15706??2009-12-24?16:15??mp3_encode_fixed\source\loop.c

?????文件???????6211??2010-04-14?20:24??mp3_encode_fixed\source\main.c

............此處省略8個(gè)文件信息

評(píng)論

共有 條評(píng)論