static const AVOption *av_set_number(void *obj, const char *name, double num, int den, int64_t intnum){

    const AVOption *o= av_find_opt(obj, name, NULL, 0, 0);

    void *dst;

    if(!o || o->offset<=0)

        return NULL;



    if(o->max*den < num*intnum || o->min*den > num*intnum) {

        av_log(NULL, AV_LOG_ERROR, "Value %lf for parameter '%s' out of range\n", num, name);

        return NULL;

    }



    dst= ((uint8_t*)obj) + o->offset;



    switch(o->type){

    case FF_OPT_TYPE_FLAGS:

    case FF_OPT_TYPE_INT:   *(int       *)dst= llrint(num/den)*intnum; break;

    case FF_OPT_TYPE_INT64: *(int64_t   *)dst= llrint(num/den)*intnum; break;

    case FF_OPT_TYPE_FLOAT: *(float     *)dst= num*intnum/den;         break;

    case FF_OPT_TYPE_DOUBLE:*(double    *)dst= num*intnum/den;         break;

    case FF_OPT_TYPE_RATIONAL:

        if((int)num == num) *(AVRational*)dst= (AVRational){num*intnum, den};

        else                *(AVRational*)dst= av_d2q(num*intnum/den, 1<<24);

        break;

    default:

        return NULL;

    }

    return o;

}

static const AVOption *av_set_number(void *obj, const char *name, double num, int den, int64_t intnum){

    const AVOption *o= av_find_opt(obj, name, NULL, 0, 0);

    void *dst;

    if(!o || o->offset<=0)

        return NULL;



    if(o->max*den < num*intnum || o->min*den > num*intnum) {

        av_log(NULL, AV_LOG_ERROR, "Value %lf for parameter '%s' out of range\n", num, name);

        return NULL;

    }



    dst= ((uint8_t*)obj) + o->offset;



    switch(o->type){

    case FF_OPT_TYPE_FLAGS:

    case FF_OPT_TYPE_INT:   *(int       *)dst= llrint(num/den)*intnum; break;

    case FF_OPT_TYPE_INT64: *(int64_t   *)dst= llrint(num/den)*intnum; break;

    case FF_OPT_TYPE_FLOAT: *(float     *)dst= num*intnum/den;         break;

    case FF_OPT_TYPE_DOUBLE:*(double    *)dst= num*intnum/den;         break;

    case FF_OPT_TYPE_RATIONAL:

        if((int)num == num) *(AVRational*)dst= (AVRational){num*intnum, den};

        else                *(AVRational*)dst= av_d2q(num*intnum/den, 1<<24);

        break;

    default:

        return NULL;

    }

    return o;

}

static const AVOption *av_set_number(void *obj, const char *name, double num, int den, int64_t intnum){         return NULL;         return NULL;         return NULL;     return o;
static const AVOption *FUNC_0(void *obj, const char *name, double num, int den, int64_t intnum){

    const AVOption *VAR_0= av_find_opt(obj, name, NULL, 0, 0);

    void *VAR_1;

    if(!VAR_0 || VAR_0->offset<=0)

        return NULL;



    if(VAR_0->max*den < num*intnum || VAR_0->min*den > num*intnum) {

        av_log(NULL, AV_LOG_ERROR, "Value %lf for parameter '%s' out of range\n", num, name);

        return NULL;

    }



    VAR_1= ((uint8_t*)obj) + VAR_0->offset;



    switch(VAR_0->type){

    case FF_OPT_TYPE_FLAGS:

    case FF_OPT_TYPE_INT:   *(int       *)VAR_1= llrint(num/den)*intnum; break;

    case FF_OPT_TYPE_INT64: *(int64_t   *)VAR_1= llrint(num/den)*intnum; break;

    case FF_OPT_TYPE_FLOAT: *(float     *)VAR_1= num*intnum/den;         break;

    case FF_OPT_TYPE_DOUBLE:*(double    *)VAR_1= num*intnum/den;         break;

    case FF_OPT_TYPE_RATIONAL:

        if((int)num == num) *(AVRational*)VAR_1= (AVRational){num*intnum, den};

        else                *(AVRational*)VAR_1= av_d2q(num*intnum/den, 1<<24);

        break;

    default:

        return NULL;

    }

    return VAR_0;

}

static const AVOption *FUNC_0(void *obj, const char *name, double num, int den, int64_t intnum){ const AVOption *VAR_0= av_find_opt(obj, name, NULL, 0, 0); void *VAR_1; if(!VAR_0 || VAR_0->offset<=0)
return NULL; if(VAR_0->max*den < num*intnum || VAR_0->min*den > num*intnum) { av_log(NULL, AV_LOG_ERROR, "Value %lf for parameter '%s' out of range\n", num, name); return NULL; } VAR_1= ((uint8_t*)obj) + VAR_0->offset; switch(VAR_0->type){ case FF_OPT_TYPE_FLAGS:
case FF_OPT_TYPE_INT:   *(int       *)VAR_1= llrint(num/den)*intnum; break; case FF_OPT_TYPE_INT64: *(int64_t   *)VAR_1= llrint(num/den)*intnum; break; case FF_OPT_TYPE_FLOAT: *(float     *)VAR_1= num*intnum/den;         break; case FF_OPT_TYPE_DOUBLE:*(double    *)VAR_1= num*intnum/den;         break; case FF_OPT_TYPE_RATIONAL:
if((int)num == num) *(AVRational*)VAR_1= (AVRational){num*intnum, den}; else                *(AVRational*)VAR_1= av_d2q(num*intnum/den, 1<<24); break; default:
return NULL; } return VAR_0; }