[MPlayer-cvslog] r34975 - trunk/libmpcodecs/vf_unsharp.c
reimar
subversion at mplayerhq.hu
Wed May 30 22:34:02 CEST 2012
Author: reimar
Date: Wed May 30 22:34:02 2012
New Revision: 34975
Log:
unsharp: actually process the frame we got.
Previously it would always process the last frame
allocated, but that might be a different one than the
one first returned.
Modified:
trunk/libmpcodecs/vf_unsharp.c
Modified: trunk/libmpcodecs/vf_unsharp.c
==============================================================================
--- trunk/libmpcodecs/vf_unsharp.c Wed May 30 21:33:09 2012 (r34974)
+++ trunk/libmpcodecs/vf_unsharp.c Wed May 30 22:34:02 2012 (r34975)
@@ -165,6 +165,7 @@ static void get_image( struct vf_instanc
if( mpi->imgfmt!=vf->priv->outfmt )
return; // colorspace differ
+ mpi->priv =
vf->dmpi = vf_get_image( vf->next, mpi->imgfmt, mpi->type, mpi->flags, mpi->w, mpi->h );
mpi->planes[0] = vf->dmpi->planes[0];
mpi->stride[0] = vf->dmpi->stride[0];
@@ -179,12 +180,11 @@ static void get_image( struct vf_instanc
}
static int put_image( struct vf_instance *vf, mp_image_t *mpi, double pts) {
- mp_image_t *dmpi;
+ mp_image_t *dmpi = mpi->priv;
if( !(mpi->flags & MP_IMGFLAG_DIRECT) )
// no DR, so get a new image! hope we'll get DR buffer:
- vf->dmpi = vf_get_image( vf->next,vf->priv->outfmt, MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE, mpi->w, mpi->h);
- dmpi= vf->dmpi;
+ dmpi = vf->dmpi = vf_get_image( vf->next,vf->priv->outfmt, MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE, mpi->w, mpi->h);
unsharp( dmpi->planes[0], mpi->planes[0], dmpi->stride[0], mpi->stride[0], mpi->w, mpi->h, &vf->priv->lumaParam );
unsharp( dmpi->planes[1], mpi->planes[1], dmpi->stride[1], mpi->stride[1], mpi->w/2, mpi->h/2, &vf->priv->chromaParam );
More information about the MPlayer-cvslog
mailing list