im2d_mpi.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * Copyright (C) 2022 Rockchip Electronics Co., Ltd.
  3. * Authors:
  4. * Cerf Yu <cerf.yu@rock-chips.com>
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the "License");
  7. * you may not use this file except in compliance with the License.
  8. * You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. #ifndef _im2d_mpi_hpp_
  19. #define _im2d_mpi_hpp_
  20. #include "im2d_type.h"
  21. /**
  22. * Create and config an rga ctx for rockit-ko
  23. *
  24. * @param flags
  25. * Some configuration flags for this job
  26. *
  27. * @returns job id.
  28. */
  29. IM_EXPORT_API im_ctx_id_t imbegin(uint32_t flags);
  30. /**
  31. * Cancel and delete an rga ctx for rockit-ko
  32. *
  33. * @param flags
  34. * Some configuration flags for this job
  35. *
  36. * @returns success or else negative error code.
  37. */
  38. IM_EXPORT_API IM_STATUS imcancel(im_ctx_id_t id);
  39. /**
  40. * process for rockit-ko
  41. *
  42. * @param src
  43. * The input source image and is also the foreground image in blend.
  44. * @param dst
  45. * The output destination image and is also the foreground image in blend.
  46. * @param pat
  47. * The foreground image, or a LUT table.
  48. * @param srect
  49. * The rectangle on the src channel image that needs to be processed.
  50. * @param drect
  51. * The rectangle on the dst channel image that needs to be processed.
  52. * @param prect
  53. * The rectangle on the pat channel image that needs to be processed.
  54. * @param acquire_fence_fd
  55. * @param release_fence_fd
  56. * @param opt
  57. * The image processing options configuration.
  58. * @param usage
  59. * The image processing usage.
  60. * @param ctx_id
  61. * ctx id
  62. *
  63. * @returns success or else negative error code.
  64. */
  65. #ifdef __cplusplus
  66. IM_API IM_STATUS improcess(rga_buffer_t src, rga_buffer_t dst, rga_buffer_t pat,
  67. im_rect srect, im_rect drect, im_rect prect,
  68. int acquire_fence_fd, int *release_fence_fd,
  69. im_opt_t *opt, int usage, im_ctx_id_t ctx_id);
  70. #endif
  71. IM_EXPORT_API IM_STATUS improcess_ctx(rga_buffer_t src, rga_buffer_t dst, rga_buffer_t pat,
  72. im_rect srect, im_rect drect, im_rect prect,
  73. int acquire_fence_fd, int *release_fence_fd,
  74. im_opt_t *opt, int usage, im_ctx_id_t ctx_id);
  75. #endif /* #ifndef _im2d_mpi_hpp_ */