diff options
| author | Robert Mader <robert.mader@collabora.com> | 2025-10-12 23:26:40 +0200 |
|---|---|---|
| committer | Marvin W <git@larma.de> | 2025-11-15 09:55:43 -0500 |
| commit | bdb7e39ab5077de6ea21eb3925b8ae6ffa0f5009 (patch) | |
| tree | 704d21c266bc02050521bf21b8f22cf65100aa28 | |
| parent | d479ba81a66a835913697bacf3a0d912ef68346a (diff) | |
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.
| -rw-r--r-- | plugins/rtp/src/device.vala | 2 |
1 files changed, 1 insertions, 1 deletions
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; } } |
