1
0
mirror of https://github.com/mpv-player/mpv synced 2025-04-11 04:01:31 +00:00

mpeg2-interlaced patch by Ivan Kalvatchev <iive@yahoo.com>

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2020 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2001-09-29 21:40:24 +00:00
parent 21a223a373
commit fb7a2be3e9
2 changed files with 26 additions and 21 deletions

View File

@ -556,8 +556,10 @@ else
blit_frame=2; blit_frame=2;
} else { } else {
// software decoding: // software decoding:
mpeg2_decode_data(video_out, start, start+in_size,drop_frame); // decode if(
if(!drop_frame) blit_frame=1; mpeg2_decode_data(video_out, start, start+in_size,drop_frame) > 0 // decode
&& (!drop_frame)
) blit_frame=1;
} }
break; break;
case VFM_RAW: case VFM_RAW:

View File

@ -182,12 +182,10 @@ static int parse_chunk (vo_functions_t * output, int code, uint8_t * buffer, int
// if(picture->picture_structure != FRAME_PICTURE) printf("Field! %d \n",picture->second_field); // if(picture->picture_structure != FRAME_PICTURE) printf("Field! %d \n",picture->second_field);
if(!framedrop) if(picture->picture_structure == FRAME_PICTURE)
if (((picture->picture_structure == FRAME_PICTURE) || {
(picture->second_field))
) {
#ifdef MPEG12_POSTPROC #ifdef MPEG12_POSTPROC
if(picture->pp_options){ if( (picture->pp_options) && (!framedrop) ){
// apply OpenDivX postprocess filter // apply OpenDivX postprocess filter
int stride[3]; int stride[3];
stride[0]=picture->coded_picture_width; stride[0]=picture->coded_picture_width;
@ -201,20 +199,23 @@ static int parse_chunk (vo_functions_t * output, int code, uint8_t * buffer, int
output->draw_slice (frames[3].base, stride, output->draw_slice (frames[3].base, stride,
picture->display_picture_width, picture->display_picture_width,
picture->display_picture_height, 0, 0); picture->display_picture_height, 0, 0);
}// else }
#endif #endif
#if 0 }else{
if (picture->picture_coding_type != B_TYPE) { if( (picture->second_field) && (!framedrop) )
{
int stride[3]; int stride[3];
stride[0]=picture->coded_picture_width; stride[0]=picture->coded_picture_width;
stride[1]=stride[2]=stride[0]/2; stride[1]=stride[2]=stride[0]/2;
output->draw_slice (picture->forward_reference_frame->base, output->draw_slice ((picture->picture_coding_type == B_TYPE) ?
picture->current_frame->base :
picture->forward_reference_frame->base,
stride, stride,
picture->display_picture_width, picture->display_picture_width,
picture->display_picture_height, 0, 0); picture->display_picture_height, 0, 0);
} }else
#endif is_frame_done=0;// we don't draw top fields
} }
#ifdef ARCH_X86 #ifdef ARCH_X86
if (config.flags & MM_ACCEL_X86_MMX) emms(); if (config.flags & MM_ACCEL_X86_MMX) emms();
#endif #endif
@ -273,14 +274,16 @@ static int parse_chunk (vo_functions_t * output, int code, uint8_t * buffer, int
} }
} }
#if 1
#ifdef MPEG12_POSTPROC #ifdef MPEG12_POSTPROC
if(picture->pp_options) if(picture->pp_options)
picture->current_frame->copy=NULL; else picture->current_frame->copy=NULL;
else
#endif #endif
picture->current_frame->copy=copy_slice; picture->current_frame->copy=copy_slice;
#endif
if(framedrop) picture->current_frame->copy=NULL;
if ((framedrop) || (picture->picture_structure != FRAME_PICTURE) )
picture->current_frame->copy=NULL;
picture->current_frame->vo=output; picture->current_frame->vo=output;
picture->slice=0; picture->slice=0;