#endif
#include "mpeg2.h"
-#include "attributes.h"
+//#include "attributes.h"
#include "mpeg2_internal.h"
-#include "xvmc_vld.h"
+//#include "xvmc_vld.h"
/* Aspect ratio (ISO/IEC 13818-2 section 6.3.3, table 6-3) */
#define AR_SQUARE_PICTURE 1 /* square pixels */
if ( p_sys->b_slice_i )
{
decoder_SynchroNewPicture( p_sys->p_synchro,
- I_CODING_TYPE, 2, 0, 0, p_sys->i_current_rate,
+ I_CODING_TYPE, 2, 0, 0,
p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY );
decoder_SynchroDecode( p_sys->p_synchro );
decoder_SynchroEnd( p_sys->p_synchro, I_CODING_TYPE, 0 );
decoder_SynchroNewPicture( p_sys->p_synchro,
p_sys->p_info->current_picture->flags & PIC_MASK_CODING_TYPE,
p_sys->p_info->current_picture->nb_fields,
- 0, 0, p_sys->i_current_rate,
+ 0, 0,
p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY );
if( p_sys->b_skip )
/* Intra-slice refresh. Simulate a blank I picture. */
msg_Dbg( p_dec, "intra-slice refresh stream" );
decoder_SynchroNewPicture( p_sys->p_synchro,
- I_CODING_TYPE, 2, 0, 0, p_sys->i_current_rate,
+ I_CODING_TYPE, 2, 0, 0,
p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY );
decoder_SynchroDecode( p_sys->p_synchro );
decoder_SynchroEnd( p_sys->p_synchro, I_CODING_TYPE, 0 );
decoder_SynchroNewPicture( p_sys->p_synchro,
p_sys->p_info->current_picture->flags & PIC_MASK_CODING_TYPE,
p_sys->p_info->current_picture->nb_fields, i_pts,
- 0, p_sys->i_current_rate,
+ 0,
p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY );
if ( !(p_sys->b_slice_i
return NULL;
}
- p_sys->p_mpeg2dec->ptr_forward_ref_picture = p_sys->p_mpeg2dec->fbuf[2]->id;
- p_sys->p_mpeg2dec->ptr_backward_ref_picture = p_sys->p_mpeg2dec->fbuf[1]->id;
+ //p_sys->p_mpeg2dec->ptr_forward_ref_picture = p_sys->p_mpeg2dec->fbuf[2]->id;
+ //p_sys->p_mpeg2dec->ptr_backward_ref_picture = p_sys->p_mpeg2dec->fbuf[1]->id;
if ((p_sys->p_info->current_picture->flags & PIC_MASK_CODING_TYPE) != B_CODING_TYPE)
{
// p_sys->p_mpeg2dec->ptr_forward_ref_picture != picture->backward_reference_frame)
// p_pic->forward_reference_frame->free (p_pic->forward_reference_frame);
- p_sys->p_mpeg2dec->ptr_forward_ref_picture =
- p_sys->p_mpeg2dec->ptr_backward_ref_picture;
- p_sys->p_mpeg2dec->ptr_backward_ref_picture = (void *)p_pic;
+ //p_sys->p_mpeg2dec->ptr_forward_ref_picture =
+ // p_sys->p_mpeg2dec->ptr_backward_ref_picture;
+ //p_sys->p_mpeg2dec->ptr_backward_ref_picture = (void *)p_pic;
}
mpeg2_set_buf( p_sys->p_mpeg2dec, buf, p_pic );
}
if( p_sys->b_slice_i )
{
decoder_SynchroNewPicture( p_sys->p_synchro,
- I_CODING_TYPE, 2, 0, 0, p_sys->i_current_rate,
+ I_CODING_TYPE, 2, 0, 0,
p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY );
decoder_SynchroDecode( p_sys->p_synchro );
decoder_SynchroEnd( p_sys->p_synchro, I_CODING_TYPE, 0 );
{
/* these hardcoded values are defined on mpeg2 standard for
* aspect ratio. other values are reserved or forbidden. */
- switch( p_sys->p_mpeg2dec->decoder.aspect_ratio_information )
+ /*switch( p_sys->p_mpeg2dec->decoder.aspect_ratio_information )
{
case 2:
ratio = 4.0/3.0;
ratio = 2.11/1.0;
break;
case 1:
- default:
+ default:*/
ratio = (double)p_sys->p_mpeg2dec->decoder.width/(double)p_sys->p_mpeg2dec->decoder.height;
- break;
- }
+ /* break;
+ }*/
}
else
{
/* mpeg1 constants refer to pixel aspect ratio */
ratio = (double)p_sys->p_mpeg2dec->decoder.width/(double)p_sys->p_mpeg2dec->decoder.height;
- ratio /= mpeg1_pel_ratio[p_sys->p_mpeg2dec->decoder.aspect_ratio_information];
+ /* ratio /= mpeg1_pel_ratio[p_sys->p_mpeg2dec->decoder.aspect_ratio_information]; */
}
return ratio;
}
p_dec->fmt_out.video.i_height,
p_dec->fmt_out.video.i_aspect,
format, flags);
-#endif
mpeg2_xxmc_choose_coding( p_dec, &p_sys->p_mpeg2dec->decoder, p_pic,
get_aspect_ratio(p_dec), 0 );
+#endif
return p_pic;
}
static int NewPicture ( vout_thread_t *, picture_t * );
static void FreePicture ( vout_thread_t *, picture_t * );
-#ifndef MODULE_NAME_IS_glx
-static IMAGE_TYPE *CreateImage ( vout_thread_t *,
- Display *, EXTRA_ARGS, int, int );
-#endif
-
#ifdef HAVE_SYS_SHM_H
-#ifndef MODULE_NAME_IS_glx
-IMAGE_TYPE *CreateShmImage ( vout_thread_t *,
- Display *, EXTRA_ARGS_SHM, int, int );
-#endif
static int i_shm_major = 0;
#endif
if( checkXvMCCap( p_vout ) == VLC_EGENERIC )
{
msg_Err( p_vout, "no XVMC capability found" );
- Deactivate( p_vout );
+ Deactivate( p_this );
return VLC_EGENERIC;
}
subpicture_t sub_pic;
if( p_vout->p_sys->i_shm_opcode )
{
/* Display rendered image using shared memory extension */
-# if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc)
+#if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc)
XvShmPutImage( p_vout->p_sys->p_display, p_vout->p_sys->i_xvport,
p_vout->p_sys->p_win->video_window,
p_vout->p_sys->p_win->gc, p_pic->p_sys->p_image,
p_vout->fmt_out.i_visible_height,
0 /*dest_x*/, 0 /*dest_y*/, i_width, i_height,
False /* Don't put True here or you'll waste your CPU */ );
-# else
+#else
XShmPutImage( p_vout->p_sys->p_display,
p_vout->p_sys->p_win->video_window,
p_vout->p_sys->p_win->gc, p_pic->p_sys->p_image,
p_vout->fmt_out.i_visible_width,
p_vout->fmt_out.i_visible_height,
False /* Don't put True here ! */ );
-# endif
+#endif
}
else
#endif /* HAVE_SYS_SHM_H */
/* Create image using XShm extension */
p_pic->p_sys->p_image =
CreateShmImage( p_vout, p_vout->p_sys->p_display,
-# if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc)
+#if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc)
p_vout->p_sys->i_xvport,
VLC2X11_FOURCC(p_vout->output.i_chroma),
-# else
+#else
p_vout->p_sys->p_visual,
p_vout->p_sys->i_screen_depth,
-# endif
+#endif
&p_pic->p_sys->shminfo,
p_vout->output.i_width, p_vout->output.i_height );
}