1 /* 2 * Copyright 2020 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_IMGPROC_H_ 18 #define SRC_TESTS_RT_MPI_COMMON_TEST_COMM_IMGPROC_H_ 19 20 #ifdef __cplusplus 21 #if __cplusplus 22 extern "C" { 23 #endif 24 #endif /* End of #ifdef __cplusplus */ 25 26 #include "rk_debug.h" 27 #include "rk_comm_video.h" 28 29 #define DEFAULT_IMAGE_FUZZY_DIFF_THRESHOLD 0.1 30 31 RK_S32 TEST_COMM_FillImage(RK_U8 *buf, RK_U32 width, RK_U32 height, 32 RK_U32 hor_stride, RK_U32 ver_stride, PIXEL_FORMAT_E fmt, 33 RK_U32 frame_count); 34 35 RK_BOOL TEST_COMM_CompareImageFuzzy( 36 RK_U8 *pu8Src, RK_U8 *pu8Dst, RK_U32 u32Stride, 37 RK_U32 u32Width, RK_U32 u32Height, RK_DOUBLE dThreshold); 38 39 #ifdef __cplusplus 40 #if __cplusplus 41 } 42 #endif 43 #endif /* End of #ifdef __cplusplus */ 44 45 #endif // SRC_TESTS_RT_MPI_COMMON_TEST_COMM_IMGPROC_H_ 46 47