Skip to content
Snippets Groups Projects
Commit fed95c83 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Increase bitrates

parent a24cd871
No related branches found
No related tags found
1 merge request!232Resolves #298 and resolves #291 framerate issue
Pipeline #19452 passed
This commit is part of merge request !232. Comments created here will be created in the context of that merge request.
......@@ -77,14 +77,14 @@ static ftl::codecs::format_t formatFromPacket(const ftl::codecs::Packet &pkt) {
static uint64_t calculateBitrate(definition_t def, float ratescale) {
float bitrate = 1.0f; // Megabits
switch (def) {
case definition_t::UHD4k : bitrate = 32.0f; break;
case definition_t::HTC_VIVE : bitrate = 16.0f; break;
case definition_t::HD1080 : bitrate = 6.0f; break;
case definition_t::HD720 : bitrate = 4.0f; break;
case definition_t::UHD4k : bitrate = 40.0f; break;
case definition_t::HTC_VIVE : bitrate = 32.0f; break;
case definition_t::HD1080 : bitrate = 12.0f; break;
case definition_t::HD720 : bitrate = 8.0f; break;
case definition_t::SD576 :
case definition_t::SD480 : bitrate = 2.0f; break;
case definition_t::LD360 : bitrate = 1.0f; break;
default : bitrate = 8.0f;
case definition_t::SD480 : bitrate = 4.0f; break;
case definition_t::LD360 : bitrate = 2.0f; break;
default : bitrate = 16.0f;
}
bitrate *= 1000.0f*1000.0f;
......
......@@ -80,9 +80,9 @@ bool Net::post(const ftl::codecs::StreamPacket &spkt, const ftl::codecs::Packet
// Quality filter the packets
if (pkt.bitrate > 0 && pkt.bitrate != client.quality) {
++c;
//++c;
LOG(INFO) << "Incorrect quality: " << (int)pkt.bitrate << " but requested " << (int)client.quality;
continue;
//continue;
}
try {
......
......@@ -269,7 +269,7 @@ void Sender::_encodeChannel(const ftl::rgbd::FrameSet &fs, Channel c, bool reset
pkt.frame_count = count;
pkt.codec = codec;
pkt.definition = definition_t::Any;
pkt.bitrate = max_bitrate;
pkt.bitrate = (!lossless && ftl::codecs::isFloatChannel(c)) ? max_bitrate : max_bitrate/2;
pkt.flags = 0;
if (!lossless && ftl::codecs::isFloatChannel(c)) pkt.flags = ftl::codecs::kFlagFloat | ftl::codecs::kFlagMappedDepth;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment