diff options
Diffstat (limited to 'libmpcodecs/vf_tfields.c')
-rw-r--r-- | libmpcodecs/vf_tfields.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/libmpcodecs/vf_tfields.c b/libmpcodecs/vf_tfields.c index 52cd0b5684..4823ef463c 100644 --- a/libmpcodecs/vf_tfields.c +++ b/libmpcodecs/vf_tfields.c @@ -343,7 +343,7 @@ static int continue_buffered_image(struct vf_instance *vf) mp_image_t *mpi = vf->priv->buffered_mpi; int ret=0; mp_image_t *dmpi; - void (*qpel)(unsigned char *, unsigned char *, int, int, int, int, int); + void (*qpel)(unsigned char *, unsigned char *, int, int, int, int, int) = NULL; int bpp=1; int tff; @@ -361,19 +361,6 @@ static int continue_buffered_image(struct vf_instance *vf) else tff = (vf->priv->parity&1)^1; switch (vf->priv->mode) { - case 2: - qpel = qpel_li; - break; - case 3: - // TODO: add 3tap filter - qpel = qpel_4tap; - break; - case 4: - qpel = qpel_4tap; - break; - } - - switch (vf->priv->mode) { case 0: for (; i<2; i++) { dmpi = vf_get_image(vf->next, mpi->imgfmt, @@ -419,8 +406,15 @@ static int continue_buffered_image(struct vf_instance *vf) } break; case 2: + qpel = qpel_li; case 3: + // TODO: add 3tap filter + if (!qpel) + qpel = qpel_4tap; case 4: + if (!qpel) + qpel = qpel_4tap; + for (; i<2; i++) { dmpi = vf_get_image(vf->next, mpi->imgfmt, MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE, |