diff options
Diffstat (limited to 'libmpcodecs/vf_smartblur.c')
-rw-r--r-- | libmpcodecs/vf_smartblur.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/libmpcodecs/vf_smartblur.c b/libmpcodecs/vf_smartblur.c index f0b7f36b3c..4083dfbda0 100644 --- a/libmpcodecs/vf_smartblur.c +++ b/libmpcodecs/vf_smartblur.c @@ -50,33 +50,6 @@ struct vf_priv_s { /***************************************************************************/ -//FIXME stupid code duplication -static void getSubSampleFactors(int *h, int *v, int format){ - switch(format){ - case IMGFMT_YV12: - case IMGFMT_I420: - *h=1; - *v=1; - break; - case IMGFMT_YVU9: - *h=2; - *v=2; - break; - case IMGFMT_444P: - *h=0; - *v=0; - break; - case IMGFMT_422P: - *h=1; - *v=0; - break; - case IMGFMT_411P: - *h=2; - *v=0; - break; - } -} - static int allocStuff(FilterParam *f, int width, int height){ SwsVector *vec; SwsFilter swsF; @@ -102,7 +75,7 @@ static int config(struct vf_instance *vf, allocStuff(&vf->priv->luma, width, height); - getSubSampleFactors(&sw, &sh, outfmt); + mp_get_chroma_shift(outfmt, &sw, &sh); allocStuff(&vf->priv->chroma, width>>sw, height>>sh); return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); |