int ow = frameWidth;
int oh = height;
mlt_image_format format = mlt_image_rgb24a;
-
+ frame->set("rescale.interp", "nearest");
+ frame->set("deinterlace_method", "onefield");
+ frame->set("progressive", "1");
const uchar* imagedata = frame->get_image(format, ow, oh);
QImage image(ow, oh, QImage::Format_ARGB32_Premultiplied);
memcpy(image.bits(), imagedata, ow * oh * 4);//.byteCount());
avg+=pivot[i];
#endif
}
- avg=avg/STEPS;
+ if (STEPS)
+ avg=avg/STEPS;
// Second Step: calculate delta (average?)
for (uint i=0; i<STEPS; i++)
{
#endif
delta+=curdelta;
}
- return delta/STEPS;
+ if (STEPS)
+ return delta/STEPS;
+ else
+ return 0;
}
/*
const int theight = KdenliveSettings::trackheight();
const int frameWidth = (int)(theight * m_ratio + 0.5);
const int displayWidth = (int)(theight * m_dar + 0.5);
- QString path = m_url.path() + "_";
+ QString path = m_url.path() + '_';
bool addedThumbs = false;
while (!m_intraFramesQueue.isEmpty()) {