Mercurial > mplayer.hg
annotate libswscale/colorspace-test.c @ 29716:6ee9d09a3a2e
cosmetics: Break two more lines.
author | diego |
---|---|
date | Thu, 08 Oct 2009 10:48:12 +0000 |
parents | 3e7ffd70b12b |
children | 0a999f052474 |
rev | line source |
---|---|
29032
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
1 /* |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
2 * Copyright (C) 2002 Michael Niedermayer <michaelni@gmx.at> |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
3 * |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
4 * This file is part of FFmpeg. |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
5 * |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
6 * FFmpeg is free software; you can redistribute it and/or |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
7 * modify it under the terms of the GNU Lesser General Public |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
8 * License as published by the Free Software Foundation; either |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
9 * version 2.1 of the License, or (at your option) any later version. |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
10 * |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
11 * FFmpeg is distributed in the hope that it will be useful, |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
14 * Lesser General Public License for more details. |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
15 * |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
16 * You should have received a copy of the GNU Lesser General Public |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
17 * License along with FFmpeg; if not, write to the Free Software |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
19 */ |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
20 |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
21 #include <stdio.h> |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
22 #include <string.h> /* for memset() */ |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
23 #include <unistd.h> |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
24 #include <stdlib.h> |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
25 #include <inttypes.h> |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
26 |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
27 #include "swscale.h" |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
28 #include "rgb2rgb.h" |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
29 |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
30 #define SIZE 1000 |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
31 #define srcByte 0x55 |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
32 #define dstByte 0xBB |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
33 |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
34 #define FUNC(s,d,n) {s,d,#n,n} |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
35 |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
36 static int cpu_caps; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
37 |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
38 static char *args_parse(int argc, char *argv[]) |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
39 { |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
40 int o; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
41 |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
42 while ((o = getopt(argc, argv, "m23")) != -1) { |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
43 switch (o) { |
29480 | 44 case 'm': |
45 cpu_caps |= SWS_CPU_CAPS_MMX; | |
46 break; | |
47 case '2': | |
48 cpu_caps |= SWS_CPU_CAPS_MMX2; | |
49 break; | |
50 case '3': | |
51 cpu_caps |= SWS_CPU_CAPS_3DNOW; | |
52 break; | |
53 default: | |
54 av_log(NULL, AV_LOG_ERROR, "Unknown option %c\n", o); | |
29032
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
55 } |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
56 } |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
57 |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
58 return argv[optind]; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
59 } |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
60 |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
61 int main(int argc, char **argv) |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
62 { |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
63 int i, funcNum; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
64 uint8_t *srcBuffer= (uint8_t*)av_malloc(SIZE); |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
65 uint8_t *dstBuffer= (uint8_t*)av_malloc(SIZE); |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
66 int failedNum=0; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
67 int passedNum=0; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
68 |
29542 | 69 if (!srcBuffer || !dstBuffer) |
70 return -1; | |
71 | |
29032
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
72 av_log(NULL, AV_LOG_INFO, "memory corruption test ...\n"); |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
73 args_parse(argc, argv); |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
74 av_log(NULL, AV_LOG_INFO, "CPU capabilities forced to %x\n", cpu_caps); |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
75 sws_rgb2rgb_init(cpu_caps); |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
76 |
29481 | 77 for(funcNum=0; ; funcNum++) { |
29032
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
78 struct func_info_s { |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
79 int src_bpp; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
80 int dst_bpp; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
81 const char *name; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
82 void (*func)(const uint8_t *src, uint8_t *dst, long src_size); |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
83 } func_info[] = { |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
84 FUNC(2, 2, rgb15to16), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
85 FUNC(2, 3, rgb15to24), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
86 FUNC(2, 4, rgb15to32), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
87 FUNC(2, 3, rgb16to24), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
88 FUNC(2, 4, rgb16to32), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
89 FUNC(3, 2, rgb24to15), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
90 FUNC(3, 2, rgb24to16), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
91 FUNC(3, 4, rgb24to32), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
92 FUNC(4, 2, rgb32to15), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
93 FUNC(4, 2, rgb32to16), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
94 FUNC(4, 3, rgb32to24), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
95 FUNC(2, 2, rgb16to15), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
96 FUNC(2, 2, rgb15tobgr15), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
97 FUNC(2, 2, rgb15tobgr16), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
98 FUNC(2, 3, rgb15tobgr24), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
99 FUNC(2, 4, rgb15tobgr32), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
100 FUNC(2, 2, rgb16tobgr15), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
101 FUNC(2, 2, rgb16tobgr16), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
102 FUNC(2, 3, rgb16tobgr24), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
103 FUNC(2, 4, rgb16tobgr32), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
104 FUNC(3, 2, rgb24tobgr15), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
105 FUNC(3, 2, rgb24tobgr16), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
106 FUNC(3, 3, rgb24tobgr24), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
107 FUNC(3, 4, rgb24tobgr32), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
108 FUNC(4, 2, rgb32tobgr15), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
109 FUNC(4, 2, rgb32tobgr16), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
110 FUNC(4, 3, rgb32tobgr24), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
111 FUNC(4, 4, rgb32tobgr32), |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
112 FUNC(0, 0, NULL) |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
113 }; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
114 int width; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
115 int failed=0; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
116 int srcBpp=0; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
117 int dstBpp=0; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
118 |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
119 if (!func_info[funcNum].func) break; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
120 |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
121 av_log(NULL, AV_LOG_INFO,"."); |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
122 memset(srcBuffer, srcByte, SIZE); |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
123 |
29481 | 124 for(width=63; width>0; width--) { |
29032
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
125 int dstOffset; |
29481 | 126 for(dstOffset=128; dstOffset<196; dstOffset+=4) { |
29032
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
127 int srcOffset; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
128 memset(dstBuffer, dstByte, SIZE); |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
129 |
29481 | 130 for(srcOffset=128; srcOffset<196; srcOffset+=4) { |
29032
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
131 uint8_t *src= srcBuffer+srcOffset; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
132 uint8_t *dst= dstBuffer+dstOffset; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
133 const char *name=NULL; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
134 |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
135 if(failed) break; //don't fill the screen with shit ... |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
136 |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
137 srcBpp = func_info[funcNum].src_bpp; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
138 dstBpp = func_info[funcNum].dst_bpp; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
139 name = func_info[funcNum].name; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
140 |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
141 func_info[funcNum].func(src, dst, width*srcBpp); |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
142 |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
143 if(!srcBpp) break; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
144 |
29481 | 145 for(i=0; i<SIZE; i++) { |
146 if(srcBuffer[i]!=srcByte) { | |
29032
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
147 av_log(NULL, AV_LOG_INFO, "src damaged at %d w:%d src:%d dst:%d %s\n", |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
148 i, width, srcOffset, dstOffset, name); |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
149 failed=1; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
150 break; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
151 } |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
152 } |
29481 | 153 for(i=0; i<dstOffset; i++) { |
154 if(dstBuffer[i]!=dstByte) { | |
29032
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
155 av_log(NULL, AV_LOG_INFO, "dst damaged at %d w:%d src:%d dst:%d %s\n", |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
156 i, width, srcOffset, dstOffset, name); |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
157 failed=1; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
158 break; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
159 } |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
160 } |
29481 | 161 for(i=dstOffset + width*dstBpp; i<SIZE; i++) { |
162 if(dstBuffer[i]!=dstByte) { | |
29032
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
163 av_log(NULL, AV_LOG_INFO, "dst damaged at %d w:%d src:%d dst:%d %s\n", |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
164 i, width, srcOffset, dstOffset, name); |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
165 failed=1; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
166 break; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
167 } |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
168 } |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
169 } |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
170 } |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
171 } |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
172 if(failed) failedNum++; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
173 else if(srcBpp) passedNum++; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
174 } |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
175 |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
176 av_log(NULL, AV_LOG_INFO, "\n%d converters passed, %d converters randomly overwrote memory\n", passedNum, failedNum); |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
177 return failedNum; |
15e1d6124a6b
Rename cs_test.c --> colorspace-test.c. This is more consistent with the names
diego
parents:
diff
changeset
|
178 } |