diff options
Diffstat (limited to 'libmpcodecs/vf_scale.c')
-rw-r--r-- | libmpcodecs/vf_scale.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libmpcodecs/vf_scale.c b/libmpcodecs/vf_scale.c index 2435121619..fd8a1f061b 100644 --- a/libmpcodecs/vf_scale.c +++ b/libmpcodecs/vf_scale.c @@ -18,7 +18,7 @@ struct vf_priv_s { int v_chr_drop; int param; unsigned int fmt; - SwsContext *ctx; + struct SwsContext *ctx; unsigned char* palette; mp_image_t *dmpi; }; @@ -148,13 +148,13 @@ static int config(struct vf_instance_s* vf, vf->priv->w,vf->priv->h,vo_format_name(best)); // free old ctx: - if(vf->priv->ctx) freeSwsContext(vf->priv->ctx); + if(vf->priv->ctx) sws_freeContext(vf->priv->ctx); // new swscaler: - swsGetFlagsAndFilterFromCmdLine(&int_sws_flags, &srcFilter, &dstFilter); + sws_getFlagsAndFilterFromCmdLine(&int_sws_flags, &srcFilter, &dstFilter); int_sws_flags|= vf->priv->v_chr_drop << SWS_SRC_V_CHR_DROP_SHIFT; int_sws_flags|= vf->priv->param << SWS_PARAM_SHIFT; - vf->priv->ctx=getSwsContext(width,height, + vf->priv->ctx=sws_getContext(width,height, (outfmt==IMGFMT_I420 || outfmt==IMGFMT_IYUV)?IMGFMT_YV12:outfmt, vf->priv->w,vf->priv->h, (best==IMGFMT_I420 || best==IMGFMT_IYUV)?IMGFMT_YV12:best, @@ -218,7 +218,7 @@ static void draw_slice(struct vf_instance_s* vf, return; } // printf("vf_scale::draw_slice() y=%d h=%d\n",y,h); - vf->priv->ctx->swScale(vf->priv->ctx,src,stride,y,h,dmpi->planes,dmpi->stride); + sws_scale(vf->priv->ctx,src,stride,y,h,dmpi->planes,dmpi->stride); } static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){ @@ -233,7 +233,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){ dmpi=vf_get_image(vf->next,vf->priv->fmt, MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE | MP_IMGFLAG_PREFER_ALIGNED_STRIDE, vf->priv->w, vf->priv->h); - vf->priv->ctx->swScale(vf->priv->ctx,mpi->planes,mpi->stride,0,mpi->h,dmpi->planes,dmpi->stride); + sws_scale(vf->priv->ctx,mpi->planes,mpi->stride,0,mpi->h,dmpi->planes,dmpi->stride); } |