[FFmpeg-user] Possible Issue in ITU.H263 Decoder Code Flow

Ankuj Gupta ankuj2004 at gmail.com
Fri Apr 15 12:00:41 CEST 2011


More information :
[1]  We note that (as per h263 ITU standard) Annex-T is not supported
in h263 Profile-0 (baseline profile).
[2]  Annex-T say --
-------
This annex describes an optional Modified Quantization mode of this
Recommendation, which
modifies quantizer operation. The use of this mode is indicated in the
PLUSPTYPE field of the
picture header.
-------

[3] And in the below mentioned code:
---------
 if (level == -128)
 {
      if (s->codec_id == CODEC_ID_RV10)
       {         /* XXX: should patch encoder too */
            level = get_sbits(&s->gb, 12);
        }
       else
       {
         level = get_bits(&s->gb, 5);
          level |= get_sbits(&s->gb, 6)<<5;

       }
 }
---------
Here in the else part, Annex-T decoding is used without any condition
check for PLUSPTYPE.

Please let me know if I am missing something.


On Fri, Apr 15, 2011 at 3:05 PM, Ankuj Gupta <ankuj2004 at gmail.com> wrote:
> Hi,
>
> I was trying to decode a H263 Profile 0 stream with ffmpeg. According
> to the H263 standard if there is an escape code DCT coefficient of
> value -128 which is forbidden the decoder should treat this as an
> error and go for concealment.
>
> But in FFmpeg version 0.6.1 file ituh263dec.c in function
> h263_decode_block following code is present
>
>
> if (level == -128)
> {
>      if (s->codec_id == CODEC_ID_RV10)
>       {         /* XXX: should patch encoder too */
>            level = get_sbits(&s->gb, 12);
>        }
>       else
>       {
>         level = get_bits(&s->gb, 5);
>          level |= get_sbits(&s->gb, 6)<<5;
>
>       }
> }
>
> where else part (modified quantization decoding Annex T) should not be
> there for Profile 0.
>
> My queries are
> 1) Is it the correct method ? Am I missing something
> 2) Or this else part should be present only when Modified Quantization
> is enabled ?
>
> Thanks in advance
>
> Ankuj Gupta
>


More information about the ffmpeg-user mailing list