diff options
author | mplayer-svn <svn@mplayerhq.hu> | 2012-05-30 20:34:02 +0000 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-08-03 03:38:45 +0200 |
commit | 0b8540657ac1bc1a1db7a32206d7aa626441d2d4 (patch) | |
tree | e1bae85e8c5ed4e13ecfd4e4fbee9339284f26ea /libmpcodecs | |
parent | 14b545eb2a8650dbffebd0194bdb4d53e530d14e (diff) |
vf_unsharp: direct rendering fixes
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.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34975 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
Request a sufficiently large image for direct rendering.
Fixes broken video near the borders.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34979 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: ib
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/vf_unsharp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libmpcodecs/vf_unsharp.c b/libmpcodecs/vf_unsharp.c index 864c99862a..aa3d567070 100644 --- a/libmpcodecs/vf_unsharp.c +++ b/libmpcodecs/vf_unsharp.c @@ -161,7 +161,8 @@ static void get_image( struct vf_instance *vf, mp_image_t *mpi ) { if( mpi->imgfmt!=vf->priv->outfmt ) return; // colorspace differ - vf->dmpi = vf_get_image( vf->next, mpi->imgfmt, mpi->type, mpi->flags, mpi->w, mpi->h ); + mpi->priv = + vf->dmpi = vf_get_image( vf->next, mpi->imgfmt, mpi->type, mpi->flags, mpi->width, mpi->height ); mpi->planes[0] = vf->dmpi->planes[0]; mpi->stride[0] = vf->dmpi->stride[0]; mpi->width = vf->dmpi->width; @@ -175,12 +176,11 @@ static void get_image( struct vf_instance *vf, mp_image_t *mpi ) { } 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; + // no DR, so get a new image! hope we'll get DR buffer: + dmpi = vf->dmpi = vf_get_image( vf->next,vf->priv->outfmt, MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE, mpi->width, mpi->height); 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 ); |