diff options
Diffstat (limited to 'libmpcodecs/vf_field.c')
-rw-r--r-- | libmpcodecs/vf_field.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/libmpcodecs/vf_field.c b/libmpcodecs/vf_field.c index 21efc7b59e..86a3fc87de 100644 --- a/libmpcodecs/vf_field.c +++ b/libmpcodecs/vf_field.c @@ -12,7 +12,6 @@ struct vf_priv_s { int field; - mp_image_t *dmpi; }; //===========================================================================// @@ -29,24 +28,24 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){ return vf_next_put_image(vf,(mp_image_t*)mpi->priv); } - vf->priv->dmpi=vf_get_image(vf->next,mpi->imgfmt, + vf->dmpi=vf_get_image(vf->next,mpi->imgfmt, MP_IMGTYPE_EXPORT, MP_IMGFLAG_ACCEPT_STRIDE, mpi->width, mpi->height/2); // set up mpi as a double-stride image of dmpi: - vf->priv->dmpi->planes[0]=mpi->planes[0]+mpi->stride[0]*vf->priv->field; - vf->priv->dmpi->stride[0]=2*mpi->stride[0]; - if(vf->priv->dmpi->flags&MP_IMGFLAG_PLANAR){ - vf->priv->dmpi->planes[1]=mpi->planes[1]+ + vf->dmpi->planes[0]=mpi->planes[0]+mpi->stride[0]*vf->priv->field; + vf->dmpi->stride[0]=2*mpi->stride[0]; + if(vf->dmpi->flags&MP_IMGFLAG_PLANAR){ + vf->dmpi->planes[1]=mpi->planes[1]+ mpi->stride[1]*vf->priv->field; - vf->priv->dmpi->stride[1]=2*mpi->stride[1]; - vf->priv->dmpi->planes[2]=mpi->planes[2]+ + vf->dmpi->stride[1]=2*mpi->stride[1]; + vf->dmpi->planes[2]=mpi->planes[2]+ mpi->stride[2]*vf->priv->field; - vf->priv->dmpi->stride[2]=2*mpi->stride[2]; + vf->dmpi->stride[2]=2*mpi->stride[2]; } else - vf->priv->dmpi->planes[1]=mpi->planes[1]; // passthru bgr8 palette!!! + vf->dmpi->planes[1]=mpi->planes[1]; // passthru bgr8 palette!!! - return vf_next_put_image(vf,vf->priv->dmpi); + return vf_next_put_image(vf,vf->dmpi); } //===========================================================================// |