blit_soft.h
上传用户:wstnjxml
上传日期:2014-04-03
资源大小:7248k
文件大小:4k
源码类别:

Windows CE

开发平台:

C/C++

  1. /*****************************************************************************
  2.  *
  3.  * This program is free software ; you can redistribute it and/or modify
  4.  * it under the terms of the GNU General Public License as published by
  5.  * the Free Software Foundation; either version 2 of the License, or
  6.  * (at your option) any later version.
  7.  *
  8.  * This program is distributed in the hope that it will be useful,
  9.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11.  * GNU General Public License for more details.
  12.  *
  13.  * You should have received a copy of the GNU General Public License
  14.  * along with this program; if not, write to the Free Software
  15.  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  16.  *
  17.  * $Id: blit_soft.h 585 2006-01-16 09:48:55Z picard $
  18.  *
  19.  * The Core Pocket Media Player
  20.  * Copyright (c) 2004-2005 Gabor Kovacs
  21.  *
  22.  ****************************************************************************/
  23. #ifndef __BLIT_SOFT_H
  24. #define __BLIT_SOFT_H
  25. #define LOOKUP_FIX 4
  26. struct blit_soft;
  27. typedef void (STDCALL *blitsoftentry)(struct blit_soft* This, 
  28.   uint8_t** DstPtr,uint8_t** SrcPtr,
  29.   int DstPitch,int SrcPitch,
  30.   int Width,int Height,uintptr_t Src2SrcLast);
  31. typedef struct blit_soft
  32. {
  33. blitsoftentry Entry;
  34. void* LookUp_Data; //sh3 need it somewhere in the begining
  35. int16_t Col[3][2][4]; // should at offset 8 for mmx code
  36. dyncode Code;
  37. pixel Dst;
  38. pixel Src;
  39. blitfx FX;
  40. int SrcBPP;
  41. int SrcBPP2;
  42. int DstBPP;
  43. int DstBPP2;
  44. int SrcType;
  45. int DstType;
  46. int Caps;
  47. int SrcAlignPos;
  48. int DstAlignPos;
  49. int DstAlignSize;
  50. int SrcUVX2;
  51. int SrcUVY2;
  52. int SrcUVPitch2;
  53. int DstUVX2;
  54. int DstUVY2;
  55. int DstUVPitch2;
  56. int DirX; // destination space
  57. int DstSize[3];
  58. int DstPos[3];
  59. int SrcSize[3];
  60. int SrcPos[3];
  61. int RScaleX; // reverse scale, unit=16
  62. int RScaleY; // reverse scale, unit=16
  63. int DitherSize;
  64. const rgb* SrcPalette;
  65. const rgb* DstPalette;
  66. int SrcHalfX;
  67. int SrcHalfY;
  68. int SrcDoubleX;
  69. int SrcDoubleY;
  70. int DstHalfX;
  71. int DstHalfY;
  72. int DstDoubleX;
  73. int DstDoubleY;
  74. int DstStepX;
  75. boolmem_t ArithStretch;
  76. boolmem_t SwapXY;
  77. boolmem_t Slices;
  78. boolmem_t SlicesReverse;
  79. boolmem_t DstLeftRight;
  80. boolmem_t DstUpDown;
  81. boolmem_t SrcUpDown;
  82. boolmem_t ARM5;
  83. boolmem_t QAdd;
  84. boolmem_t WMMX;
  85. boolmem_t ColorLookup;
  86. boolmem_t Dither;
  87. boolmem_t SrcYUV;
  88. boolmem_t HalfX;
  89. boolmem_t HalfY;
  90. boolmem_t DoubleX;
  91. boolmem_t DoubleY;
  92. boolmem_t Scale;
  93. boolmem_t OnlyDiff;
  94. boolmem_t OnlyDiff2;// adjusted OnlyDiff (diff mode not always available)
  95. boolmem_t RealOnlyDiff;
  96. dyninst* PalPtr;
  97. dyninst* DiffMask;
  98. dyninst* InvertMask;
  99. dyninst* Skip;
  100. dyninst* YMul;
  101. dyninst* GAdd;
  102. dyninst* RAdd;
  103. dyninst* BAdd;
  104. dyninst* GVMul;
  105. dyninst* RVMul;
  106. dyninst* GUMul;
  107. dyninst* BUMul;
  108. dyninst* LookUp;
  109. int LookUp_U;
  110. int LookUp_V;
  111. int LookUp_Size;
  112. int _YMul;
  113. int _GAdd;
  114. int _RAdd;
  115. int _BAdd;
  116. int _GVMul;
  117. int _RVMul;
  118. int _GUMul;
  119. int _BUMul;
  120. bool_t IsYNextRow;
  121. bool_t IsUVNextRow;
  122. bool_t Upper;
  123. int Pos;
  124. int LookUpOfs;
  125. } blit_soft;
  126. void Stretch_RGB_UV(blit_soft* This);
  127. void Double_RGB_UV(blit_soft* This);
  128. void Fix_RGB_UV(blit_soft* This);
  129. void Fix_Gray_UV(blit_soft* This);
  130. void Half_RGB_UV(blit_soft* This);
  131. void Universal_RGB_UV(blit_soft* This);
  132. void Fix_Any_YUV(blit_soft* This);
  133. void Fix_PackedYUV_YUV(blit_soft* This);
  134. void WMMXFix_RGB_UV(blit_soft* This);
  135. void Any_RGB_RGB(blit_soft* This);
  136. void Stretch_RGB_RGB(blit_soft* This);
  137. void CalcColor(blit_soft* This);
  138. void CalcYUVLookUp(blit_soft* This);
  139. void CalcPalRGBLookUp(blit_soft* This);
  140. void CalcPalYUVLookUp(blit_soft* This);
  141. // 4*256:Y + 768*n:SAT + 4*256:U + 4*256:V 
  142. void CalcLookUp(blit_soft* This, bool_t Dither);
  143. void CalcYUVMMX(blit_soft* This);
  144. #endif