Probe HEVC High tier on Android and desktop receivers
This commit is contained in:
1 parent
f2d67990f8
commit
08c74894ef
3 files changed
+37
-16
No files matched your search
@@ -244,7 +244,7 @@ call_video_caps CallVideoDecoder::capabilities(const std::atomic<bool>* running)
|
||||
call_video_caps probed{};
|
||||
for (unsigned codec = 1; codec <= 2; ++codec) {
|
||||
unsigned profiles = 0, maximumTier = 0;
|
||||
for (unsigned profile = 1; profile <= (codec == 1 ? 2u : 1u); ++profile) {
|
||||
for (unsigned profile = 1; profile <= 2; ++profile) {
|
||||
for (unsigned tier = 0; tier < 2; ++tier) {
|
||||
const unsigned width = tier ? 1920 : 1280, height = tier ? 1080 : 720;
|
||||
for (Backend backend : {Backend::HardwareOnly, Backend::SoftwareOnly}) {
|
||||
@@ -260,7 +260,8 @@ call_video_caps CallVideoDecoder::capabilities(const std::atomic<bool>* running)
|
||||
call_video_frame input{}; input.call_id = 1; input.flags = CALL_VIDEO_KEY;
|
||||
input.data = bytes; input.size = input.length = size;
|
||||
input.format = {1, (uint16_t)w, (uint16_t)h, 30, 0,
|
||||
(uint8_t)codec, (uint8_t)(codec == 1 ? (tier ? 40 : 31) : (tier ? 120 : 93)), 4000000, (uint8_t)profile};
|
||||
(uint8_t)codec, (uint8_t)(codec == 1 ? (tier ? 40 : 31) : (tier || profile == 2 ? 120 : 93)),
|
||||
4000000, (uint8_t)profile};
|
||||
unsigned sent = 0, received = 0; bool valid = true, outputBeforeEos = false;
|
||||
const int64_t start = call_video_playout_now_us();
|
||||
while (valid && received < 8 && call_video_playout_now_us() - start < 1500000) {
|
||||
@@ -303,7 +304,7 @@ call_video_caps CallVideoDecoder::capabilities(const std::atomic<bool>* running)
|
||||
if (profiles) {
|
||||
const uint16_t width = maximumTier ? 1920 : 1280, height = maximumTier ? 1080 : 720;
|
||||
call_video_limit limit{width, height, 30, uint32_t(width) * height * 30, 4000000, (uint8_t)profiles,
|
||||
(uint8_t)(codec == 1 ? (maximumTier ? 40 : 31) : (maximumTier ? 120 : 93))};
|
||||
(uint8_t)(codec == 1 ? (maximumTier ? 40 : 31) : (maximumTier || (profiles & CALL_VIDEO_MAIN_HIGH_TIER) ? 120 : 93))};
|
||||
if (!call_video_limit_orientations(&limit, codec)) probed.decode[codec - 1] = limit;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user