发明名称 一种快速解码CAVLC run_before码字的硬件实现方法
摘要 本发明属于数字视频信号编解码技术领域,具体为一种快速解码CAVLCrun_before码字的硬件实现方法。本方法采用码表分拆和码字合并这两种方法,在一个时钟周期内最多可以解码14个值为0的run_before码字,或两个值不等于0的run_before码字。输入的视频码流首先经过前导1检测器来检测带解码的run_before码字是否为零,前导1检测器最多一次可以检测14位前导1。当前run_before码字的值不为零,如果我们将当前解码位置之前所包含的0的总个数记为zerosLeft,根据zerosLeft的值可以将run_before码字分为7种类型,将原标准中规定的run_before码表分解为7个子码表,针对每一种类型分别进行解码。本发明可以大大提高硬件解码器的数据处理能力。
申请公布号 CN102572437B 申请公布日期 2014.08.06
申请号 CN201210034976.1 申请日期 2012.02.16
申请人 复旦大学 发明人 范益波;沈沙;沈蔚炜;曾晓洋
分类号 H04N19/13(2014.01)I;H04N19/44(2014.01)I 主分类号 H04N19/13(2014.01)I
代理机构 上海正旦专利代理有限公司 31200 代理人 陆飞;盛志范
主权项  一种快速解码CAVLC run_before码字的硬件实现方法,其特征在于输入的视频码流首先经过前导1检测器检测待解码的run_before码字是否为零,前导1检测器最多一次可以检测14位前导1;输入系数按照H.264标准中规定的zigzag方式排序,将当前run_before码字所对应的非零系数到第一个系数之间所包含的0的总个数记为zerosleft;根据非零zerosLeft的值将run_before码字分为7种类型,即将原标准中规定的run_before码表分解为7个子码表,针对每一种类型分别进行解码;具体步骤为:(1)码表分拆和码字合并;(2)检测前导1的个数;(3)根据zerosLeft的值从7个码表的输出选择出正确的值;(4)更新zerosLeft变量,即每次解码完非零run_before码字后对zerosLeft变量进行更新,在下次解码时使用更新后的值;  其中,所述码表分拆和码字合并,是将H.264视频标准中规定用于解码run_before码字的码表分拆和合并如下表2—表8所示的7个表:表2:针对zerosLeft&gt;6时的码表<tables num="0001" id="ctbl0001"><table><tgroup cols="2"><colspec colname="c001" colwidth="45%" /><colspec colname="c002" colwidth="54%" /><tbody><row><entry morerows="1">run_before</entry><entry morerows="1">zerosLeft&gt;6</entry></row><row><entry morerows="1">0</entry><entry morerows="1">111</entry></row><row><entry morerows="1">1</entry><entry morerows="1">110</entry></row><row><entry morerows="1">2</entry><entry morerows="1">101</entry></row><row><entry morerows="1">3</entry><entry morerows="1">100</entry></row><row><entry morerows="1">4</entry><entry morerows="1">011</entry></row><row><entry morerows="1">5</entry><entry morerows="1">010</entry></row><row><entry morerows="1">6</entry><entry morerows="1">001</entry></row><row><entry morerows="1">7</entry><entry morerows="1">0001</entry></row><row><entry morerows="1">8</entry><entry morerows="1">00001</entry></row><row><entry morerows="1">9</entry><entry morerows="1">000001</entry></row><row><entry morerows="1">10</entry><entry morerows="1">0000001</entry></row><row><entry morerows="1">11</entry><entry morerows="1">00000001</entry></row><row><entry morerows="1">12</entry><entry morerows="1">000000001</entry></row><row><entry morerows="1">13</entry><entry morerows="1">0000000001</entry></row><row><entry morerows="1">14</entry><entry morerows="1">00000000001</entry></row></tbody></tgroup></table></tables>表3:针对zerosLeft=6时的码表<img file="231014dest_path_image001.GIF" wi="443" he="222" />表4:针对zerosLeft=5时的码表<img file="679313dest_path_image002.GIF" wi="431" he="191" />表5:针对zerosLeft=4时的码表<img file="459050dest_path_image003.GIF" wi="391" he="152" />表6:针对zerosLeft=3时的码表<img file="526364dest_path_image004.GIF" wi="297" he="133" />表7:针对zerosLeft=2时的码表<img file="340736dest_path_image005.GIF" wi="217" he="116" /> 表8:针对zerosLeft=1时的码表<img file="163198dest_path_image006.GIF" wi="155" he="94" />;其中,所述检测前导1的个数的步骤为,如果输入的视频码流第一个比特为0,那么前导1的个数为零,说明当前run_before的值大于零,此过程结束,进入步骤(3);否则,根据前导1的个数同时解码多个run_before码字,这些run_before码字的解码值都是0; 所述根据zerosLeft的值从7个码表的输出选择出正确的值的具体步骤为:zerosLeft的取值范围分为7种:大于6, 6, 5, 4, 3, 2, 1;对应的码表分别为表2、表3、表4、表5、表6、表7、表8;根据当前zerosLeft的值,选择相应的码表输出作为最终的解码结果,每查询一次表2或表8,得到一个run_before码字的值,每查询一次表3、表4、表5、表6或表7,得到两个run_before码字的值。
地址 200433 上海市杨浦区邯郸路220号