int av_image_get_linesize(enum AVPixelFormat pix_fmt, int width, int plane)

{

    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);

    int max_step     [4];       /* max pixel step for each plane */

    int max_step_comp[4];       /* the component for each plane which has the max pixel step */



    if ((unsigned)pix_fmt >= AV_PIX_FMT_NB || desc->flags & AV_PIX_FMT_FLAG_HWACCEL)

        return AVERROR(EINVAL);



    av_image_fill_max_pixsteps(max_step, max_step_comp, desc);

    return image_get_linesize(width, plane, max_step[plane], max_step_comp[plane], desc);

}

int av_image_get_linesize(enum AVPixelFormat pix_fmt, int width, int plane)

{

    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);

    int max_step     [4];       

    int max_step_comp[4];       



    if ((unsigned)pix_fmt >= AV_PIX_FMT_NB || desc->flags & AV_PIX_FMT_FLAG_HWACCEL)

        return AVERROR(EINVAL);



    av_image_fill_max_pixsteps(max_step, max_step_comp, desc);

    return image_get_linesize(width, plane, max_step[plane], max_step_comp[plane], desc);

}

int FUNC_0(enum AVPixelFormat VAR_0, int VAR_1, int VAR_2)

{

    const AVPixFmtDescriptor *VAR_3 = av_pix_fmt_desc_get(VAR_0);

    int VAR_4     [4];       

    int VAR_5[4];       



    if ((unsigned)VAR_0 >= AV_PIX_FMT_NB || VAR_3->flags & AV_PIX_FMT_FLAG_HWACCEL)

        return AVERROR(EINVAL);



    av_image_fill_max_pixsteps(VAR_4, VAR_5, VAR_3);

    return image_get_linesize(VAR_1, VAR_2, VAR_4[VAR_2], VAR_5[VAR_2], VAR_3);

}

int FUNC_0(enum AVPixelFormat VAR_0, int VAR_1, int VAR_2)
{ const AVPixFmtDescriptor *VAR_3 = av_pix_fmt_desc_get(VAR_0); int VAR_4     [4]; int VAR_5[4]; if ((unsigned)VAR_0 >= AV_PIX_FMT_NB || VAR_3->flags & AV_PIX_FMT_FLAG_HWACCEL)
return AVERROR(EINVAL); av_image_fill_max_pixsteps(VAR_4, VAR_5, VAR_3); return image_get_linesize(VAR_1, VAR_2, VAR_4[VAR_2], VAR_5[VAR_2], VAR_3); }