Commit 3ce3d4cc authored by multiple authors's avatar multiple authors Committed by Michael Niedermayer

libmpcodecs/vf_unsharp: update to latest version from mplayer

Please see mplayer svn for authorship and individual commits
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 7a488560
...@@ -165,7 +165,8 @@ static void get_image( struct vf_instance *vf, mp_image_t *mpi ) { ...@@ -165,7 +165,8 @@ static void get_image( struct vf_instance *vf, mp_image_t *mpi ) {
if( mpi->imgfmt!=vf->priv->outfmt ) if( mpi->imgfmt!=vf->priv->outfmt )
return; // colorspace differ 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->planes[0] = vf->dmpi->planes[0];
mpi->stride[0] = vf->dmpi->stride[0]; mpi->stride[0] = vf->dmpi->stride[0];
mpi->width = vf->dmpi->width; mpi->width = vf->dmpi->width;
...@@ -179,12 +180,12 @@ static void get_image( struct vf_instance *vf, mp_image_t *mpi ) { ...@@ -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) { 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) ) if( !(mpi->flags & MP_IMGFLAG_DIRECT) )
// no DR, so get a new image! hope we'll get DR buffer: // 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 = ff_vf_get_image( vf->next,vf->priv->outfmt, MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE, mpi->width, mpi->height);
dmpi= vf->dmpi;
unsharp( dmpi->planes[0], mpi->planes[0], dmpi->stride[0], mpi->stride[0], mpi->w, mpi->h, &vf->priv->lumaParam ); 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 ); unsharp( dmpi->planes[1], mpi->planes[1], dmpi->stride[1], mpi->stride[1], mpi->w/2, mpi->h/2, &vf->priv->chromaParam );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment