diff options
author | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-09-26 01:18:19 +0000 |
---|---|---|
committer | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-09-26 01:18:19 +0000 |
commit | 105564c9ce5bea7587776e8cf39b2a3681b6d573 (patch) | |
tree | 7e0ea0f478d4022b3304441a68d800709f666ebe /src/libmpeg2/slice.c | |
parent | f1f49a64af45856152c4ee9697f45d907647b406 (diff) | |
download | xine-lib-105564c9ce5bea7587776e8cf39b2a3681b6d573.tar.gz xine-lib-105564c9ce5bea7587776e8cf39b2a3681b6d573.tar.bz2 |
libmpeg2 cleanups, more tweaks for still image display, implemented BUF_CONTROL_SPU_CHANNEL, trying to wipe out last windows style variable names (bFrameBad for example)
CVS patchset: 697
CVS date: 2001/09/26 01:18:19
Diffstat (limited to 'src/libmpeg2/slice.c')
-rw-r--r-- | src/libmpeg2/slice.c | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/src/libmpeg2/slice.c b/src/libmpeg2/slice.c index 0207425df..4abdf8a4a 100644 --- a/src/libmpeg2/slice.c +++ b/src/libmpeg2/slice.c @@ -1520,42 +1520,44 @@ void slice_process (picture_t * picture, uint8_t code, uint8_t * buffer) offset = (code - 1) * stride * 4; picture->v_offset = (code - 1) * 16; - forward_ref[0] = picture->forward_reference_frame->base; - if (picture->picture_structure != FRAME_PICTURE) { + if (picture->forward_reference_frame) { + forward_ref[0] = picture->forward_reference_frame->base; + if (picture->picture_structure != FRAME_PICTURE) { forward_ref[1] = picture->forward_reference_frame->base; offset <<= 1; picture->current_field = (picture->picture_structure == BOTTOM_FIELD); if ((picture->second_field) && (picture->picture_coding_type != B_TYPE)) - forward_ref[picture->picture_structure == TOP_FIELD] = - picture->current_frame->base; - + forward_ref[picture->picture_structure == TOP_FIELD] = + picture->current_frame->base; + picture->f_motion.ref[1][0] = forward_ref[1][0] + stride; picture->f_motion.ref[1][1] = forward_ref[1][1] + (stride >> 1); picture->f_motion.ref[1][2] = forward_ref[1][2] + (stride >> 1); - + picture->b_motion.ref[1][0] = - picture->backward_reference_frame->base[0] + stride; + picture->backward_reference_frame->base[0] + stride; picture->b_motion.ref[1][1] = - picture->backward_reference_frame->base[1] + (stride >> 1); + picture->backward_reference_frame->base[1] + (stride >> 1); picture->b_motion.ref[1][2] = - picture->backward_reference_frame->base[2] + (stride >> 1); + picture->backward_reference_frame->base[2] + (stride >> 1); + } + + picture->f_motion.ref[0][0] = forward_ref[0][0]; + picture->f_motion.ref[0][1] = forward_ref[0][1]; + picture->f_motion.ref[0][2] = forward_ref[0][2]; + + picture->f_motion.pmv[0][0] = picture->f_motion.pmv[0][1] = 0; + picture->f_motion.pmv[1][0] = picture->f_motion.pmv[1][1] = 0; + + picture->b_motion.ref[0][0] = picture->backward_reference_frame->base[0]; + picture->b_motion.ref[0][1] = picture->backward_reference_frame->base[1]; + picture->b_motion.ref[0][2] = picture->backward_reference_frame->base[2]; + + picture->b_motion.pmv[0][0] = picture->b_motion.pmv[0][1] = 0; + picture->b_motion.pmv[1][0] = picture->b_motion.pmv[1][1] = 0; } - picture->f_motion.ref[0][0] = forward_ref[0][0]; - picture->f_motion.ref[0][1] = forward_ref[0][1]; - picture->f_motion.ref[0][2] = forward_ref[0][2]; - - picture->f_motion.pmv[0][0] = picture->f_motion.pmv[0][1] = 0; - picture->f_motion.pmv[1][0] = picture->f_motion.pmv[1][1] = 0; - - picture->b_motion.ref[0][0] = picture->backward_reference_frame->base[0]; - picture->b_motion.ref[0][1] = picture->backward_reference_frame->base[1]; - picture->b_motion.ref[0][2] = picture->backward_reference_frame->base[2]; - - picture->b_motion.pmv[0][0] = picture->b_motion.pmv[0][1] = 0; - picture->b_motion.pmv[1][0] = picture->b_motion.pmv[1][1] = 0; - if ((picture->current_frame->copy) && (picture->picture_coding_type == B_TYPE)) offset = 0; |