From bdb7e39ab5077de6ea21eb3925b8ae6ffa0f5009 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Sun, 12 Oct 2025 23:26:40 +0200 Subject: rtp: device: Tweak common_widths for 16:9 ratio Most used widths can be devided by 4*3 as well as 16*9, resulting in heights being multiples of two. There are two exceptions, though: 360 (/16*9=202.5) and 400 (/16*9=225). Odd heights, while generally handled by Gstreamer, can cause issues in various places - most importantly hardware video en-/decoders and GL/VK drivers - as in most cases 2x0 or 2x2 subsampled intermediate pixel formats are used (such as I420, YUYV, NV12 etc.). Thus tweak the widths in question so they can be cleanly devided 16*9 and 4*3 with even results, as these are the most common ratios for cameras. --- plugins/rtp/src/device.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/rtp/src/device.vala b/plugins/rtp/src/device.vala index b80d31e3..160cadc0 100644 --- a/plugins/rtp/src/device.vala +++ b/plugins/rtp/src/device.vala @@ -10,7 +10,7 @@ public enum Dino.Plugins.Rtp.DeviceProtocol { } public class Dino.Plugins.Rtp.Device : MediaDevice, Object { - private const int[] common_widths = {320, 360, 400, 480, 640, 960, 1280, 1920, 2560, 3840}; + private const int[] common_widths = {320, 352, 416, 480, 640, 960, 1280, 1920, 2560, 3840}; public Plugin plugin { get; private set; } public CodecUtil codec_util { get { return plugin.codec_util; } } -- cgit v1.3