comparison postproc/cs_test.c @ 10173:5c3a8881adc4

update
author alex
date Fri, 23 May 2003 20:21:31 +0000
parents e3a8a030c27a
children 6e35326c742f
comparison
equal deleted inserted replaced
10172:3241b7ca2b2c 10173:5c3a8881adc4
18 18
19 #include <stdio.h> 19 #include <stdio.h>
20 #include <stdlib.h> 20 #include <stdlib.h>
21 #include <inttypes.h> 21 #include <inttypes.h>
22 22
23 #include "swscale.h"
23 #include "rgb2rgb.h" 24 #include "rgb2rgb.h"
24 #include "../cpudetect.h" 25 #include "../cpudetect.h"
25 26
26 #define SIZE 1000 27 #define SIZE 1000
27 #define srcByte 0x55 28 #define srcByte 0x55
28 #define dstByte 0xBB 29 #define dstByte 0xBB
30
31 static int get_sws_cpuflags()
32 {
33 return (gCpuCaps.hasMMX ? SWS_CPU_CAPS_MMX : 0) |
34 (gCpuCaps.hasMMX2 ? SWS_CPU_CAPS_MMX2 : 0) |
35 (gCpuCaps.has3DNow ? SWS_CPU_CAPS_3DNOW : 0);
36 }
29 37
30 main(int argc, char **argv) 38 main(int argc, char **argv)
31 { 39 {
32 int i, funcNum; 40 int i, funcNum;
33 uint8_t *srcBuffer= (uint8_t*)memalign(128, SIZE); 41 uint8_t *srcBuffer= (uint8_t*)memalign(128, SIZE);
40 if(argc==2){ 48 if(argc==2){
41 GetCpuCaps(&gCpuCaps); 49 GetCpuCaps(&gCpuCaps);
42 printf("testing mmx\n"); 50 printf("testing mmx\n");
43 } 51 }
44 52
53 sws_rgb2rgb_init(get_sws_cpuflags());
54
45 for(funcNum=0; funcNum<100; funcNum++){ 55 for(funcNum=0; funcNum<100; funcNum++){
46 int width; 56 int width;
47 int failed=0; 57 int failed=0;
48 int srcBpp=0; 58 int srcBpp=0;
49 int dstBpp=0; 59 int dstBpp=0;