Lines Matching refs:intnum
50 static int av_set_number2(void *obj, const char *name, double num, int den, int64_t intnum, const AVOption **o_out){
58 if(o->max*den < num*intnum || o->min*den > num*intnum) {
67 case FF_OPT_TYPE_INT: *(int *)dst= llrint(num/den)*intnum; break;
68 case FF_OPT_TYPE_INT64: *(int64_t *)dst= llrint(num/den)*intnum; break;
69 case FF_OPT_TYPE_FLOAT: *(float *)dst= num*intnum/den; break;
70 case FF_OPT_TYPE_DOUBLE:*(double *)dst= num*intnum/den; break;
72 if((int)num == num) *(AVRational*)dst= (AVRational){num*intnum, den};
73 else *(AVRational*)dst= av_d2q(num*intnum/den, 1<<24);
81 static const AVOption *av_set_number(void *obj, const char *name, double num, int den, int64_t intnum){
83 if (av_set_number2(obj, name, num, den, intnum, &o) < 0)
267 static int av_get_number(void *obj, const char *name, const AVOption **o_out, double *num, int *den, int64_t *intnum){
278 case FF_OPT_TYPE_FLAGS: *intnum= *(unsigned int*)dst;return 0;
279 case FF_OPT_TYPE_INT: *intnum= *(int *)dst;return 0;
280 case FF_OPT_TYPE_INT64: *intnum= *(int64_t*)dst;return 0;
283 case FF_OPT_TYPE_RATIONAL: *intnum= ((AVRational*)dst)->num;
288 *den=*intnum=0;
293 int64_t intnum=1;
297 av_get_number(obj, name, o_out, &num, &den, &intnum);
298 return num*intnum/den;
302 int64_t intnum=1;
306 av_get_number(obj, name, o_out, &num, &den, &intnum);
307 if(num == 1.0 && (int)intnum == intnum)
308 return (AVRational){intnum, den};
310 return av_d2q(num*intnum/den, 1<<24);
314 int64_t intnum=1;
318 av_get_number(obj, name, o_out, &num, &den, &intnum);
319 return num*intnum/den;