Home
last modified time | relevance | path

Searched refs:den (Results 1 - 25 of 378) sorted by relevance

12345678910>>...16

/third_party/ffmpeg/libavutil/
H A Drational.c36 int64_t num, int64_t den, int64_t max) in av_reduce()
39 int sign = (num < 0) ^ (den < 0); in av_reduce()
40 int64_t gcd = av_gcd(FFABS(num), FFABS(den)); in av_reduce()
44 den = FFABS(den) / gcd; in av_reduce()
46 if (num <= max && den <= max) { in av_reduce()
47 a1 = (AVRational) { num, den }; in av_reduce()
48 den = 0; in av_reduce()
51 while (den) { in av_reduce()
52 uint64_t x = num / den; in av_reduce()
35 av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max) av_reduce() argument
110 int64_t den; av_d2q() local
[all...]
H A Drational.h60 int den; ///< Denominator member
71 static inline AVRational av_make_q(int num, int den) in av_make_q() argument
73 AVRational r = { num, den }; in av_make_q()
90 const int64_t tmp= a.num * (int64_t)b.den - b.num * (int64_t)a.den; in av_cmp_q()
92 if(tmp) return (int)((tmp ^ a.den ^ b.den)>>63)|1; in av_cmp_q()
93 else if(b.den && a.den) return 0; in av_cmp_q()
105 return a.num / (double) a.den; in av_q2d()
[all...]
H A Dopt.c59 static int read_number(const AVOption *o, const void *dst, double *num, int *den, int64_t *intnum) in read_number() argument
93 *den = ((AVRational *)dst)->den; in read_number()
102 static int write_number(void *obj, const AVOption *o, void *dst, double num, int den, int64_t intnum) in write_number() argument
105 (!den || o->max * den < num * intnum || o->min * den > num * intnum)) { in write_number()
106 num = den ? num * intnum / den : (num && intnum ? INFINITY : NAN); in write_number()
112 double d = num*intnum/den; in write_number()
243 int num, den; set_string_number() local
608 set_number(void *obj, const char *name, double num, int den, int64_t intnum, int search_flags) set_number() argument
958 get_number(void *obj, const char *name, const AVOption **o_out, double *num, int *den, int64_t *intnum, int search_flags) get_number() argument
982 int ret, den = 1; av_opt_get_int() local
997 int ret, den = 1; av_opt_get_double() local
1009 int ret, den = 1; av_opt_get_q() local
1043 int ret, den = 1; av_opt_get_video_rate() local
[all...]
/third_party/ffmpeg/libavutil/tests/
H A Drational.c35 for (a.den = -2; a.den <= 2; a.den++) { in main()
37 for (b.den = -2; b.den <= 2; b.den++) { in main()
46 a.den, b.num, b.den, c,d); in main()
48 if(b.den && (r.num*a.den ! in main()
[all...]
/third_party/ffmpeg/libavfilter/
H A Daf_aspectralstats.c213 float num = 0.f, den = 0.f; in spectral_centroid() local
217 den += spectral[n]; in spectral_centroid()
220 if (den <= FLT_EPSILON) in spectral_centroid()
222 return num / den; in spectral_centroid()
228 float num = 0.f, den = 0.f; in spectral_spread() local
232 den += spectral[n]; in spectral_spread()
235 if (den <= FLT_EPSILON) in spectral_spread()
237 return sqrtf(num / den); in spectral_spread()
248 float num = 0.f, den = 0.f; in spectral_skewness() local
252 den in spectral_skewness()
264 float num = 0.f, den = 0.f; spectral_kurtosis() local
279 float num = 0.f, den = 0.f; spectral_entropy() local
293 float num = 0.f, den = 0.f; spectral_flatness() local
338 float mean_spectral = 0.f, num = 0.f, den = 0.f; spectral_slope() local
356 float num = 0.f, den = 0.f; spectral_decrease() local
[all...]
H A Dvf_aspect.c82 if (sar.num && sar.den) { in compute_dar()
83 av_reduce(&dar->num, &dar->den, sar.num * (int64_t)w, sar.den * (int64_t)h, INT_MAX); in compute_dar()
85 av_reduce(&dar->num, &dar->den, w, h, INT_MAX); in compute_dar()
101 (double) inlink->sample_aspect_ratio.num / inlink->sample_aspect_ratio.den : 1; in get_aspect_ratio()
120 if (aspect_ratio->num < 0 || aspect_ratio->den <= 0) { in get_aspect_ratio()
143 if (s->dar.num && s->dar.den) { in setdar_config_props()
144 av_reduce(&s->sar.num, &s->sar.den, in setdar_config_props()
146 s->dar.den * inlink->w, INT_MAX); in setdar_config_props()
156 inlink->w, inlink->h, old_dar.num, old_dar.den, old_sa in setdar_config_props()
[all...]
H A Dvf_telecine.c90 s->pts.den += *p - '0'; in init()
97 s->pattern, s->out_cnt, s->pts.num, s->pts.den); in init()
144 if (!fps.num || !fps.den) { in config_output()
146 "current rate of %d/%d is invalid\n", fps.num, fps.den); in config_output()
151 inlink->frame_rate.num, inlink->frame_rate.den, fps.num, fps.den); in config_output()
156 inlink->time_base.num, inlink->time_base.den, outlink->time_base.num, outlink->time_base.den); in config_output()
248 s->ts_unit.den); in filter_frame()
H A Dsettb.c95 if (time_base.num <= 0 || time_base.den <= 0) { in config_output_props()
97 "Invalid non-positive values for the timebase num:%d or den:%d.\n", in config_output_props()
98 time_base.num, time_base.den); in config_output_props()
104 inlink ->time_base.num, inlink ->time_base.den, in config_output_props()
105 outlink->time_base.num, outlink->time_base.den); in config_output_props()
118 inlink ->time_base.num, inlink ->time_base.den, orig_pts, in rescale_pts()
119 outlink->time_base.num, outlink->time_base.den, new_pts); in rescale_pts()
/third_party/musl/libc-test/src/functionalext/supplement/stdlib/
H A Dimaxdiv.c21 * @tc.desc : Verify imaxdiv process success when param num is positive integer, param den is positive integer
27 intmax_t den = 3; in imaxdiv_0100() local
28 imaxdiv_t ret = imaxdiv(num, den); in imaxdiv_0100()
35 * @tc.desc : Verify imaxdiv process success when param num is positive integer, param den is negative integer
41 intmax_t den = -3; in imaxdiv_0200() local
42 imaxdiv_t ret = imaxdiv(num, den); in imaxdiv_0200()
49 * @tc.desc : Verify imaxdiv process success when param num is negative integer, param den is positive integer
55 intmax_t den = 3; in imaxdiv_0300() local
56 imaxdiv_t ret = imaxdiv(num, den); in imaxdiv_0300()
63 * @tc.desc : Verify imaxdiv process success when param num is negative integer, param den i
69 intmax_t den = -3; imaxdiv_0400() local
[all...]
/third_party/python/Modules/
H A D_statisticsmodule.c33 double q, num, den, r, x; in _statistics__normal_dist_inv_cdf_impl() local
50 den = (((((((5.2264952788528545610e+3 * r + in _statistics__normal_dist_inv_cdf_impl()
58 if (den == 0.0) { in _statistics__normal_dist_inv_cdf_impl()
61 x = num / den; in _statistics__normal_dist_inv_cdf_impl()
80 den = (((((((1.05075007164441684324e-9 * r + in _statistics__normal_dist_inv_cdf_impl()
99 den = (((((((2.04426310338993978564e-15 * r + in _statistics__normal_dist_inv_cdf_impl()
108 if (den == 0.0) { in _statistics__normal_dist_inv_cdf_impl()
111 x = num / den; in _statistics__normal_dist_inv_cdf_impl()
/third_party/icu/tools/unicode/c/genprops/
H A Dcorepropsbuilder.cpp164 denominator: den = 20<<(frac20>>2)
168 denominator: den = 32<<(frac32>>2)
364 static int32_t encodeFractional20(int32_t value, int32_t den) { in encodeFractional20() argument
365 if(den<20 || 640<den) { return -1; } in encodeFractional20()
374 if(den==20) { in encodeFractional20()
377 if(den&1) { in encodeFractional20()
378 return -1; // odd denominator, and we would lose the low bit in den/=2 in encodeFractional20()
380 den/=2; in encodeFractional20()
382 } while(den> in encodeFractional20()
386 encodeFractional32(int32_t value, int32_t den) encodeFractional32() argument
421 int32_t value=0, den=0, exp=0, ntv=0; encodeNumericValue() local
[all...]
/third_party/ffmpeg/libavcodec/
H A Dh265_metadata_bsf.c164 if (ctx->tick_rate.num && ctx->tick_rate.den) { in h265_metadata_update_vps()
165 int num, den; in h265_metadata_update_vps() local
167 av_reduce(&num, &den, ctx->tick_rate.num, ctx->tick_rate.den, in h265_metadata_update_vps()
171 vps->vps_num_units_in_tick = den; in h265_metadata_update_vps()
196 if (ctx->sample_aspect_ratio.num && ctx->sample_aspect_ratio.den) { in h265_metadata_update_sps()
205 int num, den, i; in h265_metadata_update_sps() local
207 av_reduce(&num, &den, ctx->sample_aspect_ratio.num, in h265_metadata_update_sps()
208 ctx->sample_aspect_ratio.den, 65535); in h265_metadata_update_sps()
212 den in h265_metadata_update_sps()
279 int num, den; h265_metadata_update_sps() local
[all...]
H A Dmpeg2_metadata_bsf.c85 if (ctx->display_aspect_ratio.num && ctx->display_aspect_ratio.den) { in mpeg2_metadata_update_fragment()
86 int num, den; in mpeg2_metadata_update_fragment() local
88 av_reduce(&num, &den, ctx->display_aspect_ratio.num, in mpeg2_metadata_update_fragment()
89 ctx->display_aspect_ratio.den, 65535); in mpeg2_metadata_update_fragment()
91 if (num == 4 && den == 3) in mpeg2_metadata_update_fragment()
93 else if (num == 16 && den == 9) in mpeg2_metadata_update_fragment()
95 else if (num == 221 && den == 100) in mpeg2_metadata_update_fragment()
101 if (ctx->frame_rate.num && ctx->frame_rate.den) { in mpeg2_metadata_update_fragment()
/third_party/pulseaudio/speex/libspeexdsp/
H A Dtestecho.c22 SpeexPreprocessState *den; in main() local
35 den = speex_preprocess_state_init(NN, sampleRate); in main()
37 speex_preprocess_ctl(den, SPEEX_PREPROCESS_SET_ECHO_STATE, st); in main()
44 speex_preprocess_run(den, e_buf); in main()
48 speex_preprocess_state_destroy(den); in main()
/third_party/musl/src/math/
H A Dtgamma.c91 double_t num = 0, den = 0; in S() local
98 den = den * x + Sden[i]; in S()
103 den = den / x + Sden[i]; in S()
105 return num/den; in S()
/third_party/musl/porting/liteos_a/kernel/src/math/
H A Dtgamma.c91 double_t num = 0, den = 0; in S() local
98 den = den * x + Sden[i]; in S()
103 den = den / x + Sden[i]; in S()
105 return num/den; in S()
/third_party/ffmpeg/libavformat/
H A Dapngenc.c94 if (apng->last_delay.num > UINT16_MAX || apng->last_delay.den > UINT16_MAX) { in apng_write_header()
95 av_reduce(&apng->last_delay.num, &apng->last_delay.den, in apng_write_header()
96 apng->last_delay.num, apng->last_delay.den, UINT16_MAX); in apng_write_header()
99 apng->last_delay.num, apng->last_delay.den, (double)apng->last_delay.num / apng->last_delay.den); in apng_write_header()
194 delay.den = AV_RB16(existing_fcTL_chunk + 22); in flush_packet()
196 if (delay.num == 0 && delay.den == 0) { in flush_packet()
201 int64_t delay_den_raw = codec_stream->time_base.den; in flush_packet()
202 if (!av_reduce(&delay.num, &delay.den, delay_num_raw, delay_den_raw, UINT16_MAX) && in flush_packet()
219 AV_WB16(new_fcTL_chunk + 22, delay.den); in flush_packet()
[all...]
H A Davformat.c596 av_reduce(&stream_sample_aspect_ratio.num, &stream_sample_aspect_ratio.den, in av_guess_sample_aspect_ratio()
597 stream_sample_aspect_ratio.num, stream_sample_aspect_ratio.den, INT_MAX); in av_guess_sample_aspect_ratio()
598 if (stream_sample_aspect_ratio.num <= 0 || stream_sample_aspect_ratio.den <= 0) in av_guess_sample_aspect_ratio()
601 av_reduce(&frame_sample_aspect_ratio.num, &frame_sample_aspect_ratio.den, in av_guess_sample_aspect_ratio()
602 frame_sample_aspect_ratio.num, frame_sample_aspect_ratio.den, INT_MAX); in av_guess_sample_aspect_ratio()
603 if (frame_sample_aspect_ratio.num <= 0 || frame_sample_aspect_ratio.den <= 0) in av_guess_sample_aspect_ratio()
619 if (avg_fr.num > 0 && avg_fr.den > 0 && fr.num > 0 && fr.den > 0 && in av_guess_frame_rate()
625 if ( codec_fr.num > 0 && codec_fr.den > 0 && in av_guess_frame_rate()
654 enc_ctx->time_base.num = ist->r_frame_rate.den; in avformat_transfer_internal_stream_timing_info()
[all...]
H A Dmccdec.c124 int num = -1, den = -1; in mcc_read_header() local
128 den = 1; in mcc_read_header()
130 av_reduce(&num, &den, num * 1000LL, 1001, INT_MAX); in mcc_read_header()
134 if (num > 0 && den > 0) { in mcc_read_header()
135 rate = av_make_q(num, den); in mcc_read_header()
136 avpriv_set_pts_info(st, 64, rate.den, rate.num); in mcc_read_header()
144 ts = av_sat_add64(av_rescale(hh * 3600LL + mm * 60LL + ss, rate.num, rate.den), fs); in mcc_read_header()
/third_party/musl/src/stdlib/
H A Dimaxdiv.c3 imaxdiv_t imaxdiv(intmax_t num, intmax_t den) in imaxdiv() argument
5 return (imaxdiv_t){ num/den, num%den }; in imaxdiv()
H A Dldiv.c3 ldiv_t ldiv(long num, long den) in ldiv() argument
5 return (ldiv_t){ num/den, num%den }; in ldiv()
H A Ddiv.c3 div_t div(int num, int den) in div() argument
5 return (div_t){ num/den, num%den }; in div()
H A Dlldiv.c3 lldiv_t lldiv(long long num, long long den) in lldiv() argument
5 return (lldiv_t){ num/den, num%den }; in lldiv()
/third_party/python/Lib/test/
H A Dtest_binop.py34 def __init__(self, num=0, den=1):
35 """Constructor: Rat([num[, den]]).
40 if not isint(den):
41 raise TypeError("Rat denominator must be int (%r)" % den)
43 if den == 0:
45 g = gcd(den, num)
47 self.__den = int(den//g)
55 """Accessor function for read-only 'den' attribute of Rat."""
57 den = property(_get_den, None) variable in Rat
72 """Convert a Rat to an int; self.den mus
[all...]
/third_party/mesa3d/src/tool/pps/
H A Dpps.h31 /// @param den Denominator
33 constexpr double ratio(double num, double den) in ratio() argument
35 return den > 0.0 ? num / den : 0.0; in ratio()

Completed in 20 milliseconds

12345678910>>...16