xref: /OK3568_Linux_fs/external/rockit/mpi/example/include/test_comm_tde.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * Copyright 2021 Rockchip Electronics Co. LTD
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef SRC_TESTS_RT_MPI_COMMON_TEST_COMM_TDE_H_
18 #define SRC_TESTS_RT_MPI_COMMON_TEST_COMM_TDE_H_
19 
20 #include "rk_common.h"
21 #include "rk_comm_tde.h"
22 
23 #ifdef __cplusplus
24 #if __cplusplus
25 extern "C" {
26 #endif
27 #endif /* End of #ifdef __cplusplus */
28 
29 typedef enum TEST_TDE_OP_TYPE_E {
30     TDE_OP_QUICK_COPY = 0,
31     TDE_OP_QUICK_RESIZE,
32     TDE_OP_QUICK_FILL,
33     TDE_OP_ROTATION,
34     TDE_OP_MIRROR,
35     TDE_OP_COLOR_KEY
36 } TEST_TDE_OP_TYPE_E;
37 
38 typedef struct _TEST_TDE_PROC_CTX {
39     const char *srcFileName;
40     const char *dstFileName;
41     TDE_SURFACE_S pstSrc;
42     TDE_RECT_S pstSrcRect;
43     TDE_SURFACE_S pstDst;
44     TDE_RECT_S pstDstRect;
45     TDE_OPT_S stOpt;
46     RK_S32 fillData;
47     ROTATION_E rotateAngle;
48     RK_S32 opType;
49     RK_S32 s32JobNum;
50     RK_S32 s32TaskNum;
51     RK_S32 s32ProcessTimes;
52 } TEST_TDE_PROC_CTX_S;
53 
54 RK_S32 TEST_TDE_TransSurfaceToVideoFrame(TEST_TDE_PROC_CTX_S *pstCtx, VIDEO_FRAME_INFO_S *pstFrames);
55 
56 TDE_HANDLE TEST_TDE_BeginJob();
57 RK_S32 TEST_TDE_AddTask(TEST_TDE_PROC_CTX_S *pstCtx, TDE_HANDLE jobHandle);
58 RK_S32 TEST_TDE_EndJob(TDE_HANDLE jobHandle);
59 
60 RK_S32 TEST_TDE_LoadSrcFrame(TEST_TDE_PROC_CTX_S *pstCtx);
61 RK_S32 TEST_TDE_CreateDstFrame(TEST_TDE_PROC_CTX_S *pstCtx);
62 RK_S32 TEST_TDE_CreateDstCMAFrame(TEST_TDE_PROC_CTX_S *pstCtx);
63 RK_S32 TEST_TDE_ProcessJob(TEST_TDE_PROC_CTX_S *pstCtx, VIDEO_FRAME_INFO_S *pstFrames);
64 RK_S32 TEST_TDE_Single_ProcessJob(TEST_TDE_PROC_CTX_S *pstCtx, VIDEO_FRAME_INFO_S *pstFrames);
65 RK_S32 TEST_TDE_MultiTest(TEST_TDE_PROC_CTX_S *ctx);
66 
67 #ifdef __cplusplus
68 #if __cplusplus
69 }
70 #endif
71 #endif /* End of #ifdef __cplusplus */
72 
73 #endif  // SRC_TESTS_RT_MPI_COMMON_TEST_COMM_TDE_H_
74