📄 adpcm_算法.txt
字号:
wave format header
# define wave_format_mediaspace_adpcm (0x0012)
//
// videologic's mediaspace adpcm structure definitions
//
// for wave_format_mediaspace_adpcm (0x0012)
//
//
typedef struct mediaspace_adpcmwaveformat_tag {
waveformatex wfx;
word wrevision;
} mediaspaceadpcmwaveformat;
typedef mediaspaceadpcmwaveformat *pmediaspaceadpcmwaveformat;
typedef mediaspaceadpcmwaveformat near *npmediaspaceadpcmwaveformat;
typedef mediaspaceadpcmwaveformat far *lpmediaspaceadpcmwaveformat;
ccitt g.723 adpcm
added: 08/25/93
author: antex electronics corp.
the algorithm for g.721 header format is essentially the same as g723.
fact chunk
wave format header
# define wave_format_g723_adpcm (0x0014)
wformattag this must be set to wave_format_g.723_adpcm
nchannels number of channels in the wave, 1 for mono, 2 for stereo
nsamplespersec frequency the sample rate of the wave file. (8000, 11025, 22050, 44100)
navgbytespersec average data rate
playback software can estimate the buffer size using the value.
nblockalign this is dependent upon the number of bits per sample.
wbitspersample nchannels nblockalign
3 1 48 + nauxblocksize
3 2 96 + nauxblocksize
5 1 80 + nauxblocksize
5 2 160 + nauxblocksize
playback software needs to process a multiple of bytes of data at a time, so that the value of can be used for buffer alignment.
wbitspersample this is the number of bits per sample of data. (g.723 can be 3 or 5)
cbextrasize the size in bytes of the extra information in the extended wave 'fmt' header. this should be 2.
nauxblocksize this is the size in bytes of auxiliary data that is stored at the beginning of each data block. in most instances this should be set to 0.
see the g.723 specification for algorithm details.
data format
mono, 3 bits per sample
grouped into 3 byte sub-blocks containing 8 mono samples. the bit ordering for samples labeled a through h is:
byte 1 byte 2 byte 3
;where a2 is the msb and a0 is the lsb of the first sample.
stereo, 3 bits per sample
grouped into 6 byte sub-blocks containing 8 stereo samples. the bit ordering for samples labeled a through h is:
byte 1 byte 2
byte 3 byte 4
byte 5 byte 6
;where al2 is the msb and al0 is the lsb of the first left sample, and ar2 is the msb and ar0 is the lsb of the first right sample
mono, 5 bits per sample
grouped into 5 byte sub-blocks containing 8 mono samples. the bit ordering for samples labeled a through h is:
byte 1 byte 2 byte 3
byte 4 byte 5
;where a4 is the msb and a0 is the lsb of the first sample.
stereo, 5 bits per sample
grouped into 10 byte sub-blocks containing 8 stereo samples. the bit ordering for samples labeled a through h is:
byte 1 byte 2
byte 3 byte 4
byte 5 byte 6
byte 7 byte 8
byte 9 byte 10
;where al4 is the msb and al0 is the lsb of the first left sample, and ar4 is the msb and ar0 is the lsb of the first right sample
dialogic oki adpcm
added: 04/07/94
author: dialogic
fact chunk
this chunk is required for all wave formats other than wave_format_pcm. it stores file dependent information about the contents of the wave data. it currently specifies the time length of the data in samples.
wave format header
#define wave_format_dialogic_oki_adpcm (0x0203)
wformattag this must be set to wave_format_dialogic_oki_adpcm.
nchannels number of channels in the wave. 1
nsamplespersec frequency the of the sample rate of wave file. 6000, 8000,
navgbytespersec average data rate. 3000, 4000
playback software can estimate the buffer size using the <navgbytespersec> value.
nblockalign block alignment of for the data. 1
playback software needs to process a multiple of <nblockalign> bytes of data at a time, so that the value of <nblockalign> can be used for buffer alignment.
wbitspersample this is the number of bits per sample of data. 4
cbsize the size in bytes of the extra information in the extended wave 'fmt' header. 0
this format can be created and read by either oki adpcm chip set of by a firmware program.
control resources limited vqlpc
added: 04/05/94
author: control resources limited
fact chunk
this chunk is required for all wave formats other than wave_format_pcm. it stores file dependent information about the contents of the wave data. it currently specifies the time length of the data in samples.
wave format header
#define wave_format_control_res_vqlpc (0x0034)
wformattag this must be set to wave_format_control_res_vqlpc
nchannels number of channels in the wave.(1 for mono)
nsamplespersec frequency the of the sample rate of wave file. 8000
navgbytespersec average data rate.394
playback software can estimate the buffer size using the <navgbytespersec> value.
nblockalign block alignment of the data in bytes. 18
playback software needs to process a multiple of <nblockalign> bytes of data at a time, so that the value of <nblockalign> can be used for buffer alignment.
wbitspersample this is the number of bits per sample of data. 4
cbsize the size in bytes of the extra information in the extended wave 'fmt' header. 2
wcomptype this value is reserved and should be set to 1
vqlpc is trademarked of control resources ltd.
control resources limited cr10
added: 04/05/94
author: control resources limited
fact chunk
this chunk is required for all wave formats other than wave_format_pcm. it stores file dependent information about the contents of the wave data. it currently specifies the time length of the data in samples.
wave format header
#define wave_format_control_res_cr10 (0x0037)
wformattag this must be set to wave_format_control_res_cr10.
nchannels number of channels in the wave.(1 for mono)
nsamplespersec frequency the of the sample rate of wave file.
navgbytespersec average data rate.
playback software can estimate the buffer size using the <navgbytespersec> value.
nblockalign block alignment of the data.
playback software needs to process a multiple of <nblockalign> bytes of data at a time, so that the value of <nblockalign> can be used for buffer alignment.
wbitspersample this is the number of bits per sample of data.
cbsize the size in bytes of the extra information in the extended wave 'fmt' header.
data not available at time of printing.
g.721 wave format header
added: 08/25/93
author: antex electronics corp.
the algorithm for g.721 header format is essentially the same as g723.
fact chunk
wave format header
# define wave_format_g721_adpcm (0x0040)
wformattag this must be set to wave_format_g721_adpcm.
nchannels number of channels in the wave.(1 for mono, 2 for stereo)
nsamplespersec frequency the of the sample rate of wave file.
navgbytespersec average data rate.
playback software can estimate the buffer size using the value.
nblockalign block alignment of the data.
nchannels nblockalign
1 64+nauxblocksize
2 128+nauxblocksize
playback software needs to process a multiple of bytes of data at a time, so that the value of can be used for buffer alignment.
wbitspersample this is the number of bits per sample of data. this should be 4.
cbsize the size in bytes of the extra information in the extended wave 'fmt' header. this should be 2.
nauxblocksize this is the size in bytes of auxiliary data that is stored at the beginning of each data block. in most instances this should be set to 0.
see the g.721 specification for algorithm details.
this is a ccitt (international telegraph and telephone consultative committee) specification. their address is:
palais des nations
ch-1211 geneva 10, switzerland
phone: 22 7305111
data format
mono, 4 bits per sample
grouped into 1 byte sub-blocks containing 2 mono samples. the bit ordering for samples labeled a and b is:
;where a3 is the msb and a0 is the lsb of the first sample and b3 is the msb and b0 is the lsb of the second sample.
stereo, 4 bits per sample
grouped into 1 byte sub-blocks containing 1 stereo sample. the bit ordering for one stereo sample is:
;where l3 is the msb and l0 is the lsb of the left sample, and r3 is the msb and r0 is the lsb of the right sample
adpcme wave format header
added: 10/23/93
author: antex electronics corp.
fact chunk
wave format header
# define wave_format_adpcme (0x0033)
wformattag this must be set to wave_format_adpcme.
nchannels number of channels in the wave.(1 for mono, 2 for stereo)
nsamplespersec frequency the of the sample rate of wave file.
navgbytespersec average data rate.
playback software can estimate the buffer size using the <navgbytespersec> value.
nblockalign block alignment of the data, 1 for mono, 2 for stereo.
wbitspersample this is the number of bits per sample of data. this should be 4.
cbextrasize 0
data format
mono nibbles are labelled m and left and right samples labelled l and r.
mono adpcme
byte 0 byte 1 byte 2 byte 3
stereo adpcme
byte 0 byte 1 byte 2 byte 3
note: stereo nibble ordering is delibrately different from the mono order.
gsm610 wave type
added: 09/05/93
author: microsoft
fact chunk
wave format header
typedef struct gsm610waveformat_tag {
waveformatex wfx;
word wsamplesperblock;
} gsm610waveformat;
typedef gsm610waveformat *pgsm610waveformat;
typedef gsm610waveformat near *npgsm610waveformat;
typedef gsm610waveformat far *lpgsm610waveformat;
#define wave_format_gsm610 (0x0031)
wformattag this must be set to wave_format_gsm610
nchannels number of channels in the wave.(1 for mono)
nsamplespersec frequency the of the sample rate of wave file.
navgbytespersec average data rate.
playback software can estimate the buffer size using the <navgbytespersec> value.
nblockalign block alignment of the data.
playback software needs to process a multiple of <nblockalign> bytes of data at a time, so that the value of <nblockalign> can be used for buffer alignment.
wbitspersample this is the number of bits per sample of data.
cbsize the size in bytes of the extra information in the extended wave 'fmt' header.
dsp solutions real wave type
added 02/03/94
author: dsp solutions (formerly digispeech)
fact chunk
this chunk is required for all wave formats other than wave_format_pcm. it stores file dependent information about the contents of the wave data. it currently specifies the time length of the data in samples.
wave format header
the extended wave format structure is used to defined all non-pcm format wave data, and is described as follows in the include file mmreg.h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -