[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[119] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2010-01-22 16:43:43
|
Revision: 119 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=119&view=rev Author: nickols_k Date: 2010-01-22 16:43:32 +0000 (Fri, 22 Jan 2010) Log Message: ----------- minor fixes Modified Paths: -------------- NEWS mplayerxp/libmpcodecs/vd.c mplayerxp/libmpcodecs/vd_ffmpeg.c mplayerxp/postproc/vf_scale.c Modified: NEWS =================================================================== --- NEWS 2010-01-22 15:41:46 UTC (rev 118) +++ NEWS 2010-01-22 16:43:32 UTC (rev 119) @@ -2,6 +2,8 @@ Version 0.8 +* significand acceleration of playback. Now it can scale 640x480->2000x1500 at 25 FPS in real-time without + framedropping with using of non-accelerated '-vo x11' driver on Quad-Core AMD Phenom-9550 running at 2.2GHz * project migrated from CVS on SVN * Redesigned internal architecture of the player (now it being building statically with all internal libs) * new configure script Modified: mplayerxp/libmpcodecs/vd.c =================================================================== --- mplayerxp/libmpcodecs/vd.c 2010-01-22 15:41:46 UTC (rev 118) +++ mplayerxp/libmpcodecs/vd.c 2010-01-22 16:43:32 UTC (rev 119) @@ -274,7 +274,7 @@ mp_image_t* mpi=vf_get_image(sh->vfilter,sh->codec->outfmt[sh->outfmtidx],mp_imgtype,mp_imgflag,w,h); mpi->x=mpi->y=0; if(mpi->xp_idx==XP_IDX_INVALID) - MSG_WARN("[mpcodecs_get_image] Incorrect mpi->xp_idx. Be ready for segfault!\n"); + MSG_V("[mpcodecs_get_image] Incorrect mpi->xp_idx. Be ready for segfault!\n"); return mpi; } Modified: mplayerxp/libmpcodecs/vd_ffmpeg.c =================================================================== --- mplayerxp/libmpcodecs/vd_ffmpeg.c 2010-01-22 15:41:46 UTC (rev 118) +++ mplayerxp/libmpcodecs/vd_ffmpeg.c 2010-01-22 16:43:32 UTC (rev 119) @@ -97,6 +97,7 @@ int ip_count; int b_count; int vo_inited; + int hello_printed; }priv_t; static pp_context_t* ppContext=NULL; static void draw_slice(struct AVCodecContext *s, @@ -372,8 +373,6 @@ avcodec_thread_init(vdff_ctx->ctx, lavc_param_threads); MSG_STATUS("Using %i threads in FFMPEG\n",lavc_param_threads); } - if(vdff_ctx->cap_slices) - MSG_STATUS("Trying to use slice-based rendering in FFMPEG\n"); /* open it */ rc = avcodec_open(vdff_ctx->ctx, vdff_ctx->lavc_codec); if (rc < 0) { @@ -680,10 +679,14 @@ 1; mpi= mpcodecs_get_image(sh,has_b_frames?MP_IMGTYPE_IPB:MP_IMGTYPE_IP,MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_PREFER_ALIGNED_STRIDE|MP_IMGFLAG_READABLE|MP_IMGFLAG_PRESERVE, 16,16); - if(!(vdff_ctx->cap_dr1 && + if(vdff_ctx->cap_dr1 && vdff_ctx->lavc_codec->id != CODEC_ID_H264 && - vdff_ctx->use_slices && mpi->flags&MP_IMGFLAG_DIRECT && !has_b_frames)) - vdff_ctx->use_slices=0; + vdff_ctx->use_slices && mpi->flags&MP_IMGFLAG_DIRECT) + vdff_ctx->use_dr1=1; + if(has_b_frames) { + MSG_V("Disable slice-based rendering in FFMPEG due possible B-frames in video-stream\n"); + vdff_ctx->use_slices=0; + } if(vdff_ctx->use_slices) vdff_ctx->use_dr1=0; if( sh->format == mmioFOURCC('R', 'V', '1', '0') || sh->format == mmioFOURCC('R', 'V', '1', '3') @@ -722,6 +725,14 @@ vdff_ctx->ctx->draw_horiz_band=draw_slice; } else vdff_ctx->ctx->draw_horiz_band=NULL; /* skip draw_slice on framedropping */ + if(!vdff_ctx->hello_printed) { + if(vdff_ctx->use_slices) + MSG_STATUS("Use slice-based rendering in FFMPEG\n"); + else if (vdff_ctx->use_dr1) + MSG_STATUS("Use DR1 rendering in FFMPEG\n"); + else + vdff_ctx->hello_printed=1; + } ret = avcodec_decode_video(vdff_ctx->ctx, vdff_ctx->lavc_picture, &got_picture, data, len); if(ret<0) MSG_WARN("Error while decoding frame!\n"); Modified: mplayerxp/postproc/vf_scale.c =================================================================== --- mplayerxp/postproc/vf_scale.c 2010-01-22 15:41:46 UTC (rev 118) +++ mplayerxp/postproc/vf_scale.c 2010-01-22 16:43:32 UTC (rev 119) @@ -330,24 +330,17 @@ static int __FASTCALL__ put_frame(struct vf_instance_s* vf, mp_image_t *mpi){ mp_image_t *dmpi;//=mpi->priv; - uint8_t *planes[3]; - int stride[3]; + uint8_t *planes[4]; + int stride[4]; planes[0]=mpi->planes[0]; stride[0]=mpi->stride[0]; if(mpi->flags&MP_IMGFLAG_PLANAR){ - if(mpi->flags&MP_IMGFLAG_SWAPPED){ - // I420/IYUV (Y,U,V) - planes[1]=mpi->planes[2]; - planes[2]=mpi->planes[1]; - stride[1]=mpi->stride[2]; - stride[2]=mpi->stride[1]; - } else { - // YV12,YVU9,IF09 (Y,V,U) planes[1]=mpi->planes[1]; planes[2]=mpi->planes[2]; + planes[3]=mpi->planes[3]; stride[1]=mpi->stride[1]; stride[2]=mpi->stride[2]; - } + stride[3]=mpi->stride[3]; } MSG_DBG2("vf_scale.put_frame was called\n"); dmpi=vf_get_image(vf->next,vf->priv->fmt, @@ -359,24 +352,17 @@ static int __FASTCALL__ put_slice(struct vf_instance_s* vf, mp_image_t *mpi){ mp_image_t *dmpi;//=mpi->priv; - uint8_t *planes[3],*dplanes[3]; - int stride[3],newy,newh; + uint8_t *planes[4],*dplanes[4]; + int stride[4],newy,newh; planes[0]=mpi->planes[0]; stride[0]=mpi->stride[0]; if(mpi->flags&MP_IMGFLAG_PLANAR){ - if(mpi->flags&MP_IMGFLAG_SWAPPED){ - // I420/IYUV (Y,U,V) - planes[1]=mpi->planes[2]; - planes[2]=mpi->planes[1]; - stride[1]=mpi->stride[2]; - stride[2]=mpi->stride[1]; - } else { - // YV12,YVU9,IF09 (Y,V,U) planes[1]=mpi->planes[1]; planes[2]=mpi->planes[2]; + planes[3]=mpi->planes[3]; stride[1]=mpi->stride[1]; stride[2]=mpi->stride[2]; - } + stride[3]=mpi->stride[3]; } MSG_DBG2("vf_scale.put_slice was called[%i %i]\n",mpi->y, mpi->h); dmpi=vf_get_image(vf->next,vf->priv->fmt, @@ -387,14 +373,17 @@ if(mpi->flags&MP_IMGFLAG_PLANAR) { dplanes[1] = dmpi->planes[1]; dplanes[2] = dmpi->planes[2]; + dplanes[3] = dmpi->planes[3]; } planes[0] += mpi->y*mpi->stride[0]; dplanes[0] += mpi->y*dmpi->stride[0]; if(mpi->flags&MP_IMGFLAG_PLANAR){ planes[1] += (mpi->y>>mpi->chroma_y_shift)*mpi->stride[1]; planes[2] += (mpi->y>>mpi->chroma_y_shift)*mpi->stride[2]; + planes[3] += (mpi->y>>mpi->chroma_y_shift)*mpi->stride[3]; dplanes[1]+= (mpi->y>>dmpi->chroma_y_shift)*dmpi->stride[0]; - dplanes[1]+= (mpi->y>>dmpi->chroma_y_shift)*dmpi->stride[0]; + dplanes[2]+= (mpi->y>>dmpi->chroma_y_shift)*dmpi->stride[1]; + dplanes[3]+= (mpi->y>>dmpi->chroma_y_shift)*dmpi->stride[2]; } scale(vf->priv->ctx, vf->priv->ctx2, planes, stride, 0, mpi->h, dplanes, dmpi->stride, vf->priv->interlaced); dmpi->y = mpi->y; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |