예제 #1
0
bool TimgFilterAvcodecTNR::is(const TffPictBase &pict, const TfilterSettingsVideo *cfg0)
{
    const TblurSettings *cfg = (const TblurSettings*)cfg0;
    if (super::is(pict, cfg) && cfg->isAvcodecTNR) {
        Trect newRect = pict.getRect(cfg->full, cfg->half);
        return newRect.dx >= 16 && newRect.dy >= 16;
    } else {
        return false;
    }
}
bool TimgFilterLogoaway::is(const TffPictBase &pict,const TfilterSettingsVideo *cfg0)
{
    const TlogoawaySettings *cfg=(const TlogoawaySettings*)cfg0;
    if (super::is(pict,cfg) && cfg->dx>=4 && cfg->dy>=4) {
        Trect pictRect=pict.getRect(cfg->full,cfg->half);
        return (unsigned int)cfg->x<=pictRect.dx-1 && (unsigned int)cfg->y<=pictRect.dy-1 &&
               (unsigned int)cfg->x+cfg->dx<=pictRect.dx && (unsigned int)cfg->y+cfg->dy<=pictRect.dy;
    } else {
        return false;
    }
}