[XviD-devel] A problem on decoding vol_ver_id
Xiang Li
lixiang01 at gmail.com
Mon Mar 13 15:32:37 CET 2006
Hi everybody,
I found a problem in xvid 1.1.0. Please have a look at the following code
(src\bitstream\bitstream.c)
} else if ((start_code & ~VIDOBJLAY_START_CODE_MASK) ==
VIDOBJLAY_START_CODE) {
DPRINTF(XVID_DEBUG_STARTCODE, "<video_object_layer>\n");
DPRINTF(XVID_DEBUG_HEADER, "vol id %i\n", start_code &
VIDOBJLAY_START_CODE_MASK);
BitstreamSkip(bs, 32); /* video_object_layer_start_code */
BitstreamSkip(bs, 1); /* random_accessible_vol */
BitstreamSkip(bs, 8); /* video_object_type_indication */
if (BitstreamGetBit(bs)) /* is_object_layer_identifier */
{
DPRINTF(XVID_DEBUG_HEADER, "+ is_object_layer_identifier\n");
vol_ver_id = BitstreamGetBits(bs, 4); /* video_object_layer_verid */
DPRINTF(XVID_DEBUG_HEADER,"ver_id %i\n", vol_ver_id);
BitstreamSkip(bs, 3); /* video_object_layer_priority */
} else {
vol_ver_id = 1;
}
Please note the red line. According to the standard 6.3.3 Video Object
Layer, If both visual_object_verid and video_object_layer_verid exist,
the semantics of video_object_layer_verid supersedes the other. When this
field does not exist, the value of video_object_layer_verid is substituted
by the value of visual_object_verid. So I think vol_ver_id should not be set
to 1 here. Is it a bug?
Thanks and regards,
Xiang Li
More information about the XviD-devel
mailing list