Subversion Repositories pentevo

Rev

Rev 796 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed | ?url?

  1. #pragma once
  2.  
  3. struct RSM_DATA
  4. {
  5. #ifdef MOD_SSE2
  6.     typedef __m128i __m_vec;
  7. #else
  8.     typedef __m64 __m_vec;
  9. #endif // MOD_SSE2
  10.    const __m_vec *colortab; // tables for current frame
  11.  
  12.    enum { MAX_MIX_FRAMES = 8, FRAME_TABLES_SIZE = MAX_MIX_FRAMES*0x100*4*8 };
  13.    enum { MAX_LINE_DWORDS = MAX_WIDTH };
  14.    unsigned mix_frames, frame_table_size, line_size_d;
  15.    union {
  16.        __m_vec line_buffer[MAX_LINE_DWORDS/(sizeof(__m_vec)/sizeof(DWORD))];
  17.       unsigned line_buffer_d[MAX_LINE_DWORDS];
  18.    };
  19.  
  20.    unsigned period, frame, rbuf_dst, bias;
  21.  
  22.    unsigned char *data;
  23.    unsigned char *needframes; // new spectrum frames in next pc frame
  24.    __m_vec *tables;
  25.  
  26.    RSM_DATA() { data = nullptr; }
  27.    ~RSM_DATA() { free(data); }
  28.  
  29.    void prepare_line_8(unsigned char *src0);
  30.    void prepare_line_16(unsigned char *src0);
  31.    void prepare_line_32(unsigned char *src0);
  32.  
  33.    int mode;
  34.    // 0 - 16/32bit RGB. tables:  4*attr+2pix => 2 pixels in MMX QWORD
  35.    // 1 - 16bit YUY2.   tables: 16*attr+4pix => 4 pixels in MMX QWORD
  36.    // 2 - 8bit.         tables: 16*attr+4pix => 4 pixels in DWORD
  37.  
  38. };
  39.  
  40. extern RSM_DATA rsm;
  41.  
  42. void __fastcall render_rsm(unsigned char *dst, unsigned pitch);
  43. void calc_rsm_tables();
  44.