没有合适的资源?快使用搜索试试~ 我知道了~
首页WMA(Windows Media Audio)解码器详解
The Windows Media Audio (WMA) system uses the waveform coding concepts of subband/transform coding, quantization, and variable length coding to achieve its compression. In addition it models properties of human auditory system to achieve the highest quality of audio even at low data rates. The WMA encoder and decoder systems are shown in Figure 1 and Figure 2 respectively. This document focuses on the WMA bitstream syntax and semantics, and describes the operation of the decoder.
资源详情
资源评论
资源推荐

WMA Version 7.0
An Overview of Windows Media Audio
Decoding
MICROSOFT CONFIDENTIAL
LASTSAVED: PAGE

WMA VERSION 7.0
Table of Contents
WMA VERSION 7.0..............................................................................................................................................I
AN OVERVIEW OF WINDOWS MEDIA AUDIO DECODING.......................................................................I
TABLE OF TABLES...........................................................................................................................................IV
TABLE OF FIGURES..........................................................................................................................................V
AUDIENCE AND DISCLAIMER......................................................................................................................VI
SUMMARY..........................................................................................................................................................VI
1 INTRODUCTION...............................................................................................................................................1
1.1 NOTATION.......................................................................................................................................................3
1.1.1 Arithmetic Operators................................................................................................................................3
1.1.2 Logical operators.....................................................................................................................................4
1.1.3 Relational operators.................................................................................................................................4
1.1.4 Bitwise operators.....................................................................................................................................4
1.1.5 Assignment...............................................................................................................................................4
1.1.6 Mnemonics...............................................................................................................................................4
1.1.7 Constants.................................................................................................................................................5
1.1.8 How to Read the Bitstream Syntax?..........................................................................................................5
2 BITSTREAM SYNTAX/DECODE PROCESS..................................................................................................7
2.1 OVERALL DECODE PROCESS............................................................................................................................7
2.2 PACKET LAYER DECODER...............................................................................................................................8
2.3 FRAME LAYER DECODER.................................................................................................................................9
2.3.1 Subframe Header.....................................................................................................................................9
2.3.2 Subframe Coefficient (Run-Level) Decoding............................................................................................13
2.4 PARAMETER DEFINITIONS..............................................................................................................................13
3 DECODER INITIALIZATION........................................................................................................................15
3.1 SAMPLES PER FRAME....................................................................................................................................15
3.2 CUTOFF FREQUENCIES...................................................................................................................................16
3.3 WEIGHTING MODE........................................................................................................................................16
3.4 ALLOW SUPER AND/OR SUB FRAMES.............................................................................................................16
3.5 MAXIMUM NUMBER OF SUBFRAMES IN A FRAME...........................................................................................16
3.6 BITS PER SAMPLE..........................................................................................................................................17
3.7 BITS TO INDICATE FRAME SIZE.......................................................................................................................17
3.8 DITHERING LEVEL.........................................................................................................................................17
3.9 PARAMETERS FOR NOISE SUBSTITUTION........................................................................................................17
4 PACKET LAYER DECODING.......................................................................................................................20
5 FRAME LAYER DECODING.........................................................................................................................21
5.1 SUBFRAME HEADER DECODING.....................................................................................................................21
5.1.1 Bark Band Computation.........................................................................................................................21
5.1.2 Noise Substitution Header......................................................................................................................23
5.1.3 Decoding LPC Header...........................................................................................................................24
5.1.4 Maximum Level Size, if Escape Code is Used..........................................................................................25
MICROSOFT CONFIDENTIAL – INTERNAL USE ONLY
LASTSAVED: PAGE

WMA VERSION 7.0
5.2 RUN-LEVEL (ENTROPY) DECODER.................................................................................................................25
5.3 INVERSE QUANTIZER & NOISE SUBSTITUTION................................................................................................27
5.3.1 An Implementation of qrand().................................................................................................................28
5.4 QUANTIZATION NOISE SHAPING (WEIGHTING FACTORS)................................................................................29
5.4.1 Computing Un-normalized Weights from Mask Information....................................................................29
5.4.2 Computing Un-normalized Weights from LPC Parameters......................................................................30
5.4.3 Normalizing Weights..............................................................................................................................30
5.4.4 Applying Weight Factors........................................................................................................................31
5.4.5 Reducing the Overhead of Weighting Factors..........................................................................................31
5.5 MULTI-CHANNEL TRANSFORMATION.............................................................................................................32
5.6 INVERSE MODULATED LAPPED TRANSFORM..................................................................................................33
5.6.1 DCT-IV..................................................................................................................................................33
5.6.2 Window Function Generation.................................................................................................................34
5.6.3 Obtaining Reconstruction Values............................................................................................................36
5.7 AFTER DECODING A SUBFRAME....................................................................................................................37
6 INTERFACING WITH APPLICATIONS (INFORMATIVE).......................................................................38
6.1 SOFTWARE API FOR MICROSOFT’S WMA DECODER......................................................................................40
7 TABLES.............................................................................................................................................................54
7.1 CONSTANTS...................................................................................................................................................54
7.2 BARK FREQUENCIES......................................................................................................................................54
7.3 LSF RECONSTRUCTION VALUES....................................................................................................................55
7.4 RUN-LEVEL VARIABLE LENGTH CODING (HUFFMAN)TABLES........................................................................56
7.4.1 Group Huffman-RLC-44Q......................................................................................................................56
7.4.2 Group Huffman-RLC-44O......................................................................................................................69
7.4.3 Group Huffman-RLC-16.........................................................................................................................93
7.5 MASK VARIABLE LENGTH CODING (HUFFMAN) TABLE................................................................................103
7.6 NOISE POWER VARIABLE LENGTH CODING (HUFFMAN) TABLE....................................................................105
8 PARAMETER RESTRICTIONS ON LEGAL WMA BITSTREAMS & COMPLIANT WMA DECODERS
..............................................................................................................................................................................106
8.1 LEGAL WMA VERSION 7 BITSTREAMS........................................................................................................106
8.2 MAXIMUM BUFFER SIZE REQUIREMENTS......................................................................................................106
8.2.1 max_push_buffer_size...........................................................................................................................106
8.2.2 max_pull_buffer size.............................................................................................................................107
8.3 COMPLIANT WMA VERSION 7 DECODERS...................................................................................................107
8.3.1 Measuring Compliance of Decoders.....................................................................................................107
9 GLOSSARY.........................................................................................................................................................1
MICROSOFT CONFIDENTIAL
LASTSAVED: PAGE

WMA VERSION 7.0
TABLE OF TABLES
Table 1 Conditionals & loops in the syntax description.........................................................................5
Table 2 Array notation........................................................................................................................... 6
Table 3 Syntax of decode_packet_layer().............................................................................................8
Table 4 Syntax of decode_packet()....................................................................................................... 8
Table 5 Syntax of decode_packet_header().......................................................................................... 8
Table 6 Syntax of decode_subframe_layer().........................................................................................9
Table 7 Syntax of decode_subframe ()..................................................................................................9
Table 8 Syntax of decode_subframe_header().....................................................................................9
Table 9 Syntax for decode_frame_header_bark()...............................................................................10
Table 10 Syntax for decode_frame_header_lpc()...............................................................................11
Table 11 Syntax for decode_frame_header_noisesub()......................................................................12
Table 12 Syntax of decode_runlevel().................................................................................................13
Table 13 Windows Media Audio Decoder API.....................................................................................40
Table 14 Constants used by the decoder............................................................................................54
Table 15 Bark Frequencies.................................................................................................................54
Table 16 LSF Reconstruciton Values.................................................................................................. 55
Table 17 Huffman-RLC-44Q-Mono.....................................................................................................56
Table 18 Huffman-RLC-44Q-Diff.........................................................................................................63
Table 19 Huffman-RLC-44O-Mono.....................................................................................................69
Table 20 Huffman-RLC-44O-Diff.........................................................................................................81
Table 21 Huffman-RLC-16-Mono........................................................................................................ 93
Table 22 Huffman-RLC-16-Diff............................................................................................................ 98
Table 23 Huffman Table for Mask Information..................................................................................103
Table 24 Huffman Table for Noise Power Information.......................................................................105
Table 25 Parameter limitations of WMA 7.0 legal bit streams...........................................................106
Table 26 Modes of Microsoft's WMA Version 7 Encoder.......................................................................1
MICROSOFT CONFIDENTIAL
LASTSAVED: PAGE

WMA VERSION 7.0
TABLE OF FIGURES
Figure 1 Windows Media Audio Encoder Block Diagram......................................................................2
Figure 2 Windows Media Audio Decoder Block Diagram......................................................................3
Figure 3 Cascaded Packet and Frame Layer Decoders........................................................................8
Figure 4 Obtaining LPC Parameters.................................................................................................... 24
Figure 5 The process to obtain spectral weighting factors...................................................................29
Figure 6 Inverse Modulated Lapped Transform Process.....................................................................33
Figure 7 Window Function Values for various combinations of subframe sizes..................................35
Figure 8 Flow diagram of interaction between an application and a WMA decoder............................39
MICROSOFT CONFIDENTIAL
LASTSAVED: PAGE
剩余63页未读,继续阅读

















安全验证
文档复制为VIP权益,开通VIP直接复制

评论12