diff -Naur MPlayer-1.0pre8/configure MPlayer-1.0pre8-SL/configure --- MPlayer-1.0pre8/configure 2006-06-11 11:35:47.000000000 -0700 +++ MPlayer-1.0pre8-SL/configure 2006-09-02 19:56:23.000000000 -0700 @@ -7318,7 +7318,7 @@ echocheck "lirc" if test "$_lirc" = auto ; then _lirc=no - if test -c /dev/lirc -o -c /dev/lirc/0 ; then + if test -c /dev/lirc -o -c /dev/lirc/0 -o -c /dev/lirc0 ; then cat > $TMPC < int main(void) { return 0; } diff -Naur MPlayer-1.0pre8/libavcodec/xvmcvideo.c MPlayer-1.0pre8-SL/libavcodec/xvmcvideo.c --- MPlayer-1.0pre8/libavcodec/xvmcvideo.c 2006-06-11 11:35:48.000000000 -0700 +++ MPlayer-1.0pre8-SL/libavcodec/xvmcvideo.c 2006-09-02 19:57:53.000000000 -0700 @@ -85,6 +85,10 @@ render->picture_structure = s->picture_structure; render->flags = (s->first_field)? 0: XVMC_SECOND_FIELD; + render->display_flags = 0; + if (!s->progressive_frame) render->display_flags |= INTERLACED; + if (s->top_field_first) render->display_flags |= TOP_FIELD_FIRST; + //make sure that all data is drawn by XVMC_end_frame assert(render->filled_mv_blocks_num==0); diff -Naur MPlayer-1.0pre8/libvo/vo_xvmc.c MPlayer-1.0pre8-SL/libvo/vo_xvmc.c --- MPlayer-1.0pre8/libvo/vo_xvmc.c 2006-06-11 11:35:43.000000000 -0700 +++ MPlayer-1.0pre8-SL/libvo/vo_xvmc.c 2006-09-02 20:03:57.000000000 -0700 @@ -83,6 +83,7 @@ static xvmc_render_state_t * show_queue[MAX_SURFACES]; static int free_element; +extern int field_dropping; static void (*draw_osd_fnc)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride); static void (*clear_osd_fnc)(int x0,int y0, int w,int h); @@ -1013,6 +1014,7 @@ static void put_xvmc_image(xvmc_render_state_t * p_render_surface, int draw_ck){ int rez; int clipX,clipY,clipW,clipH; +int deinterlace = 0; if(p_render_surface == NULL) return; @@ -1028,11 +1030,44 @@ if(benchmark) return; +#if 0 rez = XvMCPutSurface(mDisplay, p_render_surface->p_surface, vo_window, 0, 0, image_width, image_height, clipX, clipY, clipW, clipH, 3);//p_render_surface_to_show->display_flags); +#else /* http://www.pchdtv.com/forum/viewtopic.php?t=1063 */ + if (p_render_surface->display_flags & INTERLACED) deinterlace = 1; + + if (!deinterlace) { + rez = XvMCPutSurface(mDisplay, p_render_surface->p_surface, + vo_window, + 0, 0, image_width, image_height, + clipX, clipY, clipW, clipH, + 3);//p_render_surface_to_show->display_flags); + } else { + unsigned int first_field, second_field; + + if (p_render_surface->display_flags & TOP_FIELD_FIRST) { + first_field = XVMC_TOP_FIELD; + second_field = XVMC_BOTTOM_FIELD; + } else { + first_field = XVMC_BOTTOM_FIELD; + second_field = XVMC_TOP_FIELD; + } + + rez = XvMCPutSurface(mDisplay, p_render_surface_to_show->p_surface, + vo_window, 0, 0, image_width, image_height, + clipX, clipY, clipW, clipH, first_field); + + if (!field_dropping) + rez = XvMCPutSurface(mDisplay, p_render_surface_to_show->p_surface, + vo_window, 0, 0, image_width, image_height, + clipX, clipY, clipW, clipH, second_field | XVMC_SECOND_FIELD); + + field_dropping = 0; + } +#endif if(rez != Success){ printf("vo_xvmc: PutSurface failer, critical error %d!\n",rez); assert(0); diff -Naur MPlayer-1.0pre8/loader/ldt_keeper.c MPlayer-1.0pre8-SL/loader/ldt_keeper.c --- MPlayer-1.0pre8/loader/ldt_keeper.c 2006-06-11 11:35:46.000000000 -0700 +++ MPlayer-1.0pre8-SL/loader/ldt_keeper.c 2006-09-02 20:05:37.000000000 -0700 @@ -33,7 +33,7 @@ #include // 2.5.xx+ calls this user_desc: #include -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,47) +#if ( (LINUX_VERSION_CODE>=KERNEL_VERSION(2,5,47)) && LINUX_VERSION_CODEdelay; // we should avoid dropping too many frames in sequence unless we // are too late. and we allow 100ms A-V delay here: +#if 0 if(d<-dropped_frames*frame_time-0.100 && osd_function != OSD_PAUSE){ +#else + /* http://www.pchdtv.com/forum/viewtopic.php?t=1063 */ + if(d<-dropped_frames*frame_time-0.180 && osd_function != OSD_PAUSE){ + field_dropping = 1; + ++drop_field_cnt; + } else + field_dropping = 0; + + if(d<-dropped_frames*frame_time-0.200 && osd_function != OSD_PAUSE){ +#endif drop_frame=frame_dropping; ++drop_frame_cnt; ++dropped_frames; diff -Naur MPlayer-1.0pre8/xvmc_render.h MPlayer-1.0pre8-SL/xvmc_render.h --- MPlayer-1.0pre8/xvmc_render.h 2006-06-11 11:35:47.000000000 -0700 +++ MPlayer-1.0pre8-SL/xvmc_render.h 2006-09-02 20:10:18.000000000 -0700 @@ -15,6 +15,10 @@ // 1337 IDCT MCo #define MP_XVMC_RENDER_MAGIC 0x1DC711C0 +// Display flags +#define TOP_FIELD_FIRST 1 +#define INTERLACED 2 + typedef struct{ //these are not changed by decoder! int magic;