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