mpeg43i.docx
《mpeg43i.docx》由会员分享,可在线阅读,更多相关《mpeg43i.docx(52页珍藏版)》请在冰豆网上搜索。
mpeg43i
AnnexA
(informative)
InformativepartofMPEG-4Audiover.2CDtext
A.1.Finegrainscalabilitytool:
BSAC(Bit-SlicedArithmeticCoding)
A.1.1Introduction
IntheBSACencodertheinputstothenoiselesscodingmodulearethesetof1024quantizedspectralcoefficientsandthescalefactorofthescalefactorband.Sincethenoiselesscodingisdoneinsidethequantizerinnerloop,itispartofaniterativeprocessthatconvergeswhenthetotalbitcount(ofwhichthenoiselesscodingisthevastmajority)iswithinsomeintervalsurroundingtheallocatedbitcount.Thissectionwilldescribetheencodingprocessforasinglecalltothenoiselesscodingmodule.
Noiselesscodingisdoneviathefollowingsteps:
∙BitSlicingofthequantizedspectralcoefficient
∙PreliminaryArithmeticcodingofthesetofqunatizedspectumwithinacodingbandusingthearithemticmodel
∙PreliminaryArithmeticcodingofthescalefactors,stereoinfomation,artihmeticmodelinfomation.
∙ArithmeticModeldeterminationtoachievelowestbitcount
A.1.2BitSlicingofthequantizedspectralcoefficients
AsafirststepIofBSACencodingprocess,asequenceoftheabsolutevaluesofquantizedspectralcoefficientsismappedintoabit-slicedsequence.Andinordertomaximizethematchofthestatisticsofthebit-slicedsequencestothatofthearithmeticmodel,4-tuplesareformedfromthebit-slicedsequenceoftheabsolutevaluesofquantizedspectralcoeffientsasshowninthefollowingFigure.
MSB
LSB
B0,m
B0,m-1
...
B0,0
0thquantizedspectraldata
B1,m
B1,m-1
...
B1,0
B2,m
B2,m-1
...
B2,0
...
...
...
...
Bk,m
Bk,m-1
...
Bk,0
kthquantizedspectraldata
where,allocated_bitis(m+1)bitandBk,mindicatesthebinaryvalueofthemthbitofkthquantizedspectralcoefficients
tuple0,m
...
tuplek/4,m
B0,m
B1,m
B2,m
B3,m
...
Bk-3,m
Bk-2,m
Bk-1,m
Bk,m
tuple0,m-1
tuplek/4,m-1
B0,m-1
B1,m-1
B2,m-1
B3,m-1
...
Bk-3,m-1
Bk-2,m-1
Bk-1,m-1
Bk,m-1
...
...
...
tuple0,0
...
tuplek/4,0
B0,0
B1,0
B2,0
B3,0
...
Bk-3,0
Bk-2,0
Bk-1,0
Bk,0
Forexample,considerasequenceoftheabsolutevalues,x[n]asfollows:
x[0]=9,x[1]=0,x[2]=7andx[3]=11...
Iftheallocated_bitis5,54-tuplesareformedfromaquantizedsequenceasshownasfollows:
MSB
LSB
x[0]:
09
0
1
0
0
1
x[1]:
00
0
0
0
0
0
x[2]:
07
0
0
1
1
1
x[3]:
11
0
1
0
1
1
1011(LeastSignificanttuple)
0011(3rdSignificanttuple)
0010(2ndSignificanttuple)
1001(1stSignificanttuple)
0000(MostSignificanttuple)
The4-tupleconsistsofsuccessivenon-overlapping4slicedbits.The4-tupleofthebit-slicedbitsareconverttothevectordependingupontheflags,sign_is_coded[].Theflag,sign_is_codedrepresentswhetherthesignbitofquantizedspectralcoeffiencienthasbeenencoded
(1)ornot(0)previously.Theyareinitializedto0.AndtheyareupdatedalongwithcodingthevectorsfromMSBtoLSB.Theyareunchangedwhenbitvalueiszeroandaresetto1whenbitvalueisnon-zero.Theprocessformakingthe4-dimensionalvectorfrom4tupleoftheslicedbitsisshownasfollows:
sign_is_coded[]=representswhetherthesignofthespectrumhasbeen
coded
(1)ornot(0)previously.
snf=thesignificanceofthevectortobedecoded.
vec=thevectortobeencodedwhichismadeupofthe
slicedbitsofthequantizedspectrum
sample[]=quantizedspectralcoeffients
start_i=startfrequencelineofthevector.
vec=0
for(i=0;i<4;i++){
if(sign_is_coded[start_i+i]==1){
bit_value=abs(sample[start_i+i])&(1<<(snf-1))
vec<<=1;
if(bit_value)
vec|=0x01
}
}
for(i=0;i<4;i++){
if(sign_is_coded[start_i+i]==0){
bit_value=abs(sample[start_i+i])&(1<<(snf-1))
vec<<=1;
if(bit_value)
vec|=0x01
}
}
A.1.3Arithmeticmodeldeterminations
Arithmeticmodelisusedforencodingthebit-sliceddataofeachcodingband.ThecodedspectrumusesoneArithmeticmodelpercodingband.Thenoiselesscodingsegmentsthesetof1024quantizedspectralcoefficientsintocodingbands,suchthatasingleArithmeticmodelisusedtocodeeachcodingband(themethodofArithmeticcodingisexplainedinalatersection).Forreasonsofcodingefficiency,thequantizedspectralcoefficientsaredividedintocodingbandswhichcontain32quantizedspectralcoefficientsforthenoiselesscoding.CodingbandsarethebasicunitsusedforthenoiselesscodingforBSAC.
Arithmeticmodelindexisdeterminedamongthepossiblearithmeticmodels,suchthatthenumberofbitsneededtorepresentthefullsetofthebit-sliceddataofquantizedspectralcoefficientswithineachcodingbandisminimized.ThepossilbearithmeticmodelshavethenumberoftheallocatedbitlargerthanorequaltothatofthebitneededtorepresentthePCMdataofquantizedspectralcoefficientswithinacodingband.
codingbandsoftencontainonlycoefficientswhosevalueiszero.Forexample,iftheaudioinputisbandlimitedto20kHzorlower,thenthehighestcoefficientsarezero.SuchcodingbandsarecodedwithArithmeticmodelzero,wheretheallocatedbitis0andallcoefficientsarezero.
Inordertotransmitthearithmeticmodelinformationusedinencodingprocess,theindexofarithmeticmodeliscodedandincludedinthesyntaxofbsac_model_info().Thearithmeticmodelindexforencodingthebit-sliceddatawithineachcodingbandistransmittedstartingfromthelowestfrequencycodingbandandprogressingtothehighestfrequencycodingband.Forallarithmeticmodelindexesthedifferencetotheoffsetvalueisarithmetic-codedusingthearithmeticmodelArModel_model.Afterthemodelindexisencoded,thedecodingofthebit-sliceddatashallbestarted.
A.1.4Groupingandinterleaving
Ifthewindowsequenceiseightshortwindowsthenthesetof1024coefficientsisactuallyamatrixof8by128frequencycoefficientsrepresentingthetime-frequencyevolutionofthesignaloverthedurationoftheeightshortwindows.Althoughthesectioningmechanismisflexibleenoughtoefficientlyrepresentthe8zerosections,groupingandinterleavingprovideforgreatercodingefficiency.Asexplainedearlier,thecoefficientsassociatedwithcontiguousshortwindowscanbegroupedsuchthattheysharescalefactorsamongstallscalefactorbandswithinthegroup.Inaddition,thecoefficientswithinagroupareinterleavedbyinterchangingtheorderofscalefactorbandsandwindows.Tobespecific,assumethatbeforeinterleavingthesetof1024coefficientscareindexedas
c[g][w][k/4][k%4]
where
gistheindexongroups
wistheindexonwindowswithinagroup
kistheindexoncoefficientswithinawindow
andtheright-mostindexvariesmostrapidly.
Afterinterleavingthecoefficientsareindexedas
c[g][k/4][w][k%4]
Thishastheadvantageofcombiningallzerosectionsduetoband-limitingwithineachgroup.
A.1.5Scalefactors
Thecodedspectrumusesonequantizerperscalefactorband.Thestepsizesofeachofthesequantizersisspecifiedasasetofscalefactorsandamaximumscalefactorwhichnormalizesthesescalefactors.Inordertoincreasecompression,scalefactorsassociatedwithscalefactorbandsthathaveonlyzero-valuedcoefficientsareignoredinthecodingprocessandthereforedonothavetobetransmitted.Boththemaximumscalefactorandscalefactorsarequantizedin1.5dBsteps.
TheBSACscalablecodingschemeincludesthenoiselesscodinginordertofurtherreducetheredundancyofthescalefactors.
Themaximumscalefactoriscodedasan8bitunsignedinteger.Thefirstscalefactorassociatedwiththequantizedspectrumisdifferentiallycodedrelativetothemaximumscalefactorandthearithmeticcodedusingthedifferentialscalefactorarithmeticmodel.TheremainingscalefactorsaredifferentiallycodedrelativetothepreviouslyencodedscalefactorandthenArithmeticcodedusingthedifferentialscalefactormodel.
Thedynamicrangeofthemaximumscalefactorissufficienttorepresentfull-scalevaluesfroma24-bitPCMaudiosource.
A.1.6Arithmeticcoding
Arithmeticcodingisusedtorepresent4-tuplesofthebit-valueswhichareslicedfromquantizedcoefficients,withoneof32Arithmeticmodels.Inordertofurtherreducetheredundancyofbit-sliceddata,thevectorisformedwhichconsistsofsuccessivenon-overlapping4-tuplesoftheMSBdatastartingfromthelowest-frequencycoefficientandprogressingtothehighest-frequencycoefficient.
Four-dimensionalvectorofbit-slicedsequencearearithmeticcodedandtransmitted.Forthecaseofmultiplewindowsperblock,theconcatenatedandpossiblygroupedandinterleavedsetofspectralcoefficientsistreatedasasinglesetofcoefficientsthatprogressfromlowtohigh.Thissetofspectralcoefficientsmayneedtobede-interleavedaftertheyaredecoded.Thespectralinformationforallscalefactorbandsequaltoorgreaterthanmax_sfbissettozero.
AfterallMSBdataareencodedfromthelowestfrequencylinetothehighest,thesameencodingprocessisrepeateduntilLSBdataisencoded.
Four-dimensionalvectoristhebasicunitinencoding/decodingthebit-sliceddata.Thearithmeticmodelforencodingthevectorisdeterminedwiththearithmeticmodelindex,thesignificanceoftheslicedbitandthenumberofthenon-zerosampleas.And,thenextvectorsareencoded.Thenumberofthenon-zer