Validate 60 fps probe bitstreams in both orientations
This commit is contained in:
1 parent
0830fe4461
commit
238ebcc751
2 files changed
+8
-4
No files matched your search
@@ -206,6 +206,7 @@ utun_CORE_SOURCES = \
|
||||
call/call_video_fixtures.h \
|
||||
call/call_video_portrait_fixtures.h \
|
||||
call/call_video_fullhd_fixtures.h \
|
||||
call/call_video_fast_fixtures.h \
|
||||
call/call_video.h \
|
||||
call/call_video_transport.c \
|
||||
call/call_video_transport.h \
|
||||
|
||||
@@ -169,17 +169,20 @@ static void bitstreams(void) {
|
||||
uint8_t bytes[8192]; struct call_video_bitstream s;
|
||||
for (int codec = 1; codec <= 2; ++codec) {
|
||||
for (int profile = 1; profile <= 2; ++profile)
|
||||
for (unsigned fps = 30; fps <= 60; fps += 30)
|
||||
for (int fullhd = 0; fullhd <= 1; ++fullhd) for (int portrait = 0; portrait <= 1; portrait++) {
|
||||
unsigned w = fullhd ? 1920 : 1280, h = fullhd ? 1080 : 720;
|
||||
int size = call_video_probe_key(codec, profile, portrait ? h : w, portrait ? w : h, bytes, sizeof(bytes)); CHECK(size > 0);
|
||||
int size = call_video_probe_key(codec, profile, portrait ? h : w, portrait ? w : h, fps, bytes, sizeof(bytes)); CHECK(size > 0);
|
||||
int inspected = call_video_inspect_key(codec, bytes, size, &s);
|
||||
if (inspected) DEBUG_ERROR(DEBUG_CATEGORY_CALL, "fixture rejected codec=%d profile=%d size=%ux%u bytes=%d",
|
||||
codec, profile, portrait ? h : w, portrait ? w : h, size);
|
||||
CHECK(!inspected);
|
||||
CHECK(s.width == (portrait ? h : w) && s.height == (portrait ? w : h)
|
||||
&& s.profile == (unsigned)profile && s.level == (codec == 1 ? (fullhd ? 40u : 31u) : (fullhd || profile == 2 ? 120u : 93u)));
|
||||
&& s.profile == (unsigned)profile && s.level == (codec == 1
|
||||
? (fullhd ? (fps == 60 ? 42u : 40u) : (fps == 60 ? 32u : 31u))
|
||||
: (fullhd ? (fps == 60 ? 123u : 120u) : (fps == 60 || profile == 2 ? 120u : 93u))));
|
||||
CHECK(s.dpb >= 3);
|
||||
struct call_video_format f = {1, s.width, s.height, 30, 0, codec, s.level, 4000000, profile};
|
||||
struct call_video_format f = {1, s.width, s.height, fps, 0, codec, s.level, 4000000, profile};
|
||||
CHECK(!call_video_check_key(&f, bytes, size));
|
||||
if (codec == CALL_VIDEO_H265 && profile == CALL_VIDEO_MAIN_HIGH_TIER) {
|
||||
f.profile = CALL_VIDEO_MAIN; CHECK(call_video_check_key(&f, bytes, size) < 0); f.profile = profile;
|
||||
@@ -217,7 +220,7 @@ static size_t hevc_segment(uint8_t *data, unsigned first, unsigned enabled, unsi
|
||||
}
|
||||
static void hevc_pps_flags(void) {
|
||||
uint8_t bytes[8192]; struct call_video_bitstream stream;
|
||||
int size = call_video_probe_key(CALL_VIDEO_H265, CALL_VIDEO_MAIN, 1280, 720, bytes, sizeof(bytes)); CHECK(size > 0);
|
||||
int size = call_video_probe_key(CALL_VIDEO_H265, CALL_VIDEO_MAIN, 1280, 720, 30, bytes, sizeof(bytes)); CHECK(size > 0);
|
||||
size_t pps = 0, config = 4 + ((unsigned)bytes[2] << 8 | bytes[3]);
|
||||
for (size_t i = 4; i + 5 < config; ++i)
|
||||
if (!bytes[i] && !bytes[i + 1] && bytes[i + 2] == 1 && bytes[i + 3] == 68) pps = i + 5;
|
||||
|
||||
Reference in new issue
Block a user