[XviD-devel] illegal MPEG-4 Bitstream Syntax / RAW YUV input swaped

Jim Hauxwell xvid-devel@xvid.org
Fri, 3 Jan 2003 22:03:55 -0000


Hi,

About the repatition of BitStreamWriteVolHeader().  In the spec it says

The Visual Object Sequence Header, the Visual Object Header and the Video
Object Layer Header may be repeated in a single visual bitstream. Repeating
these headers enables random access into the visual bitstream and recovery
of these headers when the original headers are corrupted by errors. This
header repetition is used only when visual_object_type in the Visual Object
Header indicates that visual object type is video. (i.e. visual_object_type
== "video ID") All of the data elements in the Visual Object Sequence
Header, the Visual Object Header and the Video Object Layer Header repeated
in a visual bitstream shall have the same value as in the original headers,
except that first_half_vbv_occupancy and latter_half_vbv_occupancy may be
changed to specify the VBV occupancy just before the removal of the first
VOP following the repeated Video Object Layer Header.

So I guess that its OK to repeat the headers.

Jim

> -----Original Message-----
> From: xvid-devel-admin@xvid.org [mailto:xvid-devel-admin@xvid.org]On
> Behalf Of Andreas Dehnhardt
> Sent: 03 January 2003 21:35
> To: xvid-devel@xvid.org
> Subject: [XviD-devel] illegal MPEG-4 Bitstream Syntax / RAW YUV input
> swaped
>
>
> Hi everyone,
>
> 1) illegal MPEG-4 Bitstream Syntax
>
> I was playing around with the xvidcore-0.9.0 codec and found out
> the following:
> After encoding a sequence to a raw MPEG-4 bitstream, I tried to decode
> it using the standard MPEG-4 decoder (the reference ISO fpdam decoder).
>
> The decoding failed at the second I-VOP, it complained about an illegal
> VOP_START_CODE while parsing the bitstream. This error is caused by
> FrameCodeI() in "encoder.c". There is a new VO/VOL-Header
> inserted into the
> bitstream (BitstreamWriteVolHeader()) for every new I-VOP. According to
> the MPEG-4 standard, this structure is illegal. The VO/VOL-Header is only
> allowed at the start of the sequence. The VOPs (in our case, a Frame is
> equal to a VOP) are instances of one VideoObject (VO) at a given time.
> VideoObjectLayers (VOLs) are used for object based temporal and spatial
> scalability (not included in the simple profile of MPEG-4). We only have
> one VO and one VOL, so we cannot include more than one VO/VOL-Header.
>
> I disabled the BitstreamWriteVolHeader()-call (except for the
> initial I-VOP).
> After this modification, the standard MPEG-4 decoder was able to decode
> the whole bitstream.
>
> Did anyone play around with decoding the raw MPEG-4 stream using other
> decoders before?
>
>
>
>
> 2) RAW YUV input swaped
>
> I used raw YUV data as input for the encoder. After encoding (xvid_encraw)
> and decoding (fpdam), the colors seem to be somehow "wrong". I swaped
> the order of U and V in my input YUV-file. This fixed the error. I don't
> know the "correct" order of a YUV-file. Either the encoder swaps the
> color information while reading the raw data or there is no standard
> YUV-order for such files???
>
>
>
>
> I hope this is useful for anyone and we will have a nice
> discussion about VO/VOL/VOP :-)
>
>
> Have fun,
> Andreas
>
>
> _______________________________________________
> XviD-devel mailing list
> XviD-devel@xvid.org
> http://list.xvid.org/mailman/listinfo/xvid-devel