Revision 674bd4f6 libavutil/rational.h
libavutil/rational.h  

64  64 
/** 
65  65 
* Reduces a fraction. 
66  66 
* This is useful for framerate calculations. 
67 
* @param dst_nom destination numerator


67 
* @param dst_num destination numerator


68  68 
* @param dst_den destination denominator 
69 
* @param nom source numerator


69 
* @param num source numerator


70  70 
* @param den source denominator 
71 
* @param max the maximum allowed for dst_nom & dst_den


71 
* @param max the maximum allowed for dst_num & dst_den


72  72 
* @return 1 if exact, 0 otherwise 
73  73 
*/ 
74 
int av_reduce(int *dst_nom, int *dst_den, int64_t nom, int64_t den, int64_t max);


74 
int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max);


75  75  
76  76 
/** 
77  77 
* Multiplies two rationals. 
Also available in: Unified diff