enable postprocess for interlaced fields

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2254 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
iive 2001-10-18 15:43:35 +00:00
parent b5b7ce90a6
commit 11001c4164
1 changed files with 37 additions and 29 deletions

View File

@ -168,6 +168,35 @@ static void copy_slice (vo_frame_t * frame, uint8_t ** src){
++picture->slice; ++picture->slice;
} }
void draw_frame(vo_functions_t * output)
{
int stride[3];
stride[0]=picture->coded_picture_width;
stride[1]=stride[2]=stride[0]/2;
#ifdef MPEG12_POSTPROC
if( picture->pp_options )
{// apply postprocess filter
postprocess((picture->picture_coding_type == B_TYPE) ?
picture->current_frame->base :
picture->forward_reference_frame->base,
stride[0], frames[3].base, stride[0],
picture->coded_picture_width, picture->coded_picture_height,
&quant_store[1][1], (MBC+1), picture->pp_options);
output->draw_slice (frames[3].base, stride,
picture->display_picture_width,
picture->display_picture_height, 0, 0);
}else
#endif
{
output->draw_slice ((picture->picture_coding_type == B_TYPE) ?
picture->current_frame->base :
picture->forward_reference_frame->base,
stride,
picture->display_picture_width,
picture->display_picture_height, 0, 0);
}
}
static int in_slice_flag=0; static int in_slice_flag=0;
@ -186,36 +215,15 @@ static int parse_chunk (vo_functions_t * output, int code, uint8_t * buffer, int
if(picture->picture_structure == FRAME_PICTURE) if(picture->picture_structure == FRAME_PICTURE)
{ {
#ifdef MPEG12_POSTPROC #ifdef MPEG12_POSTPROC
if( (picture->pp_options) && (!framedrop) ){ if( (picture->pp_options) && (!framedrop) )
// apply postprocess filter draw_frame(output);
int stride[3];
stride[0]=picture->coded_picture_width;
stride[1]=stride[2]=stride[0]/2;
postprocess((picture->picture_coding_type == B_TYPE) ?
picture->current_frame->base :
picture->forward_reference_frame->base,
stride[0], frames[3].base, stride[0],
picture->coded_picture_width, picture->coded_picture_height,
&quant_store[1][1], (MBC+1), picture->pp_options);
output->draw_slice (frames[3].base, stride,
picture->display_picture_width,
picture->display_picture_height, 0, 0);
}
#endif #endif
}else{ }else
if( (picture->second_field) && (!framedrop) ) {
{ if( (picture->second_field) && (!framedrop) )
int stride[3]; draw_frame(output);
stride[0]=picture->coded_picture_width; else
stride[1]=stride[2]=stride[0]/2; is_frame_done=0;// we don't draw first fields
output->draw_slice ((picture->picture_coding_type == B_TYPE) ?
picture->current_frame->base :
picture->forward_reference_frame->base,
stride,
picture->display_picture_width,
picture->display_picture_height, 0, 0);
}else
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();