Update contrib.
1 // Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
22 #include <liboil/liboil.h>
23 #include <liboil/liboilfunction.h>
28 #define LOG_FILE "c:\\logs\\testsuite_err8x8_log.txt"
29 #include "std_log_result.h"
30 #define LOG_FILENAME_LINE __FILE__, __LINE__
34 void create_xml(int result)
39 testResultXml("testsuite_err8x8");
44 void test_err_intra8x8_u8()
46 uint8_t err1[MAX_SIZE];
47 uint32_t res[RES_SIZE]={0}, check[RES_SIZE]={967680};
50 for(i=0;i<MAX_SIZE;i++)
53 oil_err_intra8x8_u8(res, err1,2);
55 std_log(LOG_FILENAME_LINE,"OUTPUT");
56 if(res[0] == check[0])
58 std_log(LOG_FILENAME_LINE,"oil_err_intra8x8_u8 successful, res = %d", res[0]);
63 std_log(LOG_FILENAME_LINE,"oil_err_intra8x8_u8 unsuccessful, Expected =%d,Obtained =%d",check[0],res[0]);
68 void test_err_inter8x8_u8()
70 uint8_t err1[MAX_SIZE],err2[MAX_SIZE];
71 uint32_t res[RES_SIZE]={0}, check[RES_SIZE]={365568};
74 for(i=0;i<MAX_SIZE;i++)
80 oil_err_inter8x8_u8(res,err1,2,err2,1);
82 if(res[0] == check[0])
84 std_log(LOG_FILENAME_LINE,"oil_err_inter8x8_u8 successful, res = %d", res[0]);
89 std_log(LOG_FILENAME_LINE,"oil_err_inter8x8_u8 unsuccessful, Expected =%d,Obtained =%d",check[0],res[0]);
93 void test_err_inter8x8_u8_avg()
95 uint8_t err1[MAX_SIZE],err2[MAX_SIZE],err3[MAX_SIZE];
96 uint32_t res[RES_SIZE]={0}, check[RES_SIZE]={821248};
99 for(i=0;i<MAX_SIZE;i++)
105 oil_err_inter8x8_u8_avg(res,err1,3,err2,err3,2);
106 if(res[0] == check[0])
108 std_log(LOG_FILENAME_LINE,"oil_err_intra8x8_u8_avg successful, res = %d", res[0]);
113 std_log(LOG_FILENAME_LINE,"oil_err_intra8x8_u8_avg unsuccessful, Expected =%d,Obtained =%d",check[0],res[0]);
118 std_log(LOG_FILENAME_LINE,"Test started testsuite_err8x8");
121 std_log(LOG_FILENAME_LINE,"oil_err_intra8x8_u8");
122 test_err_intra8x8_u8();
124 std_log(LOG_FILENAME_LINE,"oil_err_inter8x8_u8");
125 test_err_inter8x8_u8();
127 std_log(LOG_FILENAME_LINE,"oil_err_intra8x8_u8_avg");
128 test_err_inter8x8_u8_avg();
132 std_log(LOG_FILENAME_LINE,"Test Fail");
134 std_log(LOG_FILENAME_LINE,"Test Successful");