Mercurial > mplayer.hg
annotate libmpcodecs/vf_noise.c @ 18889:e60c8c7399d2
get_path as const, patch by Stefan Huehner, stefan AT huehner-org
author | reynaldo |
---|---|
date | Mon, 03 Jul 2006 23:27:37 +0000 |
parents | c9de3673e299 |
children | 6334c14b38eb |
rev | line source |
---|---|
6424 | 1 /* |
2 Copyright (C) 2002 Michael Niedermayer <michaelni@gmx.at> | |
3 | |
4 This program is free software; you can redistribute it and/or modify | |
5 it under the terms of the GNU General Public License as published by | |
6 the Free Software Foundation; either version 2 of the License, or | |
7 (at your option) any later version. | |
8 | |
9 This program is distributed in the hope that it will be useful, | |
10 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 GNU General Public License for more details. | |
13 | |
14 You should have received a copy of the GNU General Public License | |
15 along with this program; if not, write to the Free Software | |
17367
401b440a6d76
Update licensing information: The FSF changed postal address.
diego
parents:
17012
diff
changeset
|
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
6424 | 17 */ |
18 | |
19 #include <stdio.h> | |
20 #include <stdlib.h> | |
21 #include <string.h> | |
22 #include <inttypes.h> | |
23 #include <math.h> | |
24 | |
17012 | 25 #include "config.h" |
26 #include "mp_msg.h" | |
27 #include "cpudetect.h" | |
18104
7b408d60de9e
add support for intel mac. mp3lib is not fixed yet.
nplourde
parents:
18030
diff
changeset
|
28 #include "asmalign.h" |
6424 | 29 |
30 #ifdef HAVE_MALLOC_H | |
31 #include <malloc.h> | |
32 #endif | |
33 | |
34 #include "img_format.h" | |
35 #include "mp_image.h" | |
36 #include "vf.h" | |
17012 | 37 #include "libvo/fastmemcpy.h" |
6424 | 38 |
39 #define MAX_NOISE 4096 | |
40 #define MAX_SHIFT 1024 | |
41 #define MAX_RES (MAX_NOISE-MAX_SHIFT) | |
42 | |
43 //===========================================================================// | |
44 | |
45 static inline void lineNoise_C(uint8_t *dst, uint8_t *src, int8_t *noise, int len, int shift); | |
6963
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
46 static inline void lineNoiseAvg_C(uint8_t *dst, uint8_t *src, int len, int8_t **shift); |
6424 | 47 |
48 static void (*lineNoise)(uint8_t *dst, uint8_t *src, int8_t *noise, int len, int shift)= lineNoise_C; | |
6963
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
49 static void (*lineNoiseAvg)(uint8_t *dst, uint8_t *src, int len, int8_t **shift)= lineNoiseAvg_C; |
6424 | 50 |
51 typedef struct FilterParam{ | |
52 int strength; | |
53 int uniform; | |
54 int temporal; | |
6448 | 55 int quality; |
6963
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
56 int averaged; |
6990
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
57 int pattern; |
6963
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
58 int shiftptr; |
6424 | 59 int8_t *noise; |
6964 | 60 int8_t *prev_shift[MAX_RES][3]; |
6424 | 61 }FilterParam; |
62 | |
63 struct vf_priv_s { | |
64 FilterParam lumaParam; | |
65 FilterParam chromaParam; | |
6447
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
66 unsigned int outfmt; |
6424 | 67 }; |
68 | |
18030
ec68026bc1d0
move 12k from data to bss (reduce binary size by 12k)
rfelker
parents:
17906
diff
changeset
|
69 static int nonTempRandShift_init; |
ec68026bc1d0
move 12k from data to bss (reduce binary size by 12k)
rfelker
parents:
17906
diff
changeset
|
70 static int nonTempRandShift[MAX_RES]; |
6424 | 71 |
6990
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
72 static int patt[4] = { |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
73 -1,0,1,0 |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
74 }; |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
75 |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
76 #define RAND_N(range) ((int) ((double)range*rand()/(RAND_MAX+1.0))) |
6424 | 77 static int8_t *initNoise(FilterParam *fp){ |
78 int strength= fp->strength; | |
79 int uniform= fp->uniform; | |
6963
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
80 int averaged= fp->averaged; |
6990
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
81 int pattern= fp->pattern; |
6447
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
82 int8_t *noise= memalign(16, MAX_NOISE*sizeof(int8_t)); |
6963
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
83 int i, j; |
6424 | 84 |
85 srand(123457); | |
86 | |
6990
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
87 for(i=0,j=0; i<MAX_NOISE; i++,j++) |
6424 | 88 { |
6990
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
89 if(uniform) { |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
90 if (averaged) { |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
91 if (pattern) { |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
92 noise[i]= (RAND_N(strength) - strength/2)/6 |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
93 +patt[j%4]*strength*0.25/3; |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
94 } else { |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
95 noise[i]= (RAND_N(strength) - strength/2)/3; |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
96 } |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
97 } else { |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
98 if (pattern) { |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
99 noise[i]= (RAND_N(strength) - strength/2)/2 |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
100 + patt[j%4]*strength*0.25; |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
101 } else { |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
102 noise[i]= RAND_N(strength) - strength/2; |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
103 } |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
104 } |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
105 } else { |
6424 | 106 double x1, x2, w, y1; |
107 do { | |
108 x1 = 2.0 * rand()/(float)RAND_MAX - 1.0; | |
109 x2 = 2.0 * rand()/(float)RAND_MAX - 1.0; | |
110 w = x1 * x1 + x2 * x2; | |
111 } while ( w >= 1.0 ); | |
6990
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
112 |
6424 | 113 w = sqrt( (-2.0 * log( w ) ) / w ); |
114 y1= x1 * w; | |
6963
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
115 y1*= strength / sqrt(3.0); |
6990
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
116 if (pattern) { |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
117 y1 /= 2; |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
118 y1 += patt[j%4]*strength*0.35; |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
119 } |
6424 | 120 if (y1<-128) y1=-128; |
121 else if(y1> 127) y1= 127; | |
6963
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
122 if (averaged) y1 /= 3.0; |
6424 | 123 noise[i]= (int)y1; |
124 } | |
6990
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
125 if (RAND_N(6) == 0) j--; |
6424 | 126 } |
6963
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
127 |
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
128 |
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
129 for (i = 0; i < MAX_RES; i++) |
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
130 for (j = 0; j < 3; j++) |
6964 | 131 fp->prev_shift[i][j] = noise + (rand()&(MAX_SHIFT-1)); |
6424 | 132 |
18030
ec68026bc1d0
move 12k from data to bss (reduce binary size by 12k)
rfelker
parents:
17906
diff
changeset
|
133 if(!nonTempRandShift_init){ |
6424 | 134 for(i=0; i<MAX_RES; i++){ |
135 nonTempRandShift[i]= rand()&(MAX_SHIFT-1); | |
136 } | |
18030
ec68026bc1d0
move 12k from data to bss (reduce binary size by 12k)
rfelker
parents:
17906
diff
changeset
|
137 nonTempRandShift_init = 1; |
6424 | 138 } |
139 | |
140 fp->noise= noise; | |
6963
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
141 fp->shiftptr= 0; |
6424 | 142 return noise; |
143 } | |
144 | |
6963
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
145 /***************************************************************************/ |
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
146 |
6424 | 147 #ifdef HAVE_MMX |
148 static inline void lineNoise_MMX(uint8_t *dst, uint8_t *src, int8_t *noise, int len, int shift){ | |
13720
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
149 long mmx_len= len&(~7); |
6424 | 150 noise+=shift; |
151 | |
152 asm volatile( | |
13720
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
153 "mov %3, %%"REG_a" \n\t" |
6424 | 154 "pcmpeqb %%mm7, %%mm7 \n\t" |
155 "psllw $15, %%mm7 \n\t" | |
156 "packsswb %%mm7, %%mm7 \n\t" | |
18104
7b408d60de9e
add support for intel mac. mp3lib is not fixed yet.
nplourde
parents:
18030
diff
changeset
|
157 ASMALIGN16 |
6424 | 158 "1: \n\t" |
13720
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
159 "movq (%0, %%"REG_a"), %%mm0 \n\t" |
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
160 "movq (%1, %%"REG_a"), %%mm1 \n\t" |
6424 | 161 "pxor %%mm7, %%mm0 \n\t" |
162 "paddsb %%mm1, %%mm0 \n\t" | |
163 "pxor %%mm7, %%mm0 \n\t" | |
13720
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
164 "movq %%mm0, (%2, %%"REG_a") \n\t" |
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
165 "add $8, %%"REG_a" \n\t" |
6424 | 166 " js 1b \n\t" |
167 :: "r" (src+mmx_len), "r" (noise+mmx_len), "r" (dst+mmx_len), "g" (-mmx_len) | |
13720
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
168 : "%"REG_a |
6424 | 169 ); |
170 if(mmx_len!=len) | |
171 lineNoise_C(dst+mmx_len, src+mmx_len, noise+mmx_len, len-mmx_len, 0); | |
172 } | |
173 #endif | |
174 | |
175 //duplicate of previous except movntq | |
176 #ifdef HAVE_MMX2 | |
177 static inline void lineNoise_MMX2(uint8_t *dst, uint8_t *src, int8_t *noise, int len, int shift){ | |
13720
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
178 long mmx_len= len&(~7); |
6424 | 179 noise+=shift; |
180 | |
181 asm volatile( | |
13720
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
182 "mov %3, %%"REG_a" \n\t" |
6424 | 183 "pcmpeqb %%mm7, %%mm7 \n\t" |
184 "psllw $15, %%mm7 \n\t" | |
185 "packsswb %%mm7, %%mm7 \n\t" | |
18104
7b408d60de9e
add support for intel mac. mp3lib is not fixed yet.
nplourde
parents:
18030
diff
changeset
|
186 ASMALIGN16 |
6424 | 187 "1: \n\t" |
13720
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
188 "movq (%0, %%"REG_a"), %%mm0 \n\t" |
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
189 "movq (%1, %%"REG_a"), %%mm1 \n\t" |
6424 | 190 "pxor %%mm7, %%mm0 \n\t" |
191 "paddsb %%mm1, %%mm0 \n\t" | |
192 "pxor %%mm7, %%mm0 \n\t" | |
13720
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
193 "movntq %%mm0, (%2, %%"REG_a") \n\t" |
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
194 "add $8, %%"REG_a" \n\t" |
6424 | 195 " js 1b \n\t" |
196 :: "r" (src+mmx_len), "r" (noise+mmx_len), "r" (dst+mmx_len), "g" (-mmx_len) | |
13720
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
197 : "%"REG_a |
6424 | 198 ); |
199 if(mmx_len!=len) | |
200 lineNoise_C(dst+mmx_len, src+mmx_len, noise+mmx_len, len-mmx_len, 0); | |
201 } | |
202 #endif | |
203 | |
204 static inline void lineNoise_C(uint8_t *dst, uint8_t *src, int8_t *noise, int len, int shift){ | |
205 int i; | |
206 noise+= shift; | |
207 for(i=0; i<len; i++) | |
208 { | |
209 int v= src[i]+ noise[i]; | |
210 if(v>255) dst[i]=255; //FIXME optimize | |
211 else if(v<0) dst[i]=0; | |
212 else dst[i]=v; | |
213 } | |
214 } | |
215 | |
6963
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
216 /***************************************************************************/ |
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
217 |
6966 | 218 #ifdef HAVE_MMX |
219 static inline void lineNoiseAvg_MMX(uint8_t *dst, uint8_t *src, int len, int8_t **shift){ | |
13720
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
220 long mmx_len= len&(~7); |
6966 | 221 |
222 asm volatile( | |
13720
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
223 "mov %5, %%"REG_a" \n\t" |
18104
7b408d60de9e
add support for intel mac. mp3lib is not fixed yet.
nplourde
parents:
18030
diff
changeset
|
224 ASMALIGN16 |
6966 | 225 "1: \n\t" |
13720
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
226 "movq (%1, %%"REG_a"), %%mm1 \n\t" |
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
227 "movq (%0, %%"REG_a"), %%mm0 \n\t" |
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
228 "paddb (%2, %%"REG_a"), %%mm1 \n\t" |
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
229 "paddb (%3, %%"REG_a"), %%mm1 \n\t" |
6966 | 230 "movq %%mm0, %%mm2 \n\t" |
231 "movq %%mm1, %%mm3 \n\t" | |
232 "punpcklbw %%mm0, %%mm0 \n\t" | |
233 "punpckhbw %%mm2, %%mm2 \n\t" | |
234 "punpcklbw %%mm1, %%mm1 \n\t" | |
235 "punpckhbw %%mm3, %%mm3 \n\t" | |
236 "pmulhw %%mm0, %%mm1 \n\t" | |
237 "pmulhw %%mm2, %%mm3 \n\t" | |
238 "paddw %%mm1, %%mm1 \n\t" | |
239 "paddw %%mm3, %%mm3 \n\t" | |
240 "paddw %%mm0, %%mm1 \n\t" | |
241 "paddw %%mm2, %%mm3 \n\t" | |
242 "psrlw $8, %%mm1 \n\t" | |
243 "psrlw $8, %%mm3 \n\t" | |
244 "packuswb %%mm3, %%mm1 \n\t" | |
13720
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
245 "movq %%mm1, (%4, %%"REG_a") \n\t" |
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
246 "add $8, %%"REG_a" \n\t" |
6966 | 247 " js 1b \n\t" |
248 :: "r" (src+mmx_len), "r" (shift[0]+mmx_len), "r" (shift[1]+mmx_len), "r" (shift[2]+mmx_len), | |
249 "r" (dst+mmx_len), "g" (-mmx_len) | |
13720
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10141
diff
changeset
|
250 : "%"REG_a |
6966 | 251 ); |
252 | |
253 if(mmx_len!=len){ | |
254 int8_t *shift2[3]={shift[0]+mmx_len, shift[1]+mmx_len, shift[2]+mmx_len}; | |
255 lineNoiseAvg_C(dst+mmx_len, src+mmx_len, len-mmx_len, shift2); | |
256 } | |
257 } | |
258 #endif | |
259 | |
6963
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
260 static inline void lineNoiseAvg_C(uint8_t *dst, uint8_t *src, int len, int8_t **shift){ |
6965 | 261 int i; |
262 int8_t *src2= (int8_t*)src; | |
6963
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
263 |
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
264 for(i=0; i<len; i++) |
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
265 { |
6965 | 266 const int n= shift[0][i] + shift[1][i] + shift[2][i]; |
267 dst[i]= src2[i]+((n*src2[i])>>7); | |
6963
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
268 } |
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
269 } |
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
270 |
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
271 /***************************************************************************/ |
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
272 |
6424 | 273 static void noise(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int width, int height, FilterParam *fp){ |
274 int8_t *noise= fp->noise; | |
275 int y; | |
276 int shift=0; | |
277 | |
278 if(!noise) | |
279 { | |
6447
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
280 if(src==dst) return; |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
281 |
6424 | 282 if(dstStride==srcStride) memcpy(dst, src, srcStride*height); |
283 else | |
284 { | |
285 for(y=0; y<height; y++) | |
286 { | |
287 memcpy(dst, src, width); | |
288 dst+= dstStride; | |
6448 | 289 src+= srcStride; |
6424 | 290 } |
291 } | |
292 return; | |
293 } | |
294 | |
295 for(y=0; y<height; y++) | |
296 { | |
297 if(fp->temporal) shift= rand()&(MAX_SHIFT -1); | |
298 else shift= nonTempRandShift[y]; | |
299 | |
6448 | 300 if(fp->quality==0) shift&= ~7; |
6963
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
301 if (fp->averaged) { |
6964 | 302 lineNoiseAvg(dst, src, width, fp->prev_shift[y]); |
303 fp->prev_shift[y][fp->shiftptr] = noise + shift; | |
6963
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
304 } else { |
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
305 lineNoise(dst, src, noise, width, shift); |
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
306 } |
6424 | 307 dst+= dstStride; |
308 src+= srcStride; | |
309 } | |
6963
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
310 fp->shiftptr++; |
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
311 if (fp->shiftptr == 3) fp->shiftptr = 0; |
6424 | 312 } |
313 | |
314 static int config(struct vf_instance_s* vf, | |
315 int width, int height, int d_width, int d_height, | |
316 unsigned int flags, unsigned int outfmt){ | |
6448 | 317 |
6424 | 318 return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); |
319 } | |
320 | |
6447
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
321 static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){ |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
322 if(mpi->flags&MP_IMGFLAG_PRESERVE) return; // don't change |
6962 | 323 if(mpi->imgfmt!=vf->priv->outfmt) return; // colorspace differ |
6447
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
324 // ok, we can do pp in-place (or pp disabled): |
10141
7d6a854a5fe5
cleanup, use vf->dmpi rather than vf->priv->dmpi for consistency
rfelker
parents:
9934
diff
changeset
|
325 vf->dmpi=vf_get_image(vf->next,mpi->imgfmt, |
6447
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
326 mpi->type, mpi->flags, mpi->w, mpi->h); |
10141
7d6a854a5fe5
cleanup, use vf->dmpi rather than vf->priv->dmpi for consistency
rfelker
parents:
9934
diff
changeset
|
327 mpi->planes[0]=vf->dmpi->planes[0]; |
7d6a854a5fe5
cleanup, use vf->dmpi rather than vf->priv->dmpi for consistency
rfelker
parents:
9934
diff
changeset
|
328 mpi->stride[0]=vf->dmpi->stride[0]; |
7d6a854a5fe5
cleanup, use vf->dmpi rather than vf->priv->dmpi for consistency
rfelker
parents:
9934
diff
changeset
|
329 mpi->width=vf->dmpi->width; |
6447
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
330 if(mpi->flags&MP_IMGFLAG_PLANAR){ |
10141
7d6a854a5fe5
cleanup, use vf->dmpi rather than vf->priv->dmpi for consistency
rfelker
parents:
9934
diff
changeset
|
331 mpi->planes[1]=vf->dmpi->planes[1]; |
7d6a854a5fe5
cleanup, use vf->dmpi rather than vf->priv->dmpi for consistency
rfelker
parents:
9934
diff
changeset
|
332 mpi->planes[2]=vf->dmpi->planes[2]; |
7d6a854a5fe5
cleanup, use vf->dmpi rather than vf->priv->dmpi for consistency
rfelker
parents:
9934
diff
changeset
|
333 mpi->stride[1]=vf->dmpi->stride[1]; |
7d6a854a5fe5
cleanup, use vf->dmpi rather than vf->priv->dmpi for consistency
rfelker
parents:
9934
diff
changeset
|
334 mpi->stride[2]=vf->dmpi->stride[2]; |
6447
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
335 } |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
336 mpi->flags|=MP_IMGFLAG_DIRECT; |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
337 } |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
338 |
17906
20aca9baf5d8
passing pts through the filter layer (lets see if pts or cola comes out at the end)
michael
parents:
17367
diff
changeset
|
339 static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ |
6424 | 340 mp_image_t *dmpi; |
341 | |
6447
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
342 if(!(mpi->flags&MP_IMGFLAG_DIRECT)){ |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
343 // no DR, so get a new image! hope we'll get DR buffer: |
10141
7d6a854a5fe5
cleanup, use vf->dmpi rather than vf->priv->dmpi for consistency
rfelker
parents:
9934
diff
changeset
|
344 vf->dmpi=vf_get_image(vf->next,vf->priv->outfmt, |
6424 | 345 MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE, |
6447
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
346 mpi->w,mpi->h); |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
347 //printf("nodr\n"); |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
348 } |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
349 //else printf("dr\n"); |
10141
7d6a854a5fe5
cleanup, use vf->dmpi rather than vf->priv->dmpi for consistency
rfelker
parents:
9934
diff
changeset
|
350 dmpi= vf->dmpi; |
6424 | 351 |
352 noise(dmpi->planes[0], mpi->planes[0], dmpi->stride[0], mpi->stride[0], mpi->w, mpi->h, &vf->priv->lumaParam); | |
353 noise(dmpi->planes[1], mpi->planes[1], dmpi->stride[1], mpi->stride[1], mpi->w/2, mpi->h/2, &vf->priv->chromaParam); | |
354 noise(dmpi->planes[2], mpi->planes[2], dmpi->stride[2], mpi->stride[2], mpi->w/2, mpi->h/2, &vf->priv->chromaParam); | |
355 | |
9934 | 356 vf_clone_mpi_attributes(dmpi, mpi); |
6424 | 357 |
358 #ifdef HAVE_MMX | |
359 if(gCpuCaps.hasMMX) asm volatile ("emms\n\t"); | |
360 #endif | |
361 #ifdef HAVE_MMX2 | |
362 if(gCpuCaps.hasMMX2) asm volatile ("sfence\n\t"); | |
363 #endif | |
364 | |
17906
20aca9baf5d8
passing pts through the filter layer (lets see if pts or cola comes out at the end)
michael
parents:
17367
diff
changeset
|
365 return vf_next_put_image(vf,dmpi, pts); |
6424 | 366 } |
367 | |
6447
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
368 static void uninit(struct vf_instance_s* vf){ |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
369 if(!vf->priv) return; |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
370 |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
371 if(vf->priv->chromaParam.noise) free(vf->priv->chromaParam.noise); |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
372 vf->priv->chromaParam.noise= NULL; |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
373 |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
374 if(vf->priv->lumaParam.noise) free(vf->priv->lumaParam.noise); |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
375 vf->priv->lumaParam.noise= NULL; |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
376 |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
377 free(vf->priv); |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
378 vf->priv=NULL; |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
379 } |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
380 |
6424 | 381 //===========================================================================// |
382 | |
383 static int query_format(struct vf_instance_s* vf, unsigned int fmt){ | |
384 switch(fmt) | |
385 { | |
386 case IMGFMT_YV12: | |
387 case IMGFMT_I420: | |
388 case IMGFMT_IYUV: | |
6447
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
389 return vf_next_query_format(vf,vf->priv->outfmt); |
6424 | 390 } |
391 return 0; | |
392 } | |
393 | |
394 static void parse(FilterParam *fp, char* args){ | |
395 char *pos; | |
396 char *max= strchr(args, ':'); | |
397 | |
398 if(!max) max= args + strlen(args); | |
399 | |
400 fp->strength= atoi(args); | |
401 pos= strchr(args, 'u'); | |
402 if(pos && pos<max) fp->uniform=1; | |
403 pos= strchr(args, 't'); | |
404 if(pos && pos<max) fp->temporal=1; | |
6448 | 405 pos= strchr(args, 'h'); |
406 if(pos && pos<max) fp->quality=1; | |
6990
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
407 pos= strchr(args, 'p'); |
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6966
diff
changeset
|
408 if(pos && pos<max) fp->pattern=1; |
6963
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
409 pos= strchr(args, 'a'); |
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
410 if(pos && pos<max) { |
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
411 fp->temporal=1; |
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
412 fp->averaged=1; |
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
413 } |
6424 | 414 |
415 if(fp->strength) initNoise(fp); | |
416 } | |
417 | |
6447
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
418 static unsigned int fmt_list[]={ |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
419 IMGFMT_YV12, |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
420 IMGFMT_I420, |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
421 IMGFMT_IYUV, |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
422 0 |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
423 }; |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
424 |
6424 | 425 static int open(vf_instance_t *vf, char* args){ |
426 vf->config=config; | |
427 vf->put_image=put_image; | |
6447
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
428 vf->get_image=get_image; |
6424 | 429 vf->query_format=query_format; |
6447
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
430 vf->uninit=uninit; |
6424 | 431 vf->priv=malloc(sizeof(struct vf_priv_s)); |
432 memset(vf->priv, 0, sizeof(struct vf_priv_s)); | |
433 if(args) | |
434 { | |
435 char *arg2= strchr(args,':'); | |
436 if(arg2) parse(&vf->priv->chromaParam, arg2+1); | |
437 parse(&vf->priv->lumaParam, args); | |
438 } | |
6447
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
439 |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
440 // check csp: |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
441 vf->priv->outfmt=vf_match_csp(&vf->next,fmt_list,IMGFMT_YV12); |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
442 if(!vf->priv->outfmt) |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
443 { |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
444 uninit(vf); |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
445 return 0; // no csp match :( |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
446 } |
751a5775ac35
direct rendering (hopefully at least, TFM for the video filters is a bit nonexistent or iam just too stupid) ;)
michael
parents:
6424
diff
changeset
|
447 |
6424 | 448 |
449 #ifdef HAVE_MMX | |
6966 | 450 if(gCpuCaps.hasMMX){ |
451 lineNoise= lineNoise_MMX; | |
452 lineNoiseAvg= lineNoiseAvg_MMX; | |
453 } | |
6424 | 454 #endif |
455 #ifdef HAVE_MMX2 | |
456 if(gCpuCaps.hasMMX2) lineNoise= lineNoise_MMX2; | |
6963
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6962
diff
changeset
|
457 // if(gCpuCaps.hasMMX) lineNoiseAvg= lineNoiseAvg_MMX2; |
6424 | 458 #endif |
459 | |
460 return 1; | |
461 } | |
462 | |
463 vf_info_t vf_info_noise = { | |
18684
c9de3673e299
typo noticed by Alexander Monakov monoid$$at$$fds-net$$dot$$ru
diego
parents:
18104
diff
changeset
|
464 "noise generator", |
6424 | 465 "noise", |
466 "Michael Niedermayer", | |
467 "", | |
9593
e9a2af584986
Add the new -vf option wich is the same as vop in reverse order.
albeu
parents:
7368
diff
changeset
|
468 open, |
e9a2af584986
Add the new -vf option wich is the same as vop in reverse order.
albeu
parents:
7368
diff
changeset
|
469 NULL |
6424 | 470 }; |
471 | |
472 //===========================================================================// |