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 );
On Wed, May 30, 2012 at 10:57:09PM +0200, Ingo Brückl wrote:
Author: reimar Date: Wed May 30 22:34:02 2012 New Revision: 34975
Log: unsharp: actually process the frame we got.
Thanks. (And this fixes the greenish stripes as well, doesn't it, so I can forget about the other patch?)
No, it should not, and indeed it did not for me. Your other patch is still necessary to my knowledge (though I admit I get easily confused by the filter code).
Reimar Döffinger wrote on Wed, 30 May 2012 23:05:08 +0200:
On Wed, May 30, 2012 at 10:57:09PM +0200, Ingo Brückl wrote:
Author: reimar Date: Wed May 30 22:34:02 2012 New Revision: 34975
Log: unsharp: actually process the frame we got.
Thanks. (And this fixes the greenish stripes as well, doesn't it, so I can forget about the other patch?)
No, it should not, and indeed it did not for me.
Oops, I was still testing with r34949 reverted. (Hopefully I've guessed correctly, what you've meant by "the other one".) Ingo
participants (3)
-
Ingo Brückl -
reimar -
Reimar Döffinger