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/decode.c | 64 ++++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 31 deletions(-) (limited to 'src/libmpeg2/decode.c') diff --git a/src/libmpeg2/decode.c b/src/libmpeg2/decode.c index 3a6c4486f..243b3fdd2 100644 --- a/src/libmpeg2/decode.c +++ b/src/libmpeg2/decode.c @@ -276,38 +276,40 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code, mpeg2dec->in_slice = 0; if (is_frame_done && picture->current_frame != NULL) { - - /* - * This frame completion code will move to a separate libmpeg2_accel.c file? - * int libmpeg2_accel_frame_completion(mpeg2dec_t *, picture_t *, int); - */ - - if (mpeg2dec->frame_format == XINE_IMGFMT_XXMC) { - xine_xxmc_t *xxmc = (xine_xxmc_t *) - picture->current_frame->accel_data; - switch(picture->current_frame->format) { - case XINE_IMGFMT_XXMC: - switch(xxmc->acceleration) { - case XINE_XVMC_ACCEL_VLD: - mpeg2_xxmc_vld_frame_complete(mpeg2dec, picture, code); - break; - case XINE_XVMC_ACCEL_IDCT: - case XINE_XVMC_ACCEL_MOCOMP: - xxmc->decoded = !picture->current_frame->bad_frame; - xxmc->proc_xxmc_flush( picture->current_frame ); - break; - default: - break; - } - default: - break; + + /* + * This frame completion code will move to a separate libmpeg2_accel.c file? + * int libmpeg2_accel_frame_completion(mpeg2dec_t *, picture_t *, int); + */ + + if (mpeg2dec->frame_format == XINE_IMGFMT_XXMC) { + xine_xxmc_t *xxmc = (xine_xxmc_t *) + picture->current_frame->accel_data; + if (!xxmc->decoded) { + switch(picture->current_frame->format) { + case XINE_IMGFMT_XXMC: + switch(xxmc->acceleration) { + case XINE_XVMC_ACCEL_VLD: + mpeg2_xxmc_vld_frame_complete(mpeg2dec, picture, code); + break; + case XINE_XVMC_ACCEL_IDCT: + case XINE_XVMC_ACCEL_MOCOMP: + xxmc->decoded = !picture->current_frame->bad_frame; + xxmc->proc_xxmc_flush( picture->current_frame ); + break; + default: + break; + } + default: + break; + } + } } - } - - /* - * End of frame completion code. - */ - + + /* + * End of frame completion code. + */ + if (((picture->picture_structure == FRAME_PICTURE) || (picture->second_field)) ) { -- cgit v1.2.3