PageRenderTime 53ms CodeModel.GetById 10ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/pods/SDL/GFX/ImageFilter.pod

http://github.com/PerlGameDev/SDL
Unknown | 553 lines | 460 code | 93 blank | 0 comment | 0 complexity | c9ee0eca219e41c96828bfe56e76a97a MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0
  1. =head1 NAME
  2. SDL::GFX::ImageFilter - image filtering functions
  3. =head1 CATEGORY
  4. TODO, GFX
  5. =head1 METHODS
  6. =head2 MMX_detect
  7. int
  8. gfx_image_MMX_detect()
  9. CODE:
  10. SDL_imageFilterMMXdetect();
  11. =head2 MMX_off
  12. void
  13. gfx_image_MMX_off()
  14. CODE:
  15. SDL_imageFilterMMXoff();
  16. =head2 MMX_on
  17. void
  18. gfx_image_MMX_on()
  19. CODE:
  20. SDL_imageFilterMMXon();
  21. =head2 add
  22. int
  23. gfx_image_add(Src1, Src2, Dest, length)
  24. unsigned char *Src1
  25. unsigned char *Src2
  26. unsigned char *Dest
  27. int length
  28. CODE:
  29. RETVAL = SDL_imageFilterAdd(Src1, Src2, Dest, length);
  30. OUTPUT:
  31. RETVAL
  32. =head2 mean
  33. int
  34. gfx_image_mean(Src1, Src2, Dest, length)
  35. unsigned char *Src1
  36. unsigned char *Src2
  37. unsigned char *Dest
  38. int length
  39. CODE:
  40. RETVAL = SDL_imageFilterMean(Src1, Src2, Dest, length);
  41. OUTPUT:
  42. RETVAL
  43. =head2 sub
  44. int
  45. gfx_image_sub(Src1, Src2, Dest, length)
  46. unsigned char *Src1
  47. unsigned char *Src2
  48. unsigned char *Dest
  49. int length
  50. CODE:
  51. RETVAL = SDL_imageFilterSub(Src1, Src2, Dest, length);
  52. OUTPUT:
  53. RETVAL
  54. =head2 abs_diff
  55. int
  56. gfx_image_abs_diff(Src1, Src2, Dest, length)
  57. unsigned char *Src1
  58. unsigned char *Src2
  59. unsigned char *Dest
  60. int length
  61. CODE:
  62. RETVAL = SDL_imageFilterAbsDiff(Src1, Src2, Dest, length);
  63. OUTPUT:
  64. RETVAL
  65. =head2 mult
  66. int
  67. gfx_image_mult(Src1, Src2, Dest, length)
  68. unsigned char *Src1
  69. unsigned char *Src2
  70. unsigned char *Dest
  71. int length
  72. CODE:
  73. RETVAL = SDL_imageFilterMult(Src1, Src2, Dest, length);
  74. OUTPUT:
  75. RETVAL
  76. =head2 mult_nor
  77. int
  78. gfx_image_mult_nor(Src1, Src2, Dest, length)
  79. unsigned char *Src1
  80. unsigned char *Src2
  81. unsigned char *Dest
  82. int length
  83. CODE:
  84. RETVAL = SDL_imageFilterMultNor(Src1, Src2, Dest, length);
  85. OUTPUT:
  86. RETVAL
  87. =head2 mult_div_by_2
  88. int
  89. gfx_image_mult_div_by_2(Src1, Src2, Dest, length)
  90. unsigned char *Src1
  91. unsigned char *Src2
  92. unsigned char *Dest
  93. int length
  94. CODE:
  95. RETVAL = SDL_imageFilterMultDivby2(Src1, Src2, Dest, length);
  96. OUTPUT:
  97. RETVAL
  98. =head2 mult_div_by_4
  99. int
  100. gfx_image_mult_div_by_4(Src1, Src2, Dest, length)
  101. unsigned char *Src1
  102. unsigned char *Src2
  103. unsigned char *Dest
  104. int length
  105. CODE:
  106. RETVAL = SDL_imageFilterMultDivby4(Src1, Src2, Dest, length);
  107. OUTPUT:
  108. RETVAL
  109. =head2 bit_and
  110. int
  111. gfx_image_bit_and(Src1, Src2, Dest, length)
  112. unsigned char *Src1
  113. unsigned char *Src2
  114. unsigned char *Dest
  115. int length
  116. CODE:
  117. RETVAL = SDL_imageFilterBitAnd(Src1, Src2, Dest, length);
  118. OUTPUT:
  119. RETVAL
  120. =head2 bit_or
  121. int
  122. gfx_image_bit_or(Src1, Src2, Dest, length)
  123. unsigned char *Src1
  124. unsigned char *Src2
  125. unsigned char *Dest
  126. int length
  127. CODE:
  128. RETVAL = SDL_imageFilterBitOr(Src1, Src2, Dest, length);
  129. OUTPUT:
  130. RETVAL
  131. =head2 div
  132. int
  133. gfx_image_div(Src1, Src2, Dest, length)
  134. unsigned char *Src1
  135. unsigned char *Src2
  136. unsigned char *Dest
  137. int length
  138. CODE:
  139. RETVAL = SDL_imageFilterDiv(Src1, Src2, Dest, length);
  140. OUTPUT:
  141. RETVAL
  142. =head2 bit_negation
  143. int
  144. gfx_image_bit_negation(Src1, Dest, length)
  145. unsigned char *Src1
  146. unsigned char *Dest
  147. int length
  148. CODE:
  149. RETVAL = SDL_imageFilterBitNegation(Src1, Dest, length);
  150. OUTPUT:
  151. RETVAL
  152. =head2 add_byte
  153. int
  154. gfx_image_add_byte(Src1, Dest, length, C)
  155. unsigned char *Src1
  156. unsigned char *Dest
  157. int length
  158. unsigned char C
  159. CODE:
  160. RETVAL = SDL_imageFilterAddByte(Src1, Dest, length, C);
  161. OUTPUT:
  162. RETVAL
  163. =head2 add_uint
  164. int
  165. gfx_image_add_uint(Src1, Dest, length, C)
  166. unsigned char *Src1
  167. unsigned char *Dest
  168. int length
  169. unsigned int C
  170. CODE:
  171. RETVAL = SDL_imageFilterAddUint(Src1, Dest, length, C);
  172. OUTPUT:
  173. RETVAL
  174. =head2 add_byte_to_half
  175. int
  176. gfx_image_add_byte_to_half(Src1, Dest, length, C)
  177. unsigned char *Src1
  178. unsigned char *Dest
  179. int length
  180. unsigned char C
  181. CODE:
  182. RETVAL = SDL_imageFilterAddByteToHalf(Src1, Dest, length, C);
  183. OUTPUT:
  184. RETVAL
  185. =head2 sub_byte
  186. int
  187. gfx_image_sub_byte(Src1, Dest, length, C)
  188. unsigned char *Src1
  189. unsigned char *Dest
  190. int length
  191. unsigned char C
  192. CODE:
  193. RETVAL = SDL_imageFilterSubByte(Src1, Dest, length, C);
  194. OUTPUT:
  195. RETVAL
  196. =head2 sub_uint
  197. int
  198. gfx_image_sub_uint(Src1, Dest, length, C)
  199. unsigned char *Src1
  200. unsigned char *Dest
  201. int length
  202. unsigned int C
  203. CODE:
  204. RETVAL = SDL_imageFilterSubUint(Src1, Dest, length, C);
  205. OUTPUT:
  206. RETVAL
  207. =head2 shift_right
  208. int
  209. gfx_image_shift_right(Src1, Dest, length, N)
  210. unsigned char *Src1
  211. unsigned char *Dest
  212. int length
  213. unsigned char N
  214. CODE:
  215. RETVAL = SDL_imageFilterShiftRight(Src1, Dest, length, N);
  216. OUTPUT:
  217. RETVAL
  218. =head2 shift_right_uint
  219. int
  220. gfx_image_shift_right_uint(Src1, Dest, length, N)
  221. unsigned char *Src1
  222. unsigned char *Dest
  223. int length
  224. unsigned char N
  225. CODE:
  226. RETVAL = SDL_imageFilterShiftRightUint(Src1, Dest, length, N);
  227. OUTPUT:
  228. RETVAL
  229. =head2 mult_by_byte
  230. int
  231. gfx_image_mult_by_byte(Src1, Dest, length, C)
  232. unsigned char *Src1
  233. unsigned char *Dest
  234. int length
  235. unsigned char C
  236. CODE:
  237. RETVAL = SDL_imageFilterMultByByte(Src1, Dest, length, C);
  238. OUTPUT:
  239. RETVAL
  240. =head2 shift_right_and_mult_by_byte
  241. int
  242. gfx_image_shift_right_and_mult_by_byte(Src1, Dest, length, N, C)
  243. unsigned char *Src1
  244. unsigned char *Dest
  245. int length
  246. unsigned char N
  247. unsigned char C
  248. CODE:
  249. RETVAL = SDL_imageFilterShiftRightAndMultByByte(Src1, Dest, length, N, C);
  250. OUTPUT:
  251. RETVAL
  252. =head2 shift_left_byte
  253. int
  254. gfx_image_shift_left_byte(Src1, Dest, length, N)
  255. unsigned char *Src1
  256. unsigned char *Dest
  257. int length
  258. unsigned char N
  259. CODE:
  260. RETVAL = SDL_imageFilterShiftLeftByte(Src1, Dest, length, N);
  261. OUTPUT:
  262. RETVAL
  263. =head2 shift_left_uint
  264. int
  265. gfx_image_shift_left_uint(Src1, Dest, length, N)
  266. unsigned char *Src1
  267. unsigned char *Dest
  268. int length
  269. unsigned char N
  270. CODE:
  271. RETVAL = SDL_imageFilterShiftLeftUint(Src1, Dest, length, N);
  272. OUTPUT:
  273. RETVAL
  274. =head2 shift_left
  275. int
  276. gfx_image_shift_left(Src1, Dest, length, N)
  277. unsigned char *Src1
  278. unsigned char *Dest
  279. int length
  280. unsigned char N
  281. CODE:
  282. RETVAL = SDL_imageFilterShiftLeft(Src1, Dest, length, N);
  283. OUTPUT:
  284. RETVAL
  285. =head2 binarize_using_threshold
  286. int
  287. gfx_image_binarize_using_threshold(Src1, Dest, length, T)
  288. unsigned char *Src1
  289. unsigned char *Dest
  290. int length
  291. unsigned char T
  292. CODE:
  293. RETVAL = SDL_imageFilterBinarizeUsingThreshold(Src1, Dest, length, T);
  294. OUTPUT:
  295. RETVAL
  296. =head2 clip_to_range
  297. int
  298. gfx_image_clip_to_range(Src1, Dest, length, Tmin, Tmax)
  299. unsigned char *Src1
  300. unsigned char *Dest
  301. int length
  302. unsigned char Tmin
  303. unsigned char Tmax
  304. CODE:
  305. RETVAL = SDL_imageFilterClipToRange(Src1, Dest, length, Tmin, Tmax);
  306. OUTPUT:
  307. RETVAL
  308. =head2 normalize_linear
  309. int
  310. gfx_image_normalize_linear(Src1, Dest, length, Cmin, Cmax, Nmin, Nmax)
  311. unsigned char *Src1
  312. unsigned char *Dest
  313. int length
  314. int Cmin
  315. int Cmax
  316. int Nmin
  317. int Nmax
  318. CODE:
  319. RETVAL = SDL_imageFilterNormalizeLinear(Src1, Dest, length, Cmin, Cmax, Nmin, Nmax);
  320. OUTPUT:
  321. RETVAL
  322. =head2 convolve_kernel_3x3_divide
  323. int
  324. gfx_image_convolve_kernel_3x3_divide(Src, Dest, rows, columns, Kernel, Divisor)
  325. unsigned char *Src
  326. unsigned char *Dest
  327. int rows
  328. int columns
  329. Sint16 *Kernel
  330. unsigned char Divisor
  331. CODE:
  332. RETVAL = SDL_imageFilterConvolveKernel3x3Divide(Src, Dest, rows, columns, Kernel, Divisor);
  333. OUTPUT:
  334. RETVAL
  335. =head2 convolve_kernel_5x5_divide
  336. int
  337. gfx_image_convolve_kernel_5x5_divide(Src, Dest, rows, columns, Kernel, Divisor)
  338. unsigned char *Src
  339. unsigned char *Dest
  340. int rows
  341. int columns
  342. Sint16 *Kernel
  343. unsigned char Divisor
  344. CODE:
  345. RETVAL = SDL_imageFilterConvolveKernel5x5Divide(Src, Dest, rows, columns, Kernel, Divisor);
  346. OUTPUT:
  347. RETVAL
  348. =head2 convolve_kernel_7x7_divide
  349. int
  350. gfx_image_convolve_kernel_7x7_divide(Src, Dest, rows, columns, Kernel, Divisor)
  351. unsigned char *Src
  352. unsigned char *Dest
  353. int rows
  354. int columns
  355. Sint16 *Kernel
  356. unsigned char Divisor
  357. CODE:
  358. RETVAL = SDL_imageFilterConvolveKernel7x7Divide(Src, Dest, rows, columns, Kernel, Divisor);
  359. OUTPUT:
  360. RETVAL
  361. =head2 convolve_kernel_9x9_divide
  362. int
  363. gfx_image_convolve_kernel_9x9_divide(Src, Dest, rows, columns, Kernel, Divisor)
  364. unsigned char *Src
  365. unsigned char *Dest
  366. int rows
  367. int columns
  368. Sint16 *Kernel
  369. unsigned char Divisor
  370. CODE:
  371. RETVAL = SDL_imageFilterConvolveKernel9x9Divide(Src, Dest, rows, columns, Kernel, Divisor);
  372. OUTPUT:
  373. RETVAL
  374. =head2 convolve_kernel_3x3_shift_right
  375. int
  376. gfx_image_convolve_kernel_3x3_shift_right(Src, Dest, rows, columns, Kernel, NRightShift)
  377. unsigned char *Src
  378. unsigned char *Dest
  379. int rows
  380. int columns
  381. Sint16 *Kernel
  382. unsigned char NRightShift
  383. CODE:
  384. RETVAL = SDL_imageFilterConvolveKernel3x3ShiftRight(Src, Dest, rows, columns, Kernel, NRightShift);
  385. OUTPUT:
  386. RETVAL
  387. =head2 convolve_kernel_5x5_shift_right
  388. int
  389. gfx_image_convolve_kernel_5x5_shift_right(Src, Dest, rows, columns, Kernel, NRightShift)
  390. unsigned char *Src
  391. unsigned char *Dest
  392. int rows
  393. int columns
  394. Sint16 *Kernel
  395. unsigned char NRightShift
  396. CODE:
  397. RETVAL = SDL_imageFilterConvolveKernel5x5ShiftRight(Src, Dest, rows, columns, Kernel, NRightShift);
  398. OUTPUT:
  399. RETVAL
  400. =head2 convolve_kernel_7x7_shift_right
  401. int
  402. gfx_image_convolve_kernel_7x7_shift_right(Src, Dest, rows, columns, Kernel, NRightShift)
  403. unsigned char *Src
  404. unsigned char *Dest
  405. int rows
  406. int columns
  407. Sint16 *Kernel
  408. unsigned char NRightShift
  409. CODE:
  410. RETVAL = SDL_imageFilterConvolveKernel7x7ShiftRight(Src, Dest, rows, columns, Kernel, NRightShift);
  411. OUTPUT:
  412. RETVAL
  413. =head2 convolve_kernel_9x9_shift_right
  414. int
  415. gfx_image_convolve_kernel_9x9_shift_right(Src, Dest, rows, columns, Kernel, NRightShift)
  416. unsigned char *Src
  417. unsigned char *Dest
  418. int rows
  419. int columns
  420. Sint16 *Kernel
  421. unsigned char NRightShift
  422. CODE:
  423. RETVAL = SDL_imageFilterConvolveKernel9x9ShiftRight(Src, Dest, rows, columns, Kernel, NRightShift);
  424. OUTPUT:
  425. RETVAL
  426. =head2 sobel_x
  427. int
  428. gfx_image_sobel_x(Src, Dest, rows, columns)
  429. unsigned char *Src
  430. unsigned char *Dest
  431. int rows
  432. int columns
  433. CODE:
  434. RETVAL = SDL_imageFilterSobelX(Src, Dest, rows, columns);
  435. OUTPUT:
  436. RETVAL
  437. =head2 sobel_x_shift_right
  438. int
  439. gfx_image_sobel_x_shift_right(Src, Dest, rows, columns, NRightShift)
  440. unsigned char *Src
  441. unsigned char *Dest
  442. int rows
  443. int columns
  444. unsigned char NRightShift
  445. CODE:
  446. RETVAL = SDL_imageFilterSobelXShiftRight(Src, Dest, rows, columns, NRightShift);
  447. OUTPUT:
  448. RETVAL
  449. =head2 align_stack
  450. void
  451. gfx_image_align_stack()
  452. CODE:
  453. SDL_imageFilterAlignStack();
  454. =head2 restore_stack
  455. void
  456. gfx_image_restore_stack()
  457. CODE:
  458. SDL_imageFilterRestoreStack();
  459. =head1 AUTHORS
  460. See L<SDL/AUTHORS>.