Commit fe411776 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files
parent 4e8bd1d7
......@@ -3,7 +3,7 @@
<name>Dust</name>
<description>Add dust and specks to the video, as in old movies</description>
<author>Marco Gittler</author>
<parameter type="double" name="maxdiameter" max="100" min="0" default="2">
<parameter type="double" name="maxdiameter" max="100" min="0" default="2" suffix="%">
<name>Maximal Diameter</name>
</parameter>
<parameter type="double" name="maxcount" max="400" min="0" default="10">
......
......@@ -3,7 +3,7 @@
<name>Grain</name>
<description>Grain over the image</description>
<author>Marco Gittler</author>
<parameter type="double" name="noise" max="200" min="0" default="40">
<parameter type="double" name="noise" max="200" min="0" default="40" suffix="%">
<name>Noise</name>
</parameter>
<parameter type="double" name="contrast" max="400" min="0" default="160">
......
......@@ -6,7 +6,7 @@
<parameter type="double" name="delta" max="400" min="0" default="14">
<name>Y-Delta</name>
</parameter>
<parameter type="double" name="every" max="100" min="0" default="20">
<parameter type="double" name="every" max="100" min="0" default="20" suffix="%">
<name>% of picture have a delta</name>
</parameter>
<parameter type="double" name="brightnessdelta_up" max="100" min="0" default="20">
......@@ -15,7 +15,7 @@
<parameter type="double" name="brightnessdelta_down" max="100" min="0" default="30">
<name>Brightness down</name>
</parameter>
<parameter type="double" name="brightnessdelta_every" max="100" min="0" default="70">
<parameter type="double" name="brightnessdelta_every" max="100" min="0" default="70" suffix="%">
<name>Brightness every</name>
</parameter>
<parameter type="double" name="unevendevelop_up" max="100" min="0" default="60">
......
......@@ -44,7 +44,7 @@ QImage HistogramGenerator::calculateHistogram(const QSize &paradeSize, const QIm
const uint ww = paradeSize.width();
const uint wh = paradeSize.height();
const uint byteCount = iw*ih;
const uint stepsize = 4*accelFactor;
const uint stepsize = image.depth() / 8 *accelFactor;
const uchar *bits = image.bits();
QRgb *col;
......
......@@ -89,7 +89,7 @@ QImage RGBParadeGenerator::calculateRGBParade(const QSize &paradeSize, const QIm
}
const uchar *bits = image.bits();
const uint stepsize = 4*accelFactor;
const uint stepsize = image.depth() / 8 *accelFactor;
for (uint i = 0, x = 0; i < byteCount; i += stepsize) {
col = (QRgb *)bits;
......
......@@ -138,11 +138,11 @@ QImage VectorscopeGenerator::calculateVectorscope(const QSize &vectorscopeSize,
QPoint pt;
QRgb px;
const int stepsize = 4 * accelFactor;
const int stepsize = image.depth() / 8 * accelFactor;
// Just an average for the number of image pixels per scope pixel.
// NOTE: byteCount() has to be replaced by (img.bytesPerLine()*img.height()) for Qt 4.5 to compile, see: http://doc.trolltech.org/4.6/qimage.html#bytesPerLine
double avgPxPerPx = (double) 4*(image.bytesPerLine()*image.height())/scope.size().width()/scope.size().height()/accelFactor;
double avgPxPerPx = (double) image.depth() / 8 *(image.bytesPerLine()*image.height())/scope.size().width()/scope.size().height()/accelFactor;
for (int i = 0; i < (image.bytesPerLine()*image.height()); i+= stepsize) {
QRgb *col = (QRgb *) bits;
......
......@@ -76,8 +76,9 @@ QImage WaveformGenerator::calculateWaveform(const QSize &waveformSize, const QIm
const float wPrediv = (float)(ww-1)/(iw-1);
const uchar *bits = image.bits();
const int bpp = image.depth() / 8;
for (uint i = 0, x = 0; i < byteCount; i += 4) {
for (uint i = 0, x = 0; i < byteCount; i += bpp) {
Q_ASSERT(bits < image.bits() + byteCount);
......@@ -96,13 +97,13 @@ QImage WaveformGenerator::calculateWaveform(const QSize &waveformSize, const QIm
dx = x*wPrediv;
waveValues[(int)dx][(int)dy]++;
bits += 4;
x += 4;
bits += bpp;
x += bpp;
if (x > iw) {
x -= iw;
if (accelFactor > 1) {
bits += 4*iw*(accelFactor-1);
i += 4*iw*(accelFactor-1);
bits += bpp*iw*(accelFactor-1);
i += bpp*iw*(accelFactor-1);
}
}
}
......
......@@ -1899,7 +1899,7 @@ void Render::showFrame(Mlt::Frame* frame)
delete frame;
emit showImageSignal(qimage);
if (sendFrameForAnalysis) {
emit frameUpdated(qimage);//.rgbSwapped());
emit frameUpdated(qimage);
}
} else delete frame;
showFrameSemaphore.release();
......
......@@ -54,7 +54,7 @@ void AbstractGfxScopeWidget::mouseReleaseEvent(QMouseEvent *event)
void AbstractGfxScopeWidget::slotRenderZoneUpdated(const QImage frame)
{
QMutexLocker lock(&m_mutex);
m_scopeImage = frame;
m_scopeImage = frame.rgbSwapped();
AbstractScopeWidget::slotRenderZoneUpdated();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment