mirror of
https://github.com/androidx/media.git
synced 2025-05-15 19:49:50 +08:00
Fix integer bitrate division
PiperOrigin-RevId: 237028164
This commit is contained in:
parent
155a129d2c
commit
dd06a2d5f1
@ -352,7 +352,8 @@ public final class BufferSizeAdaptationBuilder {
|
||||
// buffer = slope * ln(bitrate) + intercept,
|
||||
// with buffer(minBitrate) = minBuffer and buffer(maxBitrate) = maxBuffer - hysteresisBuffer.
|
||||
bitrateToBufferFunctionSlope =
|
||||
(maxBufferUs - hysteresisBufferUs - minBufferUs) / Math.log(maxBitrate / minBitrate);
|
||||
(maxBufferUs - hysteresisBufferUs - minBufferUs)
|
||||
/ Math.log((double) maxBitrate / minBitrate);
|
||||
bitrateToBufferFunctionIntercept =
|
||||
minBufferUs - bitrateToBufferFunctionSlope * Math.log(minBitrate);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user