You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Fixed a HDMI color issue, where the numbers were too big (needed /255), which fixed all my alpha animation (i.e. fading) issues with HDMI.
This commit is contained in:
@@ -220,14 +220,16 @@ void DeckLinkOutputDelegate::WriteFrame(tr1::shared_ptr<openshot::Frame> frame)
|
||||
for (int packet = 0, row = 0; row < numBytes; packet++, row+=4)
|
||||
{
|
||||
// Update buffer (which is already linked to the AVFrame: pFrameRGB)
|
||||
//castBytes[row] = 0; // alpha
|
||||
castBytes[row+1] = pixel_packets[packet].red;
|
||||
castBytes[row+2] = pixel_packets[packet].green;
|
||||
castBytes[row+3] = pixel_packets[packet].blue;
|
||||
castBytes[row] = 0; // alpha
|
||||
castBytes[row+1] = pixel_packets[packet].red / 255;
|
||||
castBytes[row+2] = pixel_packets[packet].green / 255;
|
||||
castBytes[row+3] = pixel_packets[packet].blue / 255;
|
||||
}
|
||||
|
||||
#pragma omp critical (blackmagic_output_queue)
|
||||
{
|
||||
//if (20 == frame->number)
|
||||
// frame->Display();
|
||||
// Add processed frame to cache (to be recalled in order after the thread pool is done)
|
||||
temp_cache[copy_frameCount] = m_rgbFrame;
|
||||
}
|
||||
|
||||
@@ -44,8 +44,9 @@ int main(int argc, char *argv[])
|
||||
c3.scale = SCALE_NONE;
|
||||
//c1.End(30.0);
|
||||
c3.Layer(2);
|
||||
//c3.alpha.AddPoint(1,1);
|
||||
//c3.alpha.AddPoint(60,0);
|
||||
c3.alpha.AddPoint(1,1, LINEAR);
|
||||
c3.alpha.AddPoint(40,1, LINEAR);
|
||||
c3.alpha.AddPoint(100,0);
|
||||
t.AddClip(&c3);
|
||||
|
||||
// CLIP 4 (foreground image 2)
|
||||
@@ -53,6 +54,9 @@ int main(int argc, char *argv[])
|
||||
c4.gravity = GRAVITY_BOTTOM;
|
||||
c4.scale = SCALE_NONE;
|
||||
//c1.End(30.0);
|
||||
c4.alpha.AddPoint(1,1, LINEAR);
|
||||
c4.alpha.AddPoint(30,1, LINEAR);
|
||||
c4.alpha.AddPoint(60,0);
|
||||
c4.Layer(3);
|
||||
t.AddClip(&c4);
|
||||
|
||||
@@ -72,6 +76,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
// Send current frame to BlackMagic
|
||||
w.WriteFrame(f);
|
||||
//f->Display();
|
||||
|
||||
// Sleep some
|
||||
//usleep(1000 * 1);
|
||||
|
||||
Reference in New Issue
Block a user