[Mp4-tech] Question regarding initialisation of context variable
when performing CABAC decoding
Albert Lee
lbrtlee gmail.com
Sat May 31 12:54:18 EDT 2008
I just started to implement CABAC decoder right now,
so I'll explain as far as my knowledge.
When starting slice decoding, you do the context variable init for all
ctxIdx (0 ~ 459).
After init, you have 460 (pStateIdx, valMPS) pairs.
And then, you do decoding engine init that inits codIRange and codIOffset.
codIRange and codIOffset are global variables and used in DecodeDecision().
When you decode mb_skip_flag for every MB,
first you need to get ctxIdx by adding ctxIdxOffset(11 or 24) and ctxIdxInc.
You can get ctxIdcInc from 9.3.3.1.1.
This ctxIdx will be one of 11, 12, 13(P slice) or 24, 25, 26(B slice).
Albert.
On 5/30/08, Lin David <David.Lin freescale.com> wrote:
>
> Greetings,
>
> (Sorry if the similar question had been raised before)
>
> I would be grateful if someone could shed lights to me regarding the
> "initialisation of context variables" (in Figure 9-1 and section 9.3.1.1Initialisation process for context variables) when performing CABAC
> decoding.
>
> Assuming that I'm doing the syntax element, mb_skip_flag, decode under
> B-slice, so I would have the ctxIdx vale ranges between 24-26 (according to
> Table 9-11) for initialisation (I could be wrong here).
>
> Then I need to refer to Table 9-14 and based on the value of cabac_init_idc
> (0/1/2) to select the m and n values for doing the process defined in
> section 9.3.1.1.
>
> Since there are three possibilities here for ctxIdx value (between 24-26),
> could anyone hint me which one I should use for initialisation (ctxIdx = 24,
> 25, or 26)? Or any value between 24-26 for ctxIdx would be fine when
> retrieving the m and n values.
>
> Thank you in advance.
>
> Best Regards,
>
> David Lin
>
>
>
> _______________________________________________
> NOTE: Please use clear subject lines for your posts. Include [audio,
> [video], [systems], [general] or another apppropriate identifier to indicate
> the type of question you have.
>
> Note: Conduct on the mailing list is subject to the Antitrust guidelines
> found at
> http://www.mpegif.org/public/documents/vault/mp-out-30042-Antitrust.php
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/mp4-tech/attachments/20080531/7858f215/attachment.html
More information about the Mp4-tech
mailing list