/third_party/ffmpeg/libavutil/ |
D | rational.c | 36 int64_t num, int64_t den, int64_t max) in av_reduce() argument 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() 53 int64_t next_den = num - den * x; in av_reduce() [all …]
|
D | rational.h | 60 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() 120 int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max); 161 AVRational r = { q.den, q.num }; in av_inv_q()
|
D | opt.c | 59 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 intnu… 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() 116 num*intnum/den, o->name); in write_number() 123 *(enum AVPixelFormat *)dst = llrint(num / den) * intnum; in write_number() 126 *(enum AVSampleFormat *)dst = llrint(num / den) * intnum; in write_number() 131 *(int *)dst = llrint(num / den) * intnum; in write_number() [all …]
|
D | mathematics.c | 137 int64_t b = bq.num * (int64_t)cq.den; in av_rescale_q_rnd() 138 int64_t c = cq.num * (int64_t)bq.den; in av_rescale_q_rnd() 149 int64_t a = tb_a.num * (int64_t)tb_b.den; in av_compare_ts() 150 int64_t b = tb_b.num * (int64_t)tb_a.den; in av_compare_ts() 174 …== AV_NOPTS_VALUE || !duration || in_tb.num*(int64_t)out_tb.den <= out_tb.num*(int64_t)in_tb.den) { in av_rescale_delta() 198 m = inc_tb.num * (int64_t)ts_tb.den; in av_add_stable() 199 d = inc_tb.den * (int64_t)ts_tb.num; in av_add_stable()
|
/third_party/ffmpeg/libavutil/tests/ |
D | rational.c | 35 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 != a.num*r.den || !r.num != !a.num || !r.den != !a.den)) in main() 49 av_log(NULL, AV_LOG_ERROR, "%d/%d ", r.num, r.den); in main() 91 for (a.den = 1; a.den <= 10; a.den++) { in main() 92 if (av_gcd(a.num, a.den) > 1) in main() 95 for (b.den = 1; b.den <= 10; b.den++) { in main() 97 if (av_gcd(b.num, b.den) > 1) in main() 110 a.den, b.num, b.den, acc, exact); in main() [all …]
|
/third_party/ffmpeg/libavfilter/ |
D | af_aspectralstats.c | 213 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 += spectral[n]; in spectral_skewness() [all …]
|
D | vf_aspect.c | 82 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_sar.num, old_sar.den, in setdar_config_props() 157 dar.num, dar.den, outlink->sample_aspect_ratio.num, outlink->sample_aspect_ratio.den); in setdar_config_props() [all …]
|
D | vf_telecine.c | 90 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()
|
D | settb.c | 95 if (time_base.num <= 0 || time_base.den <= 0) { 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/ |
D | imaxdiv.c | 27 intmax_t den = 3; in imaxdiv_0100() local 28 imaxdiv_t ret = imaxdiv(num, den); in imaxdiv_0100() 41 intmax_t den = -3; in imaxdiv_0200() local 42 imaxdiv_t ret = imaxdiv(num, den); in imaxdiv_0200() 55 intmax_t den = 3; in imaxdiv_0300() local 56 imaxdiv_t ret = imaxdiv(num, den); in imaxdiv_0300() 69 intmax_t den = -3; in imaxdiv_0400() local 70 imaxdiv_t ret = imaxdiv(num, den); in imaxdiv_0400()
|
/third_party/python/Modules/ |
D | _statisticsmodule.c | 33 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/ |
D | corepropsbuilder.cpp | 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() 380 den/=2; in encodeFractional20() 382 } while(den>=20); in encodeFractional20() 386 static int32_t encodeFractional32(int32_t value, int32_t den) { in encodeFractional32() argument 387 if(den<32 || 256<den) { return -1; } in encodeFractional32() 396 if(den==32) { in encodeFractional32() 399 if(den&1) { in encodeFractional32() [all …]
|
/third_party/ffmpeg/libavcodec/ |
D | h265_metadata_bsf.c | 164 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 == sar_idc[i].den) in h265_metadata_update_sps() 218 sps->vui.sar_height = den; in h265_metadata_update_sps() [all …]
|
D | mpeg2_metadata_bsf.c | 85 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/ffmpeg/libavformat/ |
D | mux.c | 53 static void frac_init(FFFrac *f, int64_t val, int64_t num, int64_t den) in frac_init() argument 55 num += (den >> 1); in frac_init() 56 if (num >= den) { in frac_init() 57 val += num / den; in frac_init() 58 num = num % den; in frac_init() 62 f->den = den; in frac_init() 73 int64_t num, den; in frac_add() local 76 den = f->den; in frac_add() 78 f->val += num / den; in frac_add() 79 num = num % den; in frac_add() [all …]
|
D | mccdec.c | 124 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()
|
D | apngenc.c | 94 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()
|
D | avformat.c | 596 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() 655 enc_ctx->time_base.den = 2*ist->r_frame_rate.num; in avformat_transfer_internal_stream_timing_info() [all …]
|
D | dxa.c | 64 int num, den; in dxa_read_header() local 80 den = 1000; in dxa_read_header() 83 den = 100000; in dxa_read_header() 86 den = 10; in dxa_read_header() 137 av_reduce(&den, &num, den, num, (1UL<<31)-1); in dxa_read_header() 138 avpriv_set_pts_info(st, 33, num, den); in dxa_read_header() 149 s->duration = av_rescale(c->frames, AV_TIME_BASE * (int64_t)num, den); in dxa_read_header()
|
/third_party/musl/porting/liteos_a/kernel/src/math/ |
D | tgamma.c | 91 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/src/math/ |
D | tgamma.c | 91 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/skia/third_party/externals/icu/source/data/locales/ |
D | tk.txt | 951 one{"{0} g-den"} 952 other{"{0} g-den"} 964 one{"{0} g-den"} 965 other{"{0} g-den"} 1160 one{"{0} db-den"} 1161 other{"{0} db-den"} 1177 one{"{0} duş-den"} 1178 other{"{0} duş-den"} 1252 one{"{0} ç-den"} 1253 other{"{0} ç-den"} [all …]
|
/third_party/libwebsockets/plugins/ssh-base/crypto/ |
D | ge25519.c | 199 fe25519 t, chk, num, den, den2, den4, den6; in ge25519_unpackneg_vartime() local 204 fe25519_mul(&den, &num, &ge25519_ecd); /* den = dy^2 */ in ge25519_unpackneg_vartime() 206 fe25519_add(&den, &r->z, &den); /* den = dy^2+1 */ in ge25519_unpackneg_vartime() 210 fe25519_square(&den2, &den); in ge25519_unpackneg_vartime() 214 fe25519_mul(&t, &t, &den); in ge25519_unpackneg_vartime() 219 fe25519_mul(&t, &t, &den); in ge25519_unpackneg_vartime() 220 fe25519_mul(&t, &t, &den); in ge25519_unpackneg_vartime() 221 fe25519_mul(&r->x, &t, &den); in ge25519_unpackneg_vartime() 225 fe25519_mul(&chk, &chk, &den); in ge25519_unpackneg_vartime() 231 fe25519_mul(&chk, &chk, &den); in ge25519_unpackneg_vartime()
|
/third_party/python/Lib/test/ |
D | test_binop.py | 34 def __init__(self, num=0, den=1): argument 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) 57 den = property(_get_den, None) variable in Rat 218 self.assertEqual(a.den, 3) 221 self.assertEqual(a.den, 3) 224 self.assertEqual(a.den, 3) [all …]
|
/third_party/icu/icu4c/source/data/locales/ |
D | tk.txt | 1135 one{"{0} g-den"} 1136 other{"{0} g-den"} 1148 one{"{0} g-den"} 1149 other{"{0} g-den"} 1344 one{"{0} db-den"} 1345 other{"{0} db-den"} 1361 one{"{0} duş-den"} 1362 other{"{0} duş-den"} 1436 one{"{0} ç-den"} 1437 other{"{0} ç-den"} [all …]
|