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:
Jonathan Thomas
2013-02-12 03:16:16 -06:00
parent efc1ad47fe
commit 40e6f7da50
2 changed files with 13 additions and 6 deletions

View File

@@ -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;
}

View File

@@ -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);