[neon/extras/phonon-backend-vlc/Neon/release] debian: add temporary patch to do some testing on a bug
Harald Sitter
null at kde.org
Fri Mar 19 15:18:39 GMT 2021
Git commit aad19bc2fd91c61138f50e38e0d24d918adb37e2 by Harald Sitter.
Committed on 19/03/2021 at 15:18.
Pushed by sitter into branch 'Neon/release'.
add temporary patch to do some testing on a bug
https://bugs.kde.org/show_bug.cgi?id=434506
A +117 -0 debian/patches/0001-line-calc-variants.patch
A +1 -0 debian/series
https://invent.kde.org/neon/extras/phonon-backend-vlc/commit/aad19bc2fd91c61138f50e38e0d24d918adb37e2
diff --git a/debian/patches/0001-line-calc-variants.patch b/debian/patches/0001-line-calc-variants.patch
new file mode 100644
index 0000000..b5f7c9b
--- /dev/null
+++ b/debian/patches/0001-line-calc-variants.patch
@@ -0,0 +1,117 @@
+From 1e743892d8e34bce9badf2b4994b84bb8579d2b2 Mon Sep 17 00:00:00 2001
+From: Harald Sitter <sitter at kde.org>
+Date: Fri, 19 Mar 2021 16:06:19 +0100
+Subject: [PATCH] line calc variants
+
+temporary patch to get some debugging data
+---
+ src/video/videomemorystream.cpp | 10 +++++-
+ src/video/videowidget.cpp | 63 +++++++++++++++++++++++++++++----
+ 2 files changed, 66 insertions(+), 7 deletions(-)
+
+diff --git a/src/video/videomemorystream.cpp b/src/video/videomemorystream.cpp
+index 6886bcf..d6426f2 100644
+--- a/src/video/videomemorystream.cpp
++++ b/src/video/videomemorystream.cpp
+@@ -135,7 +135,15 @@ unsigned VideoMemoryStream::formatCallbackInternal(void **opaque, char *chroma,
+ unsigned *width, unsigned *height,
+ unsigned *pitches, unsigned *lines)
+ {
+- return P_THIS->formatCallback(chroma, width, height, pitches, lines);
++ auto ret = P_THIS->formatCallback(chroma, width, height, pitches, lines);
++ qDebug("FORMAT[chroma: %s, w: %d, h: %d, pitch: %d, lines: %d, size: %d]",
++ chroma,
++ *width,
++ *height,
++ pitches[0],
++ lines[0],
++ ret);
++ return ret;
+ }
+
+ void VideoMemoryStream::formatCleanUpCallbackInternal(void *opaque)
+diff --git a/src/video/videowidget.cpp b/src/video/videowidget.cpp
+index bc03f8e..0719a3a 100644
+--- a/src/video/videowidget.cpp
++++ b/src/video/videowidget.cpp
+@@ -26,6 +26,7 @@
+ #include <QPaintEvent>
+
+ #include <vlc/vlc.h>
++#include <vlc/plugins/vlc_picture.h>
+
+ #include "utils/debug.h"
+ #include "mediaobject.h"
+@@ -90,13 +91,63 @@ private:
+ unsigned *pitches,
+ unsigned *lines)
+ {
++ qDebug() << "--------" << *width << *height <<*chroma;
++ QImage rgb32(*width, *height, QImage::Format_RGB32);
++
++ qDebug() << "rgb32" << rgb32.bytesPerLine() << rgb32.sizeInBytes() / rgb32.bytesPerLine() << rgb32.sizeInBytes();
++
++ const auto b = setPitchAndLines(vlc_fourcc_GetChromaDescription(VLC_CODEC_RGB32), *width, *height, pitches, lines);
++ qDebug() << "V rgb32" << *pitches << *lines << b;
++
++ // Fairly unclear what the last two arguments do, they same to make no diff for the planes though, so I guess they can be anything in our case.
++ auto picture = picture_New(VLC_CODEC_RGB32, *width, *height, 0, 0);
++ for (auto i = 0; i < picture->i_planes; ++i) {
++ auto plane = picture->p[i];
++ pitches[i] = plane.i_pitch;
++ lines[i] = plane.i_lines;
++
++ qDebug() << ":: V rgb32 [" << i << "]" << plane.i_pitch << plane.i_lines << plane.i_visible_pitch << plane.i_visible_lines << plane.i_pixel_pitch;
++ }
++
+ qstrcpy(chroma, "RV32");
+- unsigned bufferSize = setPitchAndLines(vlc_fourcc_GetChromaDescription(VLC_CODEC_RGB32),
+- *width, *height,
+- pitches, lines);
+- m_plane.resize(bufferSize);
+- m_frame = QImage(reinterpret_cast<const uchar *>(m_plane.constData()),
+- *width, *height, pitches[0], QImage::Format_RGB32);
++ unsigned bufferSize = 0;
++ if (qEnvironmentVariableIsSet("P_OUR_MATHS")) {
++ bufferSize = setPitchAndLines(vlc_fourcc_GetChromaDescription(VLC_CODEC_RGB32), *width, *height, pitches, lines);
++ m_plane.resize(bufferSize);
++ m_frame = QImage(
++ reinterpret_cast<const uchar *>(m_plane.constData()), *width, *height, pitches[0], QImage::Format_RGB32);
++ } else if (qEnvironmentVariableIsSet("P_QIMAGE")) {
++ *pitches = rgb32.bytesPerLine();
++ *lines = rgb32.sizeInBytes() / rgb32.bytesPerLine();
++ bufferSize = rgb32.sizeInBytes();
++ m_plane.resize(bufferSize);
++ m_frame = rgb32;
++ } else if (qEnvironmentVariableIsSet("P_PIC_ALIGN")) {
++ *pitches = picture->p[0].i_pitch;
++ *lines = picture->p[0].i_lines;
++ bufferSize = *pitches * *lines;
++ m_plane.resize(bufferSize);
++ m_frame = QImage(
++ reinterpret_cast<const uchar *>(m_plane.constData()), *width, *height, pitches[0], QImage::Format_RGB32);
++
++ } else if (qEnvironmentVariableIsSet("P_PIC_VIS")) {
++ *pitches = picture->p[0].i_visible_pitch;
++ *lines = picture->p[0].i_visible_pitch;
++ bufferSize = *pitches * *lines;
++ m_plane.resize(bufferSize);
++ m_frame = QImage(reinterpret_cast<const uchar *>(m_plane.constData()),
++ *width,
++ *height,
++ pitches[0],
++ QImage::Format_RGB32);
++ } else {
++ bufferSize = setPitchAndLines(vlc_fourcc_GetChromaDescription(VLC_CODEC_RGB32),
++ *width, *height,
++ pitches, lines);
++ m_plane.resize(bufferSize);
++ m_frame = QImage(reinterpret_cast<const uchar *>(m_plane.constData()),
++ *width, *height, pitches[0], QImage::Format_RGB32);
++ }
+ return bufferSize;
+ }
+
+--
+2.25.1
+
diff --git a/debian/series b/debian/series
new file mode 100644
index 0000000..aa6f55a
--- /dev/null
+++ b/debian/series
@@ -0,0 +1 @@
+0001-line-calc-variants.patch
More information about the Neon-commits
mailing list