mirror of
https://github.com/mpv-player/mpv
synced 2024-08-28 05:46:13 +02:00
use flag for XvMC codec recognition and enable dr1 for fixed version of lavc
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12034 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
2e90c1dffc
commit
766b00dbe2
@ -194,8 +194,13 @@ static int init(sh_video_t *sh){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_XVMC
|
#ifdef HAVE_XVMC
|
||||||
|
|
||||||
|
#ifdef CODEC_CAP_HWACCEL
|
||||||
|
if(lavc_codec->capabilities & CODEC_CAP_HWACCEL){
|
||||||
|
#else
|
||||||
if(lavc_codec->id == CODEC_ID_MPEG2VIDEO_XVMC){
|
if(lavc_codec->id == CODEC_ID_MPEG2VIDEO_XVMC){
|
||||||
printf("vd_ffmpeg: XVMC accelerated MPEG2\n");
|
#endif
|
||||||
|
printf("vd_ffmpeg: XVMC accelerated codec\n");
|
||||||
assert(ctx->do_dr1);//these are must to!
|
assert(ctx->do_dr1);//these are must to!
|
||||||
assert(ctx->do_slices); //it is (vo_)ffmpeg bug if this fails
|
assert(ctx->do_slices); //it is (vo_)ffmpeg bug if this fails
|
||||||
avctx->flags|= CODEC_FLAG_EMU_EDGE;//do i need that??!!
|
avctx->flags|= CODEC_FLAG_EMU_EDGE;//do i need that??!!
|
||||||
@ -674,10 +679,15 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
|
|||||||
|
|
||||||
if(len<=0) return NULL; // skipped frame
|
if(len<=0) return NULL; // skipped frame
|
||||||
|
|
||||||
|
#if LIBAVCODEC_BUILD < 4707
|
||||||
|
|
||||||
#ifdef HAVE_XVMC
|
#ifdef HAVE_XVMC
|
||||||
// in fact if(!dr1) should be the only condition, but this way we hide an
|
if( !avctx->xvmc_acceleration )
|
||||||
//ffmpeg interlace (mpeg2) bug. use -noslices to avoid it.
|
#endif
|
||||||
if( !avctx->xvmc_acceleration )// && (!dr1) )
|
|
||||||
|
#else
|
||||||
|
//ffmpeg interlace (mpeg2) bug have been fixed. no need of -noslices
|
||||||
|
if (!dr1)
|
||||||
#endif
|
#endif
|
||||||
avctx->draw_horiz_band=NULL;
|
avctx->draw_horiz_band=NULL;
|
||||||
avctx->opaque=sh;
|
avctx->opaque=sh;
|
||||||
|
Loading…
Reference in New Issue
Block a user