Add a function to copy PlaYUVerFrame
This commit is contained in:
1 parent
65858b2192
commit
c9549d5d40
2 files changed
+30
-2
No files matched your search
@@ -165,9 +165,7 @@ Void PlaYUVerFrame::FrameFromBuffer( Pel *input_buffer, Int pel_format )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
UInt64 frame_bytes_input = m_uiWidth * m_uiHeight;
|
||||
|
||||
switch( m_iPixelFormat )
|
||||
{
|
||||
case YUV420:
|
||||
@@ -185,6 +183,31 @@ Void PlaYUVerFrame::FrameFromBuffer( Pel *input_buffer, Int pel_format )
|
||||
}
|
||||
}
|
||||
|
||||
Void PlaYUVerFrame::CopyFrom( PlaYUVerFrame* input_frame )
|
||||
{
|
||||
if( m_iPixelFormat != input_frame->getPelFormat() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
UInt64 num_bytes = m_uiWidth * m_uiHeight;
|
||||
switch( m_iPixelFormat )
|
||||
{
|
||||
case YUV420:
|
||||
input_frame->getPelBufferYUV()
|
||||
memcpy( &m_pppcInputPel[0][0][0], &( input_frame->getPelBufferYUV()[0][0][0] ), num_bytes * sizeof(Pel) );
|
||||
memcpy( &m_pppcInputPel[1][0][0], &( input_frame->getPelBufferYUV()[1][0][0] ), num_bytes / 4 * sizeof(Pel) );
|
||||
memcpy( &m_pppcInputPel[2][0][0], &( input_frame->getPelBufferYUV()[2][0][0] ), num_bytes / 4 * sizeof(Pel) );
|
||||
YUV420toRGB();
|
||||
break;
|
||||
case YUV422:
|
||||
break;
|
||||
case YUV400:
|
||||
break;
|
||||
case RGB:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
UInt64 PlaYUVerFrame::getBytesPerFrame()
|
||||
{
|
||||
switch( m_iPixelFormat )
|
||||
|
||||
Reference in new issue
Block a user