diff options
author | Thomas Hellström <totte67@users.sourceforge.net> | 2005-01-30 18:01:25 +0000 |
---|---|---|
committer | Thomas Hellström <totte67@users.sourceforge.net> | 2005-01-30 18:01:25 +0000 |
commit | 204bc7799afd8ea60e34036d94a9051703e4848f (patch) | |
tree | 18c8e9e72b27b454d527edc5986b5b33ab254d2b /src/libmpeg2/decode.c | |
parent | 8277e17065942e71e3d9edc8cea27cd014209e5e (diff) | |
download | xine-lib-204bc7799afd8ea60e34036d94a9051703e4848f.tar.gz xine-lib-204bc7799afd8ea60e34036d94a9051703e4848f.tar.bz2 |
**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
Diffstat (limited to 'src/libmpeg2/decode.c')
-rw-r--r-- | src/libmpeg2/decode.c | 64 |
1 files changed, 33 insertions, 31 deletions
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)) ) { |