Cover Full HD KEY geometry in native validation tests

This commit is contained in:
evgeny committed 2026-10-19 22:37:12 +02:00
1 parent fb660f2b3e
commit 720ee64fd1
2 files changed
+8 -5

No files matched your search

+1
View File
@@ -205,6 +205,7 @@ utun_CORE_SOURCES = \
call/call_video_bitstream.h \
call/call_video_fixtures.h \
call/call_video_portrait_fixtures.h \
call/call_video_fullhd_fixtures.h \
call/call_video.h \
call/call_video_transport.c \
call/call_video_transport.h \
+7 -5
View File
@@ -159,11 +159,13 @@ static void rejected(void) {
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 <= (codec == 1 ? 2 : 1); ++profile) for (int portrait = 0; portrait <= 1; portrait++) {
int size = call_video_probe_key(codec, profile, portrait, bytes, sizeof(bytes)); CHECK(size > 0);
for (int profile = 1; profile <= (codec == 1 ? 2 : 1); ++profile)
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);
CHECK(!call_video_inspect_key(codec, bytes, size, &s));
CHECK(s.width == (portrait ? 720u : 1280u) && s.height == (portrait ? 1280u : 720u)
&& s.profile == (unsigned)profile && s.level == (codec == 1 ? 31u : 93u));
CHECK(s.width == (portrait ? h : w) && s.height == (portrait ? w : h)
&& s.profile == (unsigned)profile && s.level == (codec == 1 ? (fullhd ? 40u : 31u) : (fullhd ? 120u : 93u)));
CHECK(s.dpb >= 3);
struct call_video_format f = {1, s.width, s.height, 30, 0, codec, s.level, 4000000, profile};
CHECK(!call_video_check_key(&f, bytes, size));
@@ -200,7 +202,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, 0, bytes, sizeof(bytes)); CHECK(size > 0);
int size = call_video_probe_key(CALL_VIDEO_H265, CALL_VIDEO_MAIN, 1280, 720, 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;