mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Added x64 check for SSE2 OGG Theora Decoder
This commit is contained in:
parent
26241020ff
commit
bcb56a027d
2 changed files with 4 additions and 5 deletions
|
|
@ -285,8 +285,7 @@ U32 OggTheoraDecoder::read( OggTheoraFrame** buffer, U32 num )
|
||||||
|
|
||||||
// Transcode the packet.
|
// Transcode the packet.
|
||||||
|
|
||||||
#if ( defined( TORQUE_COMPILER_GCC ) || defined( TORQUE_COMPILER_VISUALC ) ) && defined( TORQUE_CPU_X86 )
|
#if ( defined( TORQUE_COMPILER_GCC ) || defined( TORQUE_COMPILER_VISUALC ) ) && (defined( TORQUE_CPU_X86 ) || defined( TORQUE_CPU_X64 ))
|
||||||
|
|
||||||
if( ( mTranscoder == TRANSCODER_Auto || mTranscoder == TRANSCODER_SSE2420RGBA ) &&
|
if( ( mTranscoder == TRANSCODER_Auto || mTranscoder == TRANSCODER_SSE2420RGBA ) &&
|
||||||
getDecoderPixelFormat() == PIXEL_FORMAT_420 &&
|
getDecoderPixelFormat() == PIXEL_FORMAT_420 &&
|
||||||
Platform::SystemInfo.processor.properties & CPU_PROP_SSE2 &&
|
Platform::SystemInfo.processor.properties & CPU_PROP_SSE2 &&
|
||||||
|
|
@ -420,7 +419,7 @@ void OggTheoraDecoder::_transcode( th_ycbcr_buffer ycbcr, U8* buffer, const U32
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#if defined( TORQUE_CPU_X86 )
|
#if (defined( TORQUE_CPU_X86 ) || defined( TORQUE_CPU_X64 ))
|
||||||
void OggTheoraDecoder::_transcode420toRGBA_SSE2( th_ycbcr_buffer ycbcr, U8* buffer, U32 width, U32 height, U32 pitch )
|
void OggTheoraDecoder::_transcode420toRGBA_SSE2( th_ycbcr_buffer ycbcr, U8* buffer, U32 width, U32 height, U32 pitch )
|
||||||
{
|
{
|
||||||
AssertFatal( width % 2 == 0, "OggTheoraDecoder::_transcode420toRGBA_SSE2() - width must be multiple of 2" );
|
AssertFatal( width % 2 == 0, "OggTheoraDecoder::_transcode420toRGBA_SSE2() - width must be multiple of 2" );
|
||||||
|
|
@ -560,7 +559,7 @@ void OggTheoraDecoder::_transcode420toRGBA_SSE2( th_ycbcr_buffer ycbcr, U8* buff
|
||||||
jnz hloop
|
jnz hloop
|
||||||
};
|
};
|
||||||
|
|
||||||
#elif defined( TORQUE_COMPILER_GCC ) && defined( TORQUE_CPU_X86 )
|
#elif defined( TORQUE_COMPILER_GCC ) && (defined( TORQUE_CPU_X86 ) || defined( TORQUE_CPU_X64 ))
|
||||||
|
|
||||||
asm( "pushal\n" // Save all general-purpose registers.
|
asm( "pushal\n" // Save all general-purpose registers.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@ class OggTheoraDecoder : public OggDecoder,
|
||||||
/// Generic transcoder going from any of the Y'CbCr pixel formats to
|
/// Generic transcoder going from any of the Y'CbCr pixel formats to
|
||||||
/// any RGB format (that is supported by GFXFormatUtils).
|
/// any RGB format (that is supported by GFXFormatUtils).
|
||||||
void _transcode( th_ycbcr_buffer ycbcr, U8* buffer, U32 width, U32 height );
|
void _transcode( th_ycbcr_buffer ycbcr, U8* buffer, U32 width, U32 height );
|
||||||
#if defined( TORQUE_CPU_X86 )
|
#if (defined( TORQUE_CPU_X86 ) || defined( TORQUE_CPU_X64 ))
|
||||||
/// Transcoder with fixed 4:2:0 to RGBA conversion using SSE2 assembly. Unused on 64 bit archetecture.
|
/// Transcoder with fixed 4:2:0 to RGBA conversion using SSE2 assembly. Unused on 64 bit archetecture.
|
||||||
void _transcode420toRGBA_SSE2( th_ycbcr_buffer ycbcr, U8* buffer, U32 width, U32 height, U32 pitch );
|
void _transcode420toRGBA_SSE2( th_ycbcr_buffer ycbcr, U8* buffer, U32 width, U32 height, U32 pitch );
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue