jsimd.h 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. * jsimd.h
  3. *
  4. * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
  5. * Copyright (C) 2011, 2014, D. R. Commander.
  6. * Copyright (C) 2015, Matthieu Darbois.
  7. *
  8. * Based on the x86 SIMD extension for IJG JPEG library,
  9. * Copyright (C) 1999-2006, MIYASAKA Masaru.
  10. * For conditions of distribution and use, see copyright notice in jsimdext.inc
  11. *
  12. */
  13. #include "jchuff.h" /* Declarations shared with jcphuff.c */
  14. EXTERN(int) jsimd_can_rgb_ycc (void);
  15. EXTERN(int) jsimd_can_rgb_gray (void);
  16. EXTERN(int) jsimd_can_ycc_rgb (void);
  17. EXTERN(int) jsimd_can_ycc_rgb565 (void);
  18. EXTERN(int) jsimd_c_can_null_convert (void);
  19. EXTERN(void) jsimd_rgb_ycc_convert
  20. (j_compress_ptr cinfo, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  21. JDIMENSION output_row, int num_rows);
  22. EXTERN(void) jsimd_rgb_gray_convert
  23. (j_compress_ptr cinfo, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  24. JDIMENSION output_row, int num_rows);
  25. EXTERN(void) jsimd_ycc_rgb_convert
  26. (j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row,
  27. JSAMPARRAY output_buf, int num_rows);
  28. EXTERN(void) jsimd_ycc_rgb565_convert
  29. (j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row,
  30. JSAMPARRAY output_buf, int num_rows);
  31. EXTERN(void) jsimd_c_null_convert
  32. (j_compress_ptr cinfo, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
  33. JDIMENSION output_row, int num_rows);
  34. EXTERN(int) jsimd_can_h2v2_downsample (void);
  35. EXTERN(int) jsimd_can_h2v1_downsample (void);
  36. EXTERN(void) jsimd_h2v2_downsample
  37. (j_compress_ptr cinfo, jpeg_component_info *compptr,
  38. JSAMPARRAY input_data, JSAMPARRAY output_data);
  39. EXTERN(int) jsimd_can_h2v2_smooth_downsample (void);
  40. EXTERN(void) jsimd_h2v2_smooth_downsample
  41. (j_compress_ptr cinfo, jpeg_component_info *compptr,
  42. JSAMPARRAY input_data, JSAMPARRAY output_data);
  43. EXTERN(void) jsimd_h2v1_downsample
  44. (j_compress_ptr cinfo, jpeg_component_info *compptr,
  45. JSAMPARRAY input_data, JSAMPARRAY output_data);
  46. EXTERN(int) jsimd_can_h2v2_upsample (void);
  47. EXTERN(int) jsimd_can_h2v1_upsample (void);
  48. EXTERN(int) jsimd_can_int_upsample (void);
  49. EXTERN(void) jsimd_h2v2_upsample
  50. (j_decompress_ptr cinfo, jpeg_component_info *compptr,
  51. JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
  52. EXTERN(void) jsimd_h2v1_upsample
  53. (j_decompress_ptr cinfo, jpeg_component_info *compptr,
  54. JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
  55. EXTERN(void) jsimd_int_upsample
  56. (j_decompress_ptr cinfo, jpeg_component_info *compptr,
  57. JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
  58. EXTERN(int) jsimd_can_h2v2_fancy_upsample (void);
  59. EXTERN(int) jsimd_can_h2v1_fancy_upsample (void);
  60. EXTERN(void) jsimd_h2v2_fancy_upsample
  61. (j_decompress_ptr cinfo, jpeg_component_info *compptr,
  62. JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
  63. EXTERN(void) jsimd_h2v1_fancy_upsample
  64. (j_decompress_ptr cinfo, jpeg_component_info *compptr,
  65. JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
  66. EXTERN(int) jsimd_can_h2v2_merged_upsample (void);
  67. EXTERN(int) jsimd_can_h2v1_merged_upsample (void);
  68. EXTERN(void) jsimd_h2v2_merged_upsample
  69. (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
  70. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  71. EXTERN(void) jsimd_h2v1_merged_upsample
  72. (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
  73. JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
  74. EXTERN(int) jsimd_can_huff_encode_one_block (void);
  75. EXTERN(JOCTET*) jsimd_huff_encode_one_block
  76. (void *state, JOCTET *buffer, JCOEFPTR block, int last_dc_val,
  77. c_derived_tbl *dctbl, c_derived_tbl *actbl);