[XviD-devel] bug: missing RESYNC detection in b-frames
skal
skal at planet-d.net
Thu Nov 13 17:43:45 CET 2003
Re,
On Wed, 2003-11-12 at 10:42, skal wrote:
> howdy,
>
> from the forum:
> http://www.xvid.org/modules.php?op=modload&name=phpBB2&file=viewtopic&t=1612
>
> it seems resync detection is missing in decoder_bframe().
>
> I propose adding the following at the beginning of the loop,
> please cross-check:
from the forum, too: Sam tested the patch and actually,
reset of mv-predictor was missing. So the correct patch
is (please apply):
const int fcode_max = (fcode_forward>fcode_backward) ? fcode_forward : fcode_backward;
const uint32_t intra_dc_threshold; /* fake variable */
if (check_resync_marker(bs, fcode_max - 1)) {
bound = read_video_packet_header(bs, dec, fcode_max - 1,
&quant, &fcode_forward, &fcode_backward, &intra_dc_threshold);
x = bound % dec->mb_width;
y = bound / dec->mb_width;
/* reset predicted macroblocks */
dec->p_fmv = dec->p_bmv = zeromv;
}
Now, there's still mismatch with Ref Software, but
at least it's not crashing. My faith in Ref Soft is
not plenty, so if we could have other bitstreams
with resync markers, it would help sorting out who's
guilty ;)
bye!
Skal
More information about the XviD-devel
mailing list