ialgo.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * Copyright (c) 2021 Alibaba Group. All rights reserved.
  3. * License-Identifier: Apache-2.0
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may
  6. * not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. *
  17. */
  18. #ifndef IALGO_H
  19. #define IALGO_H
  20. typedef struct csi_dsp_frame_meta{
  21. uint32_t frame_id;
  22. uint32_t temp_projector; //ͶÉäÆ÷ζÈ
  23. uint32_t temp_sensor; //sensor ζÈ
  24. uint64_t timestap;
  25. }csi_dsp_frame_meta_t;
  26. typedef struct csi_dsp_extra_param{
  27. uint16_t start_line;
  28. uint16_t end_line;
  29. uint32_t total_line;
  30. uint16_t report_buf_size;
  31. uint16_t report_size;
  32. uint32_t report_buf;
  33. csi_dsp_frame_meta_t frame_meta;
  34. }csi_dsp_extra_param_t;
  35. typedef struct csi_dsp_algo_param {
  36. uint32_t version;
  37. /*********************utility**********************************/
  38. int (*printf_func)(const char *fmt,...);
  39. void * (*get_idma_ctrl)();
  40. /****************read only by host filled by dsp********************/
  41. uint16_t buf_desc_num;
  42. uint16_t info_num_prop_des;
  43. uint16_t set_num_prop_des;
  44. void *buf_desc_ptr;
  45. void *info_prop_ptr;
  46. uint32_t info_prop_length;
  47. void *info_desc_ptr;
  48. void *set_desc_ptr;
  49. /****************read only by dsp filled by host********************/
  50. uint32_t buffer_num; //size of buffer array
  51. void *buffer_struct_ptr; // buffer array
  52. void *set_buf_ptr; //setting buffer
  53. uint32_t set_buf_size; // set_buf_ptr buffer size
  54. csi_dsp_extra_param_t* extra_param_ptr; //param for HW mode
  55. }csi_dsp_algo_param_t;
  56. typedef int (*algo_func)(csi_dsp_algo_param_t* context);
  57. typedef algo_func (*wrapper_func)(void* context);
  58. #endif /* */