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