openDsh / dash

Join us on Slack! https://join.slack.com/t/opendsh/shared_invite/zt-la398uly-a6eMH5ttEQhbtE6asVKx4Q
GNU General Public License v3.0
256 stars 80 forks source link

Green vertical border right hand side #101

Closed petterhj closed 2 years ago

petterhj commented 3 years ago

When Android Auto is connected, it's showing a green vertical border on the right hand side.

aadash

Hardware

Device Connection Method Screen Mobile Device
Raspberry Pi 4 4GB USB Cable Waveshare 7" 800x480 Rev2.1 Capacitive Touchscreen LCD Google Pixel 5

Installation Method: Install.sh

stefan-sherwood commented 3 years ago

https://github.com/openDsh/dash/pull/87#issuecomment-893832515

icecube45 commented 3 years ago

I was thinking I may have caused this with https://github.com/openDsh/openauto/pull/21 but looking closer at your screenshot, it looks like the green line has the border between the bottom bar drawn within it? That doesn't follow what I'd expect if my PR caused it. Regardless I'll double check things in my pull and make sure it's not a stupid mistake like integer division. Can I ask you for the resolution you're running dash within?

robert5974 commented 3 years ago

I've seen it for a while now as well. In the car with the official Pi screen, the resolution is 800x400.

icecube45 commented 2 years ago

Can someone confirm what combination of dash resolution and openauto resolution results in this issue? I'll try to replicate and hunt this down.

robert5974 commented 2 years ago

I have it with 800 x 480.

Robert Crowley

On Thu, Oct 28, 2021, 1:21 AM Cole Brinsfield @.***> wrote:

Can someone confirm what combination of dash resolution and openauto resolution results in this issue? I'll try to replicate and hunt this down.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openDsh/dash/issues/101#issuecomment-953512189, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLUDVEY7K7Z6P7M62BCPZDUJDMXLANCNFSM5DE5M3YQ .

icecube45 commented 2 years ago

I have it with 800 x 480. Robert Crowley On Thu, Oct 28, 2021, 1:21 AM Cole Brinsfield @.***> wrote: Can someone confirm what combination of dash resolution and openauto resolution results in this issue? I'll try to replicate and hunt this down. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#101 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLUDVEY7K7Z6P7M62BCPZDUJDMXLANCNFSM5DE5M3YQ .

For your dash window size? What resolution is android auto running at?

robert5974 commented 2 years ago

Well that's the resolution of the raspberry pi screen. I'll look at the log tomorrow morning and let you know what it says when I connect.

Robert Crowley

On Thu, Oct 28, 2021, 11:09 PM Cole Brinsfield @.***> wrote:

I have it with 800 x 480. Robert Crowley … <#m-3292313203083062488> On Thu, Oct 28, 2021, 1:21 AM Cole Brinsfield @.***> wrote: Can someone confirm what combination of dash resolution and openauto resolution results in this issue? I'll try to replicate and hunt this down. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#101 (comment) https://github.com/openDsh/dash/issues/101#issuecomment-953512189>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLUDVEY7K7Z6P7M62BCPZDUJDMXLANCNFSM5DE5M3YQ .

For your dash window size? What resolution is android auto running at?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openDsh/dash/issues/101#issuecomment-954388782, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLUDVFJIET34HNHFQRGOMLUJIF63ANCNFSM5DE5M3YQ .

icecube45 commented 2 years ago

Been able to poke at this a little, looks like it's not an integer division issue like I was hoping, but something more underlying in gstreamer. In addition to the green line, there's a subtle chroma shifting occurring on the decoded video - suggesting that some data is being misaligned. the video cropping plugin might be the culprit here - I need to keep digging.

icecube45 commented 2 years ago

Updating here for those not on slack, I believe I've found the cause and have a patch for qt-gstreamer to address this (see attached patch). I'll bring it into dash's install script along with the other changes I've been working on.

I can't truthfully say if my patch is "proper", as I don't know enough about video formats to be confident in that.

diff --git a/elements/gstqtvideosink/painters/videomaterial.cpp b/elements/gstqtvideosink/painters/videomaterial.cpp
index 7221aa5..958931d 100644
--- a/elements/gstqtvideosink/painters/videomaterial.cpp
+++ b/elements/gstqtvideosink/painters/videomaterial.cpp
@@ -305,10 +305,10 @@ void VideoMaterial::initYuv420PTextureInfo(bool uvSwapped, const QSize &size)
     m_textureWidths[0] = bytesPerLine;
     m_textureHeights[0] = size.height();
     m_textureOffsets[0] = 0;
-    m_textureWidths[1] = bytesPerLine2;
+    m_textureWidths[1] = bytesPerLine/2;
     m_textureHeights[1] = size.height() / 2;
     m_textureOffsets[1] = bytesPerLine * size.height();
-    m_textureWidths[2] = bytesPerLine2;
+    m_textureWidths[2] = bytesPerLine/2;
     m_textureHeights[2] = size.height() / 2;
     m_textureOffsets[2] = bytesPerLine * size.height() + bytesPerLine2 * size.height()/2;
icecube45 commented 2 years ago

Should be fixed by #107