From 204bc7799afd8ea60e34036d94a9051703e4848f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= Date: Sun, 30 Jan 2005 18:01:25 +0000 Subject: **BUGFIX** Bug 1092411 Makes XvMC handle cases where each slice is split into more than two parts. This got broken on IDCT / MOCOMP with a previous commit to fix a search segfault. Has never worked before with VLD. Still IDCT / MOCOMP exhibit bad picture quality in this case but not worse than before it got broken. CVS patchset: 7375 CVS date: 2005/01/30 18:01:25 --- src/libmpeg2/slice_xvmc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/libmpeg2/slice_xvmc.c') diff --git a/src/libmpeg2/slice_xvmc.c b/src/libmpeg2/slice_xvmc.c index c4d2a5ff0..0079d361b 100644 --- a/src/libmpeg2/slice_xvmc.c +++ b/src/libmpeg2/slice_xvmc.c @@ -1707,8 +1707,9 @@ void mpeg2_xvmc_slice (mpeg2dec_t *mpeg2dec, picture_t * picture, int code, uint if (1 == code) { mpeg2dec->xvmc_last_slice_code = 0; } - if (code != mpeg2dec->xvmc_last_slice_code + 1) - return; + if ((code != mpeg2dec->xvmc_last_slice_code + 1) && + (code != mpeg2dec->xvmc_last_slice_code)) + return; bitstream_init (picture, buffer); @@ -1936,7 +1937,7 @@ void mpeg2_xvmc_slice (mpeg2dec_t *mpeg2dec, picture_t * picture, int code, uint default: /* end of slice, or error */ if (mpeg2_cpu_state_restore) mpeg2_cpu_state_restore (&cpu_state); - mpeg2dec->xvmc_last_slice_code++; + mpeg2dec->xvmc_last_slice_code = code; return; } } @@ -2036,7 +2037,7 @@ void mpeg2_xvmc_slice (mpeg2dec_t *mpeg2dec, picture_t * picture, int code, uint } } } - mpeg2dec->xvmc_last_slice_code++; + mpeg2dec->xvmc_last_slice_code = code; #undef bit_buf #undef bits #undef bit_ptr -- cgit v1.2.3