From cd1839fecbab02633314c6218af7fdb20249e836 Mon Sep 17 00:00:00 2001 From: gx Date: Thu, 21 May 2026 23:34:40 +0100 Subject: [PATCH] =?UTF-8?q?vf=5Fcuda=5Fgrid:=20add=20main=5Fwith=5Fstrip?= =?UTF-8?q?=20layout=20(5=20cells,=20info=20strip=20=D0=B1=D0=B5=D0=B7=20i?= =?UTF-8?q?nput)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Layout 1280x720 output: cell 0: main 960×540 = 16:9 (no stretch при camera 1920x1080) cells 1-3: 320×180 preview right column (16:9 native) cell 4: 1280×180 info strip (full width bottom) Use case: cell 4 без input pad → blank background, overlay через icon/text overlays (Grafana, чат, status). Pipeline нужен 5й input source (lavfi color=black:size=1280x180:rate=25) для filter framesync. Решает user complaint: main_plus_preview cell 0 = 2/3 width × full height = 853×720 = 1.18:1 → 16:9 camera стretching по высоте. main_with_strip cell 0 = exact 16:9. Co-Authored-By: Claude Opus 4.7 --- libavfilter/vf_cuda_grid.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libavfilter/vf_cuda_grid.c b/libavfilter/vf_cuda_grid.c index 7197894..ad20f28 100644 --- a/libavfilter/vf_cuda_grid.c +++ b/libavfilter/vf_cuda_grid.c @@ -182,6 +182,19 @@ static const LayoutTemplate layouts[] = { "panoramic", 1, { {0.0f, 0.0f, 1.0f, 1.0f} } }, + { + /* Main 16:9 (960×540 при 1280×720 output) + 3 preview right + bottom strip. + * cell 4 = info strip (1280×180), без input pad → blank background для + * browser overlays / text / chat. Все cells 16:9 native — no stretch. */ + "main_with_strip", 5, + { + {0.0f, 0.0f, 0.75f, 0.75f}, /* 0: main 16:9 */ + {0.75f, 0.0f, 0.25f, 0.25f}, /* 1: preview top */ + {0.75f, 0.25f, 0.25f, 0.25f}, /* 2: preview mid */ + {0.75f, 0.5f, 0.25f, 0.25f}, /* 3: preview bot */ + {0.0f, 0.75f, 1.0f, 0.25f}, /* 4: info strip — для overlays */ + } + }, }; static const LayoutTemplate *find_layout(const char *name)