gstdspipp.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*
  2. * Copyright (C) 2010 Nokia Corporation
  3. *
  4. * Authors:
  5. * Elamparithi Shanmugam <parithi@ti.com>
  6. * Felipe Contreras <felipe.contreras@nokia.com>
  7. *
  8. * This file may be used under the terms of the GNU Lesser General Public
  9. * License version 2.1, a copy of which is found in LICENSE included in the
  10. * packaging of this file.
  11. */
  12. #ifndef GST_DSP_IPP_H
  13. #define GST_DSP_IPP_H
  14. #include "gstdspbase.h"
  15. #include "sem.h"
  16. G_BEGIN_DECLS
  17. #define GST_DSP_IPP(obj) (GstDspIpp *)(obj)
  18. #define GST_DSP_IPP_TYPE (gst_dsp_ipp_get_type())
  19. #define GST_DSP_IPP_CLASS(obj) (GstDspIppClass *)(obj)
  20. #define IPP_MAX_NUM_OF_ALGOS 5
  21. typedef struct _GstDspIpp GstDspIpp;
  22. typedef struct _GstDspIppClass GstDspIppClass;
  23. struct ipp_algo {
  24. dmm_buffer_t *create_params;
  25. const char *fxn;
  26. const char *dma_fxn;
  27. dmm_buffer_t *in;
  28. dmm_buffer_t *out;
  29. /* TODO no need to keep these around */
  30. dmm_buffer_t *b_algo_fxn;
  31. dmm_buffer_t *b_dma_fxn;
  32. };
  33. struct ipp_eenf_params {
  34. uint32_t size;
  35. int16_t in_place;
  36. int16_t edge_enhancement_strength;
  37. int16_t weak_edge_threshold;
  38. int16_t strong_edge_threshold;
  39. int16_t low_freq_luma_noise_filter_strength;
  40. int16_t mid_freq_luma_noise_filter_strength;
  41. int16_t high_freq_luma_noise_filter_strength;
  42. int16_t low_freq_cb_noise_filter_strength;
  43. int16_t mid_freq_cb_noise_filter_strength;
  44. int16_t high_freq_cb_noise_filter_strength;
  45. int16_t low_freq_cr_noise_filter_strength;
  46. int16_t mid_freq_cr_noise_filter_strength;
  47. int16_t high_freq_cr_noise_filter_strength;
  48. int16_t shading_vert_param_1;
  49. int16_t shading_vert_param_2;
  50. int16_t shading_horz_param_1;
  51. int16_t shading_horz_param_2;
  52. int16_t shading_gain_scale;
  53. int16_t shading_gain_offset;
  54. int16_t shading_gain_max_value;
  55. int16_t ratio_downsample_cb_cr;
  56. };
  57. struct _GstDspIpp {
  58. GstDspBase element;
  59. int width, height;
  60. int in_pix_fmt;
  61. struct ipp_algo *algos[IPP_MAX_NUM_OF_ALGOS];
  62. unsigned nr_algos;
  63. GSem *msg_sem;
  64. struct ipp_eenf_params eenf_params;
  65. int eenf_strength;
  66. dmm_buffer_t *msg_ptr[3];
  67. dmm_buffer_t *flt_graph;
  68. struct td_buffer *in_buf_ptr;
  69. struct td_buffer *out_buf_ptr;
  70. dmm_buffer_t *intermediate_buf;
  71. dmm_buffer_t *dyn_params;
  72. dmm_buffer_t *status_params;
  73. };
  74. struct _GstDspIppClass {
  75. GstDspBaseClass parent_class;
  76. };
  77. GType gst_dsp_ipp_get_type(void);
  78. G_END_DECLS
  79. #endif /* GST_DSP_IPP_H */