zoukankan      html  css  js  c++  java
  • EAC3 mantissa quantization(VQ & GAQ)

    EAC3基于hebap来决定mantissa的quantizer. hebap如下:

    mantissa 使用VQ(vector quantization) 和GAQ(gain adaptive quantization)进行编码。

    1)VQ

    对于AHT process, 每个block中的第k个spectral bin的mantissa组合在一起(共6个mantissa)形成一个6维的vector.

    如果使用AHT,并且bit allocation pointer在1~7之间,就使用VQ来编码mantissa.

    如果一组mantissa(共6个mantissa)使用VQ的话,在bitstream中存在一个N bit的index,用来查找一个6维的vector table,在vector table中的每个value是16 bit有符号的数。

    如hebap为1时,N等于2。

    在encoder端选择最优的vector,使得vector与实际的mantissa vector的Euclidean distance最小。那么在encoder端只需要transmit 最优vector的index.

    在decoder端读出bitstream中的index,使用vector table中index对用的vector来作为mantissa.

    2)GAQ

     GAQ使用variable-length codewords来quantize mantissa.

    在encoder端,在一个DCT block内的一个或多个经常出现的smaller transform coefficient mantissa条件性的进行gain amplify,并使用较短的codewords来描述这样的smaller mantissa.

    larger transform coefficient mantissa则不进行gain amplify.由于larger mantissa在audio signal中不是经常出现,所以使用较长的codewords来描述。

    在encoder选择gain,每6个GAQ coded DCT block,gain和mantissa codeword作为side info来transmit.

    在decoder端首先unpack gain,并用gain来reconstruct 每个单独的transform coefficient mantissa.在decoder,对smaller mantissa乘以一个attenuation factor, gain factor并不作用于larger mantissa.

    GAQ dequantization 如下图:

     Deformatter 使用hebap来决定当前(第k个)DCT block中的6个mantissa是否使用GAQ编码。

    Deformatter对gaqgain处理产生一个gain attenuation element, 每个gain attenuation element对应每个DCT mantissa block。

    Bitstream中使用一个unique identifier tag来表示是否是larger mantissa.

    如果某个channel使用AHT,那么在bitstream中的每个frame包含一个2 bit的参数gaqmod。

    如果gaqmod = 0, GAQ没有使用,并且在bitstream中没有gain。

    如果gaqmod =1、2,使用1bit来标识gain value.gain value作用于每个DCT block.

    如果gaqmod =3, 使用5bit来group 3个gain value.grpgain表示5 bit group value, M1,M2,M3表示gain的map value.

    M1 = truncate (grpgain / 9)
    M2 = truncate ((grpgain % 9) / 3)
    M3 = (grpgain % 9) % 3

    如果gain为1,或者没有gain value,那么没有标识large mantissa的tag,只是一个quantizer.

    如果gain为2 or 4,那么decoder根据Table E3.5解码large 和small mantissa.large & small mantissa是2进制补码表示的有符号浮点型数据。

    m表示mantissa 的bit数,从hebap中得到。

     由于large mantissa使用dead-zone quantizer, 需要将large mantissa codeword remap成mantissa. 

    remap的公式为:y = x + ax + b(x表示mantissa codeword)

  • 相关阅读:
    灵活修改页面控件
    玫瑰颜色各代表什么含义?
    转:TCP端口详解
    将数据导出成text文件
    将.net布署在运行Apache服务器上
    在多线程下请注意代码的安全
    OpenWrt 设置IP地址
    WordPress 内存缓存加速插件:Batcache
    PVE 开启https 及免费SSL证书申请
    获取OpenWrt mac地址
  • 原文地址:https://www.cnblogs.com/fellow1988/p/8965086.html
Copyright © 2011-2022 走看看