Mercurial > mplayer.hg
annotate libmpcodecs/vf_eq.c @ 18277:74944211418d
Synced with 1.15
author | jheryan |
---|---|
date | Tue, 25 Apr 2006 13:25:47 +0000 |
parents | 7b408d60de9e |
children | 497ebe3ecc2b |
rev | line source |
---|---|
7062
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
1 #include <stdio.h> |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
2 #include <stdlib.h> |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
3 #include <string.h> |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
4 #include <inttypes.h> |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
5 |
17012 | 6 #include "config.h" |
7 #include "mp_msg.h" | |
8 #include "cpudetect.h" | |
18104
7b408d60de9e
add support for intel mac. mp3lib is not fixed yet.
nplourde
parents:
17906
diff
changeset
|
9 #include "asmalign.h" |
7062
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
10 |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
11 #include "img_format.h" |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
12 #include "mp_image.h" |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
13 #include "vf.h" |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
14 |
17012 | 15 #include "libvo/video_out.h" |
16 #include "libvo/fastmemcpy.h" | |
17 #include "postproc/rgb2rgb.h" | |
7062
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
18 |
9599 | 19 #include "m_option.h" |
20 #include "m_struct.h" | |
21 | |
22 static struct vf_priv_s { | |
7062
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
23 unsigned char *buf; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
24 int brightness; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
25 int contrast; |
9599 | 26 } vf_priv_dflt = { |
27 NULL, | |
28 0, | |
29 0 | |
7062
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
30 }; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
31 |
7065 | 32 #ifdef HAVE_MMX |
33 static void process_MMX(unsigned char *dest, int dstride, unsigned char *src, int sstride, | |
34 int w, int h, int brightness, int contrast) | |
35 { | |
36 int i; | |
37 int pel; | |
38 int dstep = dstride-w; | |
39 int sstep = sstride-w; | |
40 short brvec[4]; | |
41 short contvec[4]; | |
42 | |
7078 | 43 contrast = ((contrast+100)*256*16)/100; |
44 brightness = ((brightness+100)*511)/200-128 - contrast/32; | |
7065 | 45 |
46 brvec[0] = brvec[1] = brvec[2] = brvec[3] = brightness; | |
47 contvec[0] = contvec[1] = contvec[2] = contvec[3] = contrast; | |
48 | |
49 while (h--) { | |
7078 | 50 asm volatile ( |
7065 | 51 "movq (%5), %%mm3 \n\t" |
52 "movq (%6), %%mm4 \n\t" | |
53 "pxor %%mm0, %%mm0 \n\t" | |
7078 | 54 "movl %4, %%eax\n\t" |
18104
7b408d60de9e
add support for intel mac. mp3lib is not fixed yet.
nplourde
parents:
17906
diff
changeset
|
55 ASMALIGN16 |
7065 | 56 "1: \n\t" |
57 "movq (%0), %%mm1 \n\t" | |
58 "movq (%0), %%mm2 \n\t" | |
59 "punpcklbw %%mm0, %%mm1 \n\t" | |
60 "punpckhbw %%mm0, %%mm2 \n\t" | |
7078 | 61 "psllw $4, %%mm1 \n\t" |
62 "psllw $4, %%mm2 \n\t" | |
63 "pmulhw %%mm4, %%mm1 \n\t" | |
64 "pmulhw %%mm4, %%mm2 \n\t" | |
65 "paddw %%mm3, %%mm1 \n\t" | |
66 "paddw %%mm3, %%mm2 \n\t" | |
7065 | 67 "packuswb %%mm2, %%mm1 \n\t" |
13720
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
9599
diff
changeset
|
68 "add $8, %0 \n\t" |
7065 | 69 "movq %%mm1, (%1) \n\t" |
13720
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
9599
diff
changeset
|
70 "add $8, %1 \n\t" |
7078 | 71 "decl %%eax \n\t" |
7065 | 72 "jnz 1b \n\t" |
73 : "=r" (src), "=r" (dest) | |
7078 | 74 : "0" (src), "1" (dest), "r" (w>>3), "r" (brvec), "r" (contvec) |
75 : "%eax" | |
7065 | 76 ); |
7078 | 77 |
7065 | 78 for (i = w&7; i; i--) |
79 { | |
7078 | 80 pel = ((*src++* contrast)>>12) + brightness; |
81 if(pel&768) pel = (-pel)>>31; | |
82 *dest++ = pel; | |
7065 | 83 } |
7078 | 84 |
7065 | 85 src += sstep; |
86 dest += dstep; | |
87 } | |
88 asm volatile ( "emms \n\t" ::: "memory" ); | |
89 } | |
90 #endif | |
91 | |
92 static void process_C(unsigned char *dest, int dstride, unsigned char *src, int sstride, | |
7062
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
93 int w, int h, int brightness, int contrast) |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
94 { |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
95 int i; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
96 int pel; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
97 int dstep = dstride-w; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
98 int sstep = sstride-w; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
99 |
7078 | 100 contrast = ((contrast+100)*256*256)/100; |
101 brightness = ((brightness+100)*511)/200-128 - contrast/512; | |
7062
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
102 |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
103 while (h--) { |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
104 for (i = w; i; i--) |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
105 { |
7078 | 106 pel = ((*src++* contrast)>>16) + brightness; |
107 if(pel&768) pel = (-pel)>>31; | |
108 *dest++ = pel; | |
7062
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
109 } |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
110 src += sstep; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
111 dest += dstep; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
112 } |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
113 } |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
114 |
7065 | 115 static void (*process)(unsigned char *dest, int dstride, unsigned char *src, int sstride, |
116 int w, int h, int brightness, int contrast); | |
117 | |
118 /* FIXME: add packed yuv version of process */ | |
7062
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
119 |
17906
20aca9baf5d8
passing pts through the filter layer (lets see if pts or cola comes out at the end)
michael
parents:
17012
diff
changeset
|
120 static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts) |
7062
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
121 { |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
122 mp_image_t *dmpi; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
123 |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
124 dmpi=vf_get_image(vf->next, mpi->imgfmt, |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
125 MP_IMGTYPE_EXPORT, 0, |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
126 mpi->w, mpi->h); |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
127 |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
128 dmpi->stride[0] = mpi->stride[0]; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
129 dmpi->planes[1] = mpi->planes[1]; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
130 dmpi->planes[2] = mpi->planes[2]; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
131 dmpi->stride[1] = mpi->stride[1]; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
132 dmpi->stride[2] = mpi->stride[2]; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
133 |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
134 if (!vf->priv->buf) vf->priv->buf = malloc(mpi->stride[0]*mpi->h); |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
135 |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
136 if ((vf->priv->brightness == 0) && (vf->priv->contrast == 0)) |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
137 dmpi->planes[0] = mpi->planes[0]; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
138 else { |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
139 dmpi->planes[0] = vf->priv->buf; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
140 process(dmpi->planes[0], dmpi->stride[0], |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
141 mpi->planes[0], mpi->stride[0], |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
142 mpi->w, mpi->h, vf->priv->brightness, |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
143 vf->priv->contrast); |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
144 } |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
145 |
17906
20aca9baf5d8
passing pts through the filter layer (lets see if pts or cola comes out at the end)
michael
parents:
17012
diff
changeset
|
146 return vf_next_put_image(vf,dmpi, pts); |
7062
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
147 } |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
148 |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
149 static int control(struct vf_instance_s* vf, int request, void* data) |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
150 { |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
151 vf_equalizer_t *eq; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
152 |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
153 switch (request) { |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
154 case VFCTRL_SET_EQUALIZER: |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
155 eq = data; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
156 if (!strcmp(eq->item,"brightness")) { |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
157 vf->priv->brightness = eq->value; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
158 return CONTROL_TRUE; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
159 } |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
160 else if (!strcmp(eq->item,"contrast")) { |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
161 vf->priv->contrast = eq->value; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
162 return CONTROL_TRUE; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
163 } |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
164 break; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
165 case VFCTRL_GET_EQUALIZER: |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
166 eq = data; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
167 if (!strcmp(eq->item,"brightness")) { |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
168 eq->value = vf->priv->brightness; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
169 return CONTROL_TRUE; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
170 } |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
171 else if (!strcmp(eq->item,"contrast")) { |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
172 eq->value = vf->priv->contrast; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
173 return CONTROL_TRUE; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
174 } |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
175 break; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
176 } |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
177 return vf_next_control(vf, request, data); |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
178 } |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
179 |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
180 static int query_format(struct vf_instance_s* vf, unsigned int fmt) |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
181 { |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
182 switch (fmt) { |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
183 case IMGFMT_YVU9: |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
184 case IMGFMT_IF09: |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
185 case IMGFMT_YV12: |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
186 case IMGFMT_I420: |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
187 case IMGFMT_IYUV: |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
188 case IMGFMT_CLPL: |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
189 case IMGFMT_Y800: |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
190 case IMGFMT_Y8: |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
191 case IMGFMT_NV12: |
14715 | 192 case IMGFMT_NV21: |
7062
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
193 case IMGFMT_444P: |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
194 case IMGFMT_422P: |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
195 case IMGFMT_411P: |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
196 return vf_next_query_format(vf, fmt); |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
197 } |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
198 return 0; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
199 } |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
200 |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
201 static void uninit(struct vf_instance_s* vf) |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
202 { |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
203 if (vf->priv->buf) free(vf->priv->buf); |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
204 free(vf->priv); |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
205 } |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
206 |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
207 static int open(vf_instance_t *vf, char* args) |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
208 { |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
209 vf->control=control; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
210 vf->query_format=query_format; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
211 vf->put_image=put_image; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
212 vf->uninit=uninit; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
213 |
9599 | 214 if(!vf->priv) { |
7062
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
215 vf->priv = malloc(sizeof(struct vf_priv_s)); |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
216 memset(vf->priv, 0, sizeof(struct vf_priv_s)); |
9599 | 217 } |
7062
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
218 if (args) sscanf(args, "%d:%d", &vf->priv->brightness, &vf->priv->contrast); |
7065 | 219 |
220 process = process_C; | |
221 #ifdef HAVE_MMX | |
222 if(gCpuCaps.hasMMX) process = process_MMX; | |
223 #endif | |
224 | |
7062
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
225 return 1; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
226 } |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
227 |
9599 | 228 #define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f) |
229 static m_option_t vf_opts_fields[] = { | |
230 {"brightness", ST_OFF(brightness), CONF_TYPE_INT, M_OPT_RANGE,-100 ,100, NULL}, | |
231 {"contrast", ST_OFF(contrast), CONF_TYPE_INT, M_OPT_RANGE,-100 ,100, NULL}, | |
232 { NULL, NULL, 0, 0, 0, 0, NULL } | |
233 }; | |
234 | |
235 static m_struct_t vf_opts = { | |
236 "eq", | |
237 sizeof(struct vf_priv_s), | |
238 &vf_priv_dflt, | |
239 vf_opts_fields | |
240 }; | |
241 | |
7062
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
242 vf_info_t vf_info_eq = { |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
243 "soft video equalizer", |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
244 "eq", |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
245 "Richard Felker", |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
246 "", |
9593
e9a2af584986
Add the new -vf option wich is the same as vop in reverse order.
albeu
parents:
7368
diff
changeset
|
247 open, |
9599 | 248 &vf_opts |
7062
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
249 }; |
9eae15166ebb
soft video equalizer filter, currently supports brightness and
rfelker
parents:
diff
changeset
|
250 |