diff options
author | rogerdpack <rogerpack2005@gmail.com> | 2013-01-15 19:09:15 -0700 |
---|---|---|
committer | rogerdpack <rogerpack2005@gmail.com> | 2013-01-15 19:09:15 -0700 |
commit | c540312ac3b58e0bbd751844fc2c47c6e3713cf5 (patch) | |
tree | fcf92b1c0f1772b379828125c2555a47d1c81c6b /libavfilter/libmpcodecs/vf_unsharp.c | |
parent | 47e88486b4b3b3de992b07f89dfaedf410a8bd5e (diff) | |
parent | 2b20397e1fbe52db800ef5deb810f7bc2602f248 (diff) | |
download | ffmpeg-c540312ac3b58e0bbd751844fc2c47c6e3713cf5.tar.gz |
Merge remote-tracking branch 'origin/master' into combined
Diffstat (limited to 'libavfilter/libmpcodecs/vf_unsharp.c')
-rw-r--r-- | libavfilter/libmpcodecs/vf_unsharp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavfilter/libmpcodecs/vf_unsharp.c b/libavfilter/libmpcodecs/vf_unsharp.c index b947769fc2..89eddecc8b 100644 --- a/libavfilter/libmpcodecs/vf_unsharp.c +++ b/libavfilter/libmpcodecs/vf_unsharp.c @@ -165,7 +165,8 @@ static void get_image( struct vf_instance *vf, mp_image_t *mpi ) { if( mpi->imgfmt!=vf->priv->outfmt ) return; // colorspace differ - vf->dmpi = ff_vf_get_image( vf->next, mpi->imgfmt, mpi->type, mpi->flags, mpi->w, mpi->h ); + mpi->priv = + vf->dmpi = ff_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; @@ -179,12 +180,12 @@ 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; + mpi->priv = NULL; if( !(mpi->flags & MP_IMGFLAG_DIRECT) ) // no DR, so get a new image! hope we'll get DR buffer: - vf->dmpi = ff_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 = ff_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 ); |