Home
last modified time | relevance | path

Searched refs:saturated_cast (Results 1 – 25 of 50) sorted by relevance

12

/external/webrtc/modules/video_coding/
Dmedia_opt_util.cc129 _protectionFactorD = rtc::saturated_cast<uint8_t>( in ProtectionFactor()
130 adjustRtt * rtc::saturated_cast<float>(_protectionFactorD)); in ProtectionFactor()
152 rtc::saturated_cast<float>(1 << (parameters->numLayers - 1)); in ComputeMaxFramesFec()
154 rtc::saturated_cast<int>( in ComputeMaxFramesFec()
271 return rtc::saturated_cast<uint8_t>( in ConvertFECRate()
273 rtc::saturated_cast<float>(255 - codeRateRTP)))); in ConvertFECRate()
290 uint8_t packetLoss = rtc::saturated_cast<uint8_t>(255 * parameters->lossPr); in ProtectionFactor()
301 uint8_t firstPartitionProt = rtc::saturated_cast<uint8_t>(255 * 0.20); in ProtectionFactor()
317 float spatialSizeToRef = rtc::saturated_cast<float>(parameters->codecWidth * in ProtectionFactor()
319 (rtc::saturated_cast<float>(704 * 576)); in ProtectionFactor()
[all …]
/external/libchrome/ui/gfx/geometry/
Dsafe_integer_conversions.h17 return base::saturated_cast<int>(std::floor(value)); in ToFlooredInt()
21 return base::saturated_cast<int>(std::ceil(value)); in ToCeiledInt()
25 return base::saturated_cast<int>(std::floor(value)); in ToFlooredInt()
29 return base::saturated_cast<int>(std::ceil(value)); in ToCeiledInt()
38 return base::saturated_cast<int>(rounded); in ToRoundedInt()
47 return base::saturated_cast<int>(rounded); in ToRoundedInt()
Drect.h308 int x = base::saturated_cast<int>(std::floor(rect.x() * x_scale)); in ScaleToEnclosingRectSafe()
309 int y = base::saturated_cast<int>(std::floor(rect.y() * y_scale)); in ScaleToEnclosingRectSafe()
310 int w = base::saturated_cast<int>(std::ceil(rect.width() * x_scale)); in ScaleToEnclosingRectSafe()
311 int h = base::saturated_cast<int>(std::ceil(rect.height() * y_scale)); in ScaleToEnclosingRectSafe()
/external/libchrome/base/numerics/
Dsafe_math_arm_impl.h57 return saturated_cast<V>(x + y); in Do()
66 return saturated_cast<V>(result); in Do()
83 return saturated_cast<V>(x - y); in Do()
92 return saturated_cast<V>(result); in Do()
114 return saturated_cast<V>(static_cast<Promotion>(x) * in Do()
Dclamped_math_impl.h227 ? saturated_cast<V>(x >> shift)
294 return IsGreater<T, U>::Test(x, y) ? saturated_cast<V>(x)
295 : saturated_cast<V>(y);
311 return IsLess<T, U>::Test(x, y) ? saturated_cast<V>(x)
312 : saturated_cast<V>(y);
327 return saturated_cast<V>(x OP y); \
Dclamped_math.h31 : value_(saturated_cast<T>(rhs.value_)) {} in ClampedNumeric()
40 : value_(saturated_cast<T>(value)) { in ClampedNumeric()
49 : value_(saturated_cast<T>(static_cast<Src>(value))) {} in ClampedNumeric()
165 return saturated_cast<typename ArithmeticOrUnderlyingEnum<Dst>::type>( in Dst()
/external/libchrome/base/
Dsafe_numerics_unittest.cc1145 EXPECT_EQ(DstLimits::max(), saturated_cast<Dst>(SrcLimits::max())); in Test()
1146 EXPECT_EQ(DstLimits::lowest(), saturated_cast<Dst>(SrcLimits::lowest())); in Test()
1149 EXPECT_EQ(Dst(0), saturated_cast<Dst>(SrcLimits::quiet_NaN())); in Test()
1200 EXPECT_EQ(DstLimits::max(), saturated_cast<Dst>(SrcLimits::max())); in Test()
1201 EXPECT_EQ(Dst(0), saturated_cast<Dst>(SrcLimits::lowest())); in Test()
1405 EXPECT_EQ(saturated_cast<int>(small_negative), in TEST()
1407 EXPECT_EQ(saturated_cast<int>(small_positive), in TEST()
1409 EXPECT_EQ(saturated_cast<unsigned>(small_negative), static_cast<unsigned>(0)); in TEST()
1410 EXPECT_EQ(saturated_cast<int>(double_small), static_cast<int>(double_small)); in TEST()
1411 EXPECT_EQ(saturated_cast<int>(double_large), numeric_limits<int>::max()); in TEST()
[all …]
/external/pdfium/core/fxcrt/
Dfx_coordinates.cpp131 rect.left = pdfium::base::saturated_cast<int>(floor(left)); in GetOuterRect()
132 rect.bottom = pdfium::base::saturated_cast<int>(ceil(top)); in GetOuterRect()
133 rect.right = pdfium::base::saturated_cast<int>(ceil(right)); in GetOuterRect()
134 rect.top = pdfium::base::saturated_cast<int>(floor(bottom)); in GetOuterRect()
141 rect.left = pdfium::base::saturated_cast<int>(ceil(left)); in GetInnerRect()
142 rect.bottom = pdfium::base::saturated_cast<int>(floor(top)); in GetInnerRect()
143 rect.right = pdfium::base::saturated_cast<int>(floor(right)); in GetInnerRect()
144 rect.top = pdfium::base::saturated_cast<int>(ceil(bottom)); in GetInnerRect()
/external/angle/src/common/third_party/base/anglebase/numerics/
Dsafe_numerics_unittest.cc28 using base::saturated_cast;
656 EXPECT_EQ(saturated_cast<int>(small_negative), static_cast<int>(small_negative)); in TEST()
657 EXPECT_EQ(saturated_cast<int>(small_positive), static_cast<int>(small_positive)); in TEST()
658 EXPECT_EQ(saturated_cast<unsigned>(small_negative), static_cast<unsigned>(0)); in TEST()
659 EXPECT_EQ(saturated_cast<int>(double_small), static_cast<int>(double_small)); in TEST()
660 EXPECT_EQ(saturated_cast<int>(double_large), numeric_limits<int>::max()); in TEST()
661 EXPECT_EQ(saturated_cast<float>(double_large), double_infinity); in TEST()
662 EXPECT_EQ(saturated_cast<float>(-double_large), -double_infinity); in TEST()
663 EXPECT_EQ(numeric_limits<int>::min(), saturated_cast<int>(double_small_int)); in TEST()
664 EXPECT_EQ(numeric_limits<int>::max(), saturated_cast<int>(double_large_int)); in TEST()
[all …]
/external/libchrome/base/i18n/
Dcase_conversion.cc67 &dest[0], saturated_cast<int32_t>(dest.size()), in CaseMap()
68 string.data(), saturated_cast<int32_t>(string.size()), in CaseMap()
/external/webrtc/modules/audio_processing/test/
Dfake_recording_device.cc79 data[i] = rtc::saturated_cast<int16_t>(data[i] * mic_level_ / divisor); in ModifyBufferInt16()
119 data[i] = rtc::saturated_cast<int16_t>(data[i] * scaling_factor); in ModifyBufferInt16()
/external/webrtc/modules/audio_mixer/
Dsine_wave_generator.cc30 rtc::saturated_cast<int16_t>(amplitude_ * sinf(phase_)); in GenerateNextFrame()
/external/webrtc/modules/audio_coding/neteq/
Dbuffer_level_filter.cc43 filtered_current_level_ = rtc::saturated_cast<int>(std::max<int64_t>( in Update()
Ddecision_logic.cc262 noise_fast_forward_ = rtc::saturated_cast<size_t>(noise_fast_forward_ + in CngOperation()
265 rtc::saturated_cast<int32_t>(timestamp_diff + excess_waiting_time_samp); in CngOperation()
/external/libchrome/base/metrics/
Dhistogram_base.cc117 Add(saturated_cast<Sample>(time.InMilliseconds())); in AddTimeMillisecondsGranularity()
125 Add(saturated_cast<Sample>(time.InMicroseconds())); in AddTimeMicrosecondsGranularity()
/external/webrtc/common_audio/signal_processing/
Ddot_product_with_scale.cc33 return rtc::saturated_cast<int32_t>(sum); in WebRtcSpl_DotProductWithScale()
/external/google-breakpad/src/client/linux/microdump_writer/
Dmicrodump_writer.cc70 Dst saturated_cast(Src src) { in saturated_cast() function
567 LogAppend(saturated_cast<uint16_t>(hole_cnt)); in DumpFreeSpace()
575 LogAppend(saturated_cast<uint8_t>(i)); in DumpFreeSpace()
577 LogAppend(saturated_cast<uint8_t>(hole_histogram[i])); in DumpFreeSpace()
/external/webrtc/pc/
Djitter_buffer_delay.cc58 rtc::saturated_cast<int>(delay_seconds.value_or(kDefaultDelay) * 1000); in Set()
Dpeer_connection_factory.cc377 rtc::saturated_cast<int>(min_bandwidth->bps()); in CreateCall_w()
379 rtc::saturated_cast<int>(start_bandwidth->bps()); in CreateCall_w()
381 rtc::saturated_cast<int>(max_bandwidth->bps()); in CreateCall_w()
/external/webrtc/modules/pacing/
Dinterval_budget.cc55 return rtc::saturated_cast<size_t>(std::max<int64_t>(0, bytes_remaining_)); in bytes_remaining()
/external/webrtc/rtc_base/numerics/
Dsafe_conversions.h49 inline constexpr Dst saturated_cast(Src value) { in saturated_cast() function
/external/webrtc/api/video/
Dvideo_timing.cc25 return rtc::saturated_cast<uint16_t>(time_ms - base_ms); in GetDeltaCappedMs()
/external/webrtc/audio/utility/
Daudio_frame_operations.cc69 out_data[i] = rtc::saturated_cast<int16_t>(wrap_guard); in Add()
290 frame_data[i] = rtc::saturated_cast<int16_t>(scale * frame_data[i]); in ScaleWithSat()
Dchannel_mixer.cc85 out_audio[index] = rtc::saturated_cast<int16_t>(acc_value); in Transform()
/external/pdfium/core/fxge/dib/
Dcfx_imagetransformer.cpp170 *x1 = pdfium::base::saturated_cast<int>(val.first / kBase); in Transform()
171 *y1 = pdfium::base::saturated_cast<int>(val.second / kBase); in Transform()
194 *x1 = pdfium::base::saturated_cast<int>(val.first / kBase); in Transform()
195 *y1 = pdfium::base::saturated_cast<int>(val.second / kBase); in Transform()

12