[x264-devel] question about the value range of mb_qp_delta

lurui lurui.freesky at gmail.com
Fri Mar 10 03:30:53 CET 2006


Dear Expert:
I have a question about the encoding of mb_qp_delta:
According to the standard:
The decoded value of mb_qp_delta shall be in the range of ¨C 26  to + 25

But in the cavlc.c file,the funtion for it is:

static void cavlc_qp_delta( x264_t *h, bs_t *s )
{
    int i_dqp = h->mb.i_qp - h->mb.i_last_qp;
    if( i_dqp )
    {
        i_dqp = i_dqp <= 0 ? (-2*i_dqp) : (2*i_dqp - 1);
        if( i_dqp > 52 )
            i_dqp = 103 - i_dqp;
    }
    bs_write_ue( s, i_dqp );
}

So if we encoder a mb_qp_delta=26 using cavlc_qp_delta( h, s,26 ),
the finally call is bs_write_ue( s, 51);
and in the decoder side,the bs_read_se() will return a value +26.
is it right or not?

ps: and also for cavac encoding




LuRui

----- Original Message ----- 
From: "Subversion daemon" <svn at videolan.org>
To: <x264-devel at videolan.org>
Sent: Thursday, March 09, 2006 11:59 PM
Subject: [x264-devel] x264: svn commit r464 (pengvado)


> r464 | pengvado | 2006-03-09 16:59:08 +0100 (Thu, 09 Mar 2006) | 3 lines
> Changed paths:
>    M /trunk/common/common.h
>    M /trunk/common/frame.c
>    M /trunk/common/frame.h
>    M /trunk/encoder/cavlc.c
>    M /trunk/encoder/encoder.c
>    M /trunk/encoder/ratecontrol.c
>    M /trunk/encoder/ratecontrol.h
>    M /trunk/encoder/slicetype_decision.c
> 
> macroblock-level ratecontrol: improved vbv strictness, and improved quality when using vbv.
> 
> 
> -- 
> This is the x264-devel mailing-list
> To unsubscribe, go to: http://developers.videolan.org/lists.html
> 


More information about the x264-devel mailing list