Objective function in loss based bwe v2

212 views
Skip to first unread message

Leon Chen

unread,
May 6, 2024, 1:51:22 AMMay 6
to discuss-webrtc
Dear all,

Can anyone explain what is the rationale behind the objective in loss based bwe v2? The code is below:

LossBasedBweV2::GetObjective
    const ChannelParameters& channel_parameters) const {
...
    if (config_->use_byte_loss_rate) {
      objective +=
          temporal_weight *
          ((ToKiloBytes(observation.lost_size) * std::log(loss_probability)) +
           (ToKiloBytes(observation.size - observation.lost_size) *
            std::log(1.0 - loss_probability)));
      objective +=
          temporal_weight * high_bandwidth_bias * ToKiloBytes(observation.size);
    } else {
    ...
}

The objective is basically the negated entropy with a scale factor plus a bias. To maximize the objective, won't we simply make loss_probability = 0 or 1?

Anyone can explain the rationale behind it?

Thanks.

Jason Gu

unread,
May 6, 2024, 9:57:24 PMMay 6
to discuss-webrtc
The objective function should be like this:
objective.png
Here N_loss means num_lost_packets, N_recv means num_received_packets. (If use_byte_loss_rate, then convert them to bytes.)

However, for the convenience of calculation, we use log for the above objective function:
objective_log.png

Yang皮孩

unread,
May 8, 2024, 4:50:43 AMMay 8
to discuss...@googlegroups.com
请教大佬有遇到v2在固定丢包率达到15%以上码率就会降到30k吗? 这个版本的bwe不会使用receive report的数据,用的tcc feedback包接收包统计,这个数据不能被篡改,否则发送端不会响应对方已收到包的nack请求

Jason Gu <guzh...@163.com> 于2024年5月7日周二 09:57写道:
--
This list falls under the WebRTC Code of Conduct - https://webrtc.org/support/code-of-conduct.
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/0e258f3d-af18-4fcc-85ba-e4e35d67c3c6n%40googlegroups.com.

Jason Gu

unread,
May 8, 2024, 9:12:17 PMMay 8
to discuss-webrtc
Yes, this is a problem. In normal the real network packet loss rate won't be over 15%. But in some bad situation when the loss rate is larger, the loss based bwe v2 algorithm won't work correctly. So we modified the algorithm and applied a patent for that modification: https://patents.google.com/patent/CN116248973A/zh

Yang皮孩

unread,
May 8, 2024, 9:33:18 PMMay 8
to discuss...@googlegroups.com
This should perform well on the native side, but is there any way to achieve similar results in Chrome? Or is there any way to disable v2 and maintain v1
thanks!

Jason Gu <guzh...@163.com> 于2024年5月9日周四 09:12写道:

Jason Gu

unread,
May 8, 2024, 11:38:33 PMMay 8
to discuss-webrtc
I'm not familiar with Chrome and the web interface, but if you don't want to use the bandwidth estimation result, just simply set the min bitrate of PeerConnection as what you want (PeerConnection::SetBitrate).  

Leon Chen

unread,
May 15, 2024, 12:00:33 PMMay 15
to discuss-webrtc
Thanks Jason for the explanation! It makes sense to me now. In the code, there is an exponentially increasing weight temporal_weight in front of the log likelihood for each observation window (corresponding to i in your formula). Does it take into account the relative importance of observation windows? Intuitively, it makes sense. I guess the weight is selected based on testing on experimental data?
Reply all
Reply to author
Forward
0 new messages