/[pcsx2_0.9.7]/trunk/pcsx2/IPU/mpeg2lib/Mpeg.h
ViewVC logotype

Diff of /trunk/pcsx2/IPU/mpeg2lib/Mpeg.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 273 by william, Fri Nov 12 01:10:22 2010 UTC revision 280 by william, Thu Dec 23 12:02:12 2010 UTC
# Line 24  Line 24 
24    
25  #pragma once  #pragma once
26    
 #include <xmmintrin.h>  
   
 template< typename T >  
 __noinline void memzero_sse_a( T& dest )  
 {  
 #define MZFqwc (sizeof(dest)/16)  
   
         C_ASSERT( (sizeof(dest) & 0xf) == 0 );  
   
         __m128 zeroreg = _mm_setzero_ps();  
   
         float (*destxmm)[4] = (float(*)[4])&dest;  
   
 #define StoreDestIdx(idx) case idx: _mm_store_ps(&destxmm[idx-1][0], zeroreg)  
   
         switch( MZFqwc & 0x07 )  
         {  
                 StoreDestIdx(0x07);  
                 StoreDestIdx(0x06);  
                 StoreDestIdx(0x05);  
                 StoreDestIdx(0x04);  
                 StoreDestIdx(0x03);  
                 StoreDestIdx(0x02);  
                 StoreDestIdx(0x01);  
         }  
   
         destxmm += (MZFqwc & 0x07);  
         for( uint i=0; i<MZFqwc / 8; ++i, destxmm+=8 )  
         {  
                 _mm_store_ps(&destxmm[0][0], zeroreg);  
                 _mm_store_ps(&destxmm[1][0], zeroreg);  
                 _mm_store_ps(&destxmm[2][0], zeroreg);  
                 _mm_store_ps(&destxmm[3][0], zeroreg);  
                 _mm_store_ps(&destxmm[4][0], zeroreg);  
                 _mm_store_ps(&destxmm[5][0], zeroreg);  
                 _mm_store_ps(&destxmm[6][0], zeroreg);  
                 _mm_store_ps(&destxmm[7][0], zeroreg);  
         }  
   
 #undef MZFqwc  
 };  
   
27  // the IPU is fixed to 16 byte strides (128-bit / QWC resolution):  // the IPU is fixed to 16 byte strides (128-bit / QWC resolution):
28  static const uint decoder_stride = 16;  static const uint decoder_stride = 16;
29    

Legend:
Removed from v.273  
changed lines
  Added in v.280

  ViewVC Help
Powered by ViewVC 1.1.22