Mercurial > mplayer.hg
comparison libmpcodecs/vf_delogo.c @ 29263:0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
author | diego |
---|---|
date | Wed, 13 May 2009 02:58:57 +0000 |
parents | 290420c32921 |
children | 391e683541a7 |
comparison
equal
deleted
inserted
replaced
29262:7d545a6b8aff | 29263:0f1b5b68af32 |
---|---|
52 static void delogo(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int width, int height, | 52 static void delogo(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int width, int height, |
53 int logo_x, int logo_y, int logo_w, int logo_h, int band, int show, int direct) { | 53 int logo_x, int logo_y, int logo_w, int logo_h, int band, int show, int direct) { |
54 int y, x; | 54 int y, x; |
55 int interp, dist; | 55 int interp, dist; |
56 uint8_t *xdst, *xsrc; | 56 uint8_t *xdst, *xsrc; |
57 | 57 |
58 uint8_t *topleft, *botleft, *topright; | 58 uint8_t *topleft, *botleft, *topright; |
59 int xclipl, xclipr, yclipt, yclipb; | 59 int xclipl, xclipr, yclipt, yclipb; |
60 int logo_x1, logo_x2, logo_y1, logo_y2; | 60 int logo_x1, logo_x2, logo_y1, logo_y2; |
61 | 61 |
62 xclipl = MAX(-logo_x, 0); | 62 xclipl = MAX(-logo_x, 0); |
63 xclipr = MAX(logo_x+logo_w-width, 0); | 63 xclipr = MAX(logo_x+logo_w-width, 0); |
64 yclipt = MAX(-logo_y, 0); | 64 yclipt = MAX(-logo_y, 0); |
65 yclipb = MAX(logo_y+logo_h-height, 0); | 65 yclipb = MAX(logo_y+logo_h-height, 0); |
66 | 66 |
75 | 75 |
76 if (!direct) memcpy_pic(dst, src, width, height, dstStride, srcStride); | 76 if (!direct) memcpy_pic(dst, src, width, height, dstStride, srcStride); |
77 | 77 |
78 dst += (logo_y1+1)*dstStride; | 78 dst += (logo_y1+1)*dstStride; |
79 src += (logo_y1+1)*srcStride; | 79 src += (logo_y1+1)*srcStride; |
80 | 80 |
81 for(y = logo_y1+1; y < logo_y2-1; y++) | 81 for(y = logo_y1+1; y < logo_y2-1; y++) |
82 { | 82 { |
83 for (x = logo_x1+1, xdst = dst+logo_x1+1, xsrc = src+logo_x1+1; x < logo_x2-1; x++, xdst++, xsrc++) { | 83 for (x = logo_x1+1, xdst = dst+logo_x1+1, xsrc = src+logo_x1+1; x < logo_x2-1; x++, xdst++, xsrc++) { |
84 interp = ((topleft[srcStride*(y-logo_y-yclipt)] | 84 interp = ((topleft[srcStride*(y-logo_y-yclipt)] |
85 + topleft[srcStride*(y-logo_y-1-yclipt)] | 85 + topleft[srcStride*(y-logo_y-1-yclipt)] |
196 0 | 196 0 |
197 }; | 197 }; |
198 | 198 |
199 static int open(vf_instance_t *vf, char* args){ | 199 static int open(vf_instance_t *vf, char* args){ |
200 int res; | 200 int res; |
201 | 201 |
202 vf->config=config; | 202 vf->config=config; |
203 vf->put_image=put_image; | 203 vf->put_image=put_image; |
204 vf->get_image=get_image; | 204 vf->get_image=get_image; |
205 vf->query_format=query_format; | 205 vf->query_format=query_format; |
206 vf->uninit=uninit; | 206 vf->uninit=uninit; |
228 | 228 |
229 if (vf->priv->band < 0) { | 229 if (vf->priv->band < 0) { |
230 vf->priv->band = 4; | 230 vf->priv->band = 4; |
231 vf->priv->show = 1; | 231 vf->priv->show = 1; |
232 } | 232 } |
233 | 233 |
234 | 234 |
235 vf->priv->lw += vf->priv->band*2; | 235 vf->priv->lw += vf->priv->band*2; |
236 vf->priv->lh += vf->priv->band*2; | 236 vf->priv->lh += vf->priv->band*2; |
237 vf->priv->xoff -= vf->priv->band; | 237 vf->priv->xoff -= vf->priv->band; |
238 vf->priv->yoff -= vf->priv->band; | 238 vf->priv->yoff -= vf->priv->band; |