xref: /OK3568_Linux_fs/external/rockit/mpi/example/include/test_mod_vpss.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_MOD_VPSS_H_
18 #define SRC_TESTS_RT_MPI_COMMON_TEST_MOD_VPSS_H_
19 
20 #include "rk_common.h"
21 #include "rk_comm_vpss.h"
22 
23 #ifdef __cplusplus
24 #if __cplusplus
25 extern "C" {
26 #endif
27 #endif /* End of #ifdef __cplusplus */
28 
29 typedef struct _rkMpiVPSSCtx {
30     const char *srcFileName;
31     const char *dstFilePath;
32     RK_S32  s32LoopCount;
33     RK_S32  s32VProcDevType;
34     RK_S32  s32GrpNum;
35     RK_S32  s32ChnNum;
36     RK_BOOL bGrpCropEn;
37     RK_BOOL bChnCropEn;
38     RK_S32  s32GrpCropRatio;
39     RK_S32  s32ChnCropRatio;
40 
41     RK_S32  s32SrcWidth;
42     RK_S32  s32SrcHeight;
43     RK_S32  s32SrcVirWidth;
44     RK_S32  s32SrcVirHeight;
45     RK_S32  s32SrcCompressMode;
46     RK_S32  s32SrcPixFormat;
47 
48     RK_S32  s32DstWidth;
49     RK_S32  s32DstHeight;
50     RK_S32  s32DstCompressMode;
51     RK_S32  s32DstPixFormat;
52 
53     RK_S32  s32GrpRotation;
54     RK_S32  s32Rotation;
55     RK_S32  s32RotationEx;
56     RK_S32  s32Mirror;
57     RK_S32  s32Flip;
58 
59     RK_BOOL bAttachPool;
60     RK_S32  s32ChnMode;
61     RK_U32  u32ChnDepth;
62 
63     RK_S32  s32SrcChnRate;
64     RK_S32  s32DstChnRate;
65     RK_S32  s32SrcGrpRate;
66     RK_S32  s32DstGrpRate;
67 
68     RK_S32  s32GrpIndex;
69     MB_POOL attachPool;
70 } TEST_VPSS_CTX_S;
71 
72 RK_S32 TEST_VPSS_ModInit(TEST_VPSS_CTX_S *pstCtx);
73 RK_S32 TEST_VPSS_ModDeInit(TEST_VPSS_CTX_S *pstCtx);
74 RK_S32 TEST_VPSS_ModSendFrame(TEST_VPSS_CTX_S *pstCtx);
75 RK_S32 TEST_VPSS_ModGetGrpFrame(TEST_VPSS_CTX_S *pstCtx, VIDEO_FRAME_INFO_S *pstVideoFrame);
76 RK_S32 TEST_VPSS_ModGetChnFrame(TEST_VPSS_CTX_S *pstCtx, VIDEO_FRAME_INFO_S *pstVideoFrame);
77 
78 RK_S32 TEST_VPSS_ModTest(TEST_VPSS_CTX_S *pstCtx);
79 RK_S32 TEST_VPSS_UnitTest(TEST_VPSS_CTX_S *pstCtx, VIDEO_FRAME_INFO_S *pstChnFrames);
80 
81 #ifdef __cplusplus
82 #if __cplusplus
83 }
84 #endif
85 #endif /* End of #ifdef __cplusplus */
86 
87 #endif  // SRC_TESTS_RT_MPI_COMMON_TEST_MOD_VPSS_H_
88