ImgReSampleContext *img_resample_full_init(int owidth, int oheight,
                                      int iwidth, int iheight,
                                      int topBand, int bottomBand,
        int leftBand, int rightBand,
        int padtop, int padbottom,
        int padleft, int padright)
{
    ImgReSampleContext *s;
    if (!owidth || !oheight || !iwidth || !iheight)
        return NULL;
    s = av_mallocz(sizeof(ImgReSampleContext));
    if (!s)
        return NULL;
    if((unsigned)owidth >= UINT_MAX / (LINE_BUF_HEIGHT + NB_TAPS))
        return NULL;
    s->line_buf = av_mallocz(owidth * (LINE_BUF_HEIGHT + NB_TAPS));
    if (!s->line_buf)
        goto fail;
    s->owidth = owidth;
    s->oheight = oheight;
    s->iwidth = iwidth;
    s->iheight = iheight;
    s->topBand = topBand;
    s->bottomBand = bottomBand;
    s->leftBand = leftBand;
    s->rightBand = rightBand;
    s->padtop = padtop;
    s->padbottom = padbottom;
    s->padleft = padleft;
    s->padright = padright;
    s->pad_owidth = owidth - (padleft + padright);
    s->pad_oheight = oheight - (padtop + padbottom);
    s->h_incr = ((iwidth - leftBand - rightBand) * POS_FRAC) / s->pad_owidth;
    s->v_incr = ((iheight - topBand - bottomBand) * POS_FRAC) / s->pad_oheight;
    av_build_filter(&s->h_filters[0][0], (float) s->pad_owidth  /
            (float) (iwidth - leftBand - rightBand), NB_TAPS, NB_PHASES, 1<<FILTER_BITS, 0);
    av_build_filter(&s->v_filters[0][0], (float) s->pad_oheight /
            (float) (iheight - topBand - bottomBand), NB_TAPS, NB_PHASES, 1<<FILTER_BITS, 0);
    return s;
fail:
    av_free(s);
    return NULL;
}
['ImgReSampleContext *img_resample_full_init(int owidth, int oheight,\n                                      int iwidth, int iheight,\n                                      int topBand, int bottomBand,\n        int leftBand, int rightBand,\n        int padtop, int padbottom,\n        int padleft, int padright)\n{\n    ImgReSampleContext *s;\n    if (!owidth || !oheight || !iwidth || !iheight)\n        return NULL;\n    s = av_mallocz(sizeof(ImgReSampleContext));\n    if (!s)\n        return NULL;\n    if((unsigned)owidth >= UINT_MAX / (LINE_BUF_HEIGHT + NB_TAPS))\n        return NULL;\n    s->line_buf = av_mallocz(owidth * (LINE_BUF_HEIGHT + NB_TAPS));\n    if (!s->line_buf)\n        goto fail;\n    s->owidth = owidth;\n    s->oheight = oheight;\n    s->iwidth = iwidth;\n    s->iheight = iheight;\n    s->topBand = topBand;\n    s->bottomBand = bottomBand;\n    s->leftBand = leftBand;\n    s->rightBand = rightBand;\n    s->padtop = padtop;\n    s->padbottom = padbottom;\n    s->padleft = padleft;\n    s->padright = padright;\n    s->pad_owidth = owidth - (padleft + padright);\n    s->pad_oheight = oheight - (padtop + padbottom);\n    s->h_incr = ((iwidth - leftBand - rightBand) * POS_FRAC) / s->pad_owidth;\n    s->v_incr = ((iheight - topBand - bottomBand) * POS_FRAC) / s->pad_oheight;\n    av_build_filter(&s->h_filters[0][0], (float) s->pad_owidth  /\n            (float) (iwidth - leftBand - rightBand), NB_TAPS, NB_PHASES, 1<<FILTER_BITS, 0);\n    av_build_filter(&s->v_filters[0][0], (float) s->pad_oheight /\n            (float) (iheight - topBand - bottomBand), NB_TAPS, NB_PHASES, 1<<FILTER_BITS, 0);\n    return s;\nfail:\n    av_free(s);\n    return NULL;\n}']