summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-01 17:33:11 +0100
committerwm4 <wm4@nowhere>2013-11-01 17:35:38 +0100
commite0b6fdeb8d9a54c357ff9fbf552e1ff4b6282282 (patch)
tree34e5fda2e7e7d2d16dfa41c749f98bcad323f4da /video
parent4b6c00c50ad7739c024662be0321eef8015b5829 (diff)
downloadmpv-e0b6fdeb8d9a54c357ff9fbf552e1ff4b6282282.tar.bz2
mpv-e0b6fdeb8d9a54c357ff9fbf552e1ff4b6282282.tar.xz
Fix some more -Wshadow warnings
These aren't printed with newer gcc or clang versions for some reason. All of them seem to be about local variables shadowing global functions.
Diffstat (limited to 'video')
-rw-r--r--video/filter/vf_delogo.c16
-rw-r--r--video/filter/vf_noise.c8
-rw-r--r--video/out/gl_video.c8
-rw-r--r--video/sws_utils.c4
-rw-r--r--video/sws_utils.h2
5 files changed, 19 insertions, 19 deletions
diff --git a/video/filter/vf_delogo.c b/video/filter/vf_delogo.c
index 98bb34bb7c..f609d35a81 100644
--- a/video/filter/vf_delogo.c
+++ b/video/filter/vf_delogo.c
@@ -99,8 +99,8 @@ static void update_sub(struct vf_priv_s *p, double pts)
fix_band(p);
}
-static void delogo(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int width, int height,
- int logo_x, int logo_y, int logo_w, int logo_h, int band, int show) {
+static void do_delogo(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int width, int height,
+ int logo_x, int logo_y, int logo_w, int logo_h, int band, int show) {
int y, x;
int interp, dist;
uint8_t *xdst, *xsrc;
@@ -183,12 +183,12 @@ static struct mp_image *filter(struct vf_instance *vf, struct mp_image *mpi)
if (vf->priv->timed_rect)
update_sub(vf->priv, dmpi->pts);
- delogo(dmpi->planes[0], mpi->planes[0], dmpi->stride[0], mpi->stride[0], mpi->w, mpi->h,
- vf->priv->xoff, vf->priv->yoff, vf->priv->lw, vf->priv->lh, vf->priv->band, vf->priv->show);
- delogo(dmpi->planes[1], mpi->planes[1], dmpi->stride[1], mpi->stride[1], mpi->w/2, mpi->h/2,
- vf->priv->xoff/2, vf->priv->yoff/2, vf->priv->lw/2, vf->priv->lh/2, vf->priv->band/2, vf->priv->show);
- delogo(dmpi->planes[2], mpi->planes[2], dmpi->stride[2], mpi->stride[2], mpi->w/2, mpi->h/2,
- vf->priv->xoff/2, vf->priv->yoff/2, vf->priv->lw/2, vf->priv->lh/2, vf->priv->band/2, vf->priv->show);
+ do_delogo(dmpi->planes[0], mpi->planes[0], dmpi->stride[0], mpi->stride[0], mpi->w, mpi->h,
+ vf->priv->xoff, vf->priv->yoff, vf->priv->lw, vf->priv->lh, vf->priv->band, vf->priv->show);
+ do_delogo(dmpi->planes[1], mpi->planes[1], dmpi->stride[1], mpi->stride[1], mpi->w/2, mpi->h/2,
+ vf->priv->xoff/2, vf->priv->yoff/2, vf->priv->lw/2, vf->priv->lh/2, vf->priv->band/2, vf->priv->show);
+ do_delogo(dmpi->planes[2], mpi->planes[2], dmpi->stride[2], mpi->stride[2], mpi->w/2, mpi->h/2,
+ vf->priv->xoff/2, vf->priv->yoff/2, vf->priv->lw/2, vf->priv->lh/2, vf->priv->band/2, vf->priv->show);
if (dmpi != mpi)
talloc_free(mpi);
diff --git a/video/filter/vf_noise.c b/video/filter/vf_noise.c
index 970e762b10..c81a1d1338 100644
--- a/video/filter/vf_noise.c
+++ b/video/filter/vf_noise.c
@@ -268,7 +268,7 @@ static inline void lineNoiseAvg_C(uint8_t *dst, uint8_t *src, int len, int8_t **
/***************************************************************************/
-static void noise(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int width, int height, FilterParam *fp){
+static void donoise(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int width, int height, FilterParam *fp){
int8_t *noise= fp->noise;
int y;
int shift=0;
@@ -324,9 +324,9 @@ static struct mp_image *filter(struct vf_instance *vf, struct mp_image *mpi)
mp_image_copy_attributes(dmpi, mpi);
}
- noise(dmpi->planes[0], mpi->planes[0], dmpi->stride[0], mpi->stride[0], mpi->w, mpi->h, &vf->priv->lumaParam);
- noise(dmpi->planes[1], mpi->planes[1], dmpi->stride[1], mpi->stride[1], mpi->w/2, mpi->h/2, &vf->priv->chromaParam);
- noise(dmpi->planes[2], mpi->planes[2], dmpi->stride[2], mpi->stride[2], mpi->w/2, mpi->h/2, &vf->priv->chromaParam);
+ donoise(dmpi->planes[0], mpi->planes[0], dmpi->stride[0], mpi->stride[0], mpi->w, mpi->h, &vf->priv->lumaParam);
+ donoise(dmpi->planes[1], mpi->planes[1], dmpi->stride[1], mpi->stride[1], mpi->w/2, mpi->h/2, &vf->priv->chromaParam);
+ donoise(dmpi->planes[2], mpi->planes[2], dmpi->stride[2], mpi->stride[2], mpi->w/2, mpi->h/2, &vf->priv->chromaParam);
#if HAVE_MMX
if(gCpuCaps.hasMMX) __asm__ volatile ("emms\n\t");
diff --git a/video/out/gl_video.c b/video/out/gl_video.c
index 603f334c9b..d4b4b507c3 100644
--- a/video/out/gl_video.c
+++ b/video/out/gl_video.c
@@ -367,7 +367,7 @@ void gl_video_set_debug(struct gl_video *p, bool enable)
p->gl_debug = enable;
}
-static void tex_size(struct gl_video *p, int w, int h, int *texw, int *texh)
+static void texture_size(struct gl_video *p, int w, int h, int *texw, int *texh)
{
if (p->opts.npot) {
*texw = w;
@@ -457,7 +457,7 @@ static bool fbotex_init(struct gl_video *p, struct fbotex *fbo, int w, int h,
.vp_h = h,
};
- tex_size(p, w, h, &fbo->tex_w, &fbo->tex_h);
+ texture_size(p, w, h, &fbo->tex_w, &fbo->tex_h);
MP_VERBOSE(p, "Create FBO: %dx%d\n", fbo->tex_w, fbo->tex_h);
@@ -1243,8 +1243,8 @@ static void init_video(struct gl_video *p)
plane->w = full_w >> p->image_desc.xs[n];
plane->h = full_h >> p->image_desc.ys[n];
- tex_size(p, plane->w, plane->h,
- &plane->tex_w, &plane->tex_h);
+ texture_size(p, plane->w, plane->h,
+ &plane->tex_w, &plane->tex_h);
MP_VERBOSE(p, "Texture for plane %d: %dx%d\n",
n, plane->tex_w, plane->tex_h);
diff --git a/video/sws_utils.c b/video/sws_utils.c
index c6696ec37b..27cd0c7330 100644
--- a/video/sws_utils.c
+++ b/video/sws_utils.c
@@ -161,9 +161,9 @@ static void free_mp_sws(void *p)
// You're supposed to set your scaling parameters on the returned context.
// Free the context with talloc_free().
-struct mp_sws_context *mp_sws_alloc(void *talloc_parent)
+struct mp_sws_context *mp_sws_alloc(void *talloc_ctx)
{
- struct mp_sws_context *ctx = talloc_ptrtype(talloc_parent, ctx);
+ struct mp_sws_context *ctx = talloc_ptrtype(talloc_ctx, ctx);
*ctx = (struct mp_sws_context) {
.flags = SWS_BILINEAR,
.contrast = 1 << 16, // 1.0 in 16.16 fixed point
diff --git a/video/sws_utils.h b/video/sws_utils.h
index 6183d5e88e..d6ea4b15b3 100644
--- a/video/sws_utils.h
+++ b/video/sws_utils.h
@@ -47,7 +47,7 @@ struct mp_sws_context {
struct mp_sws_context *cached;
};
-struct mp_sws_context *mp_sws_alloc(void *talloc_parent);
+struct mp_sws_context *mp_sws_alloc(void *talloc_ctx);
int mp_sws_reinit(struct mp_sws_context *ctx);
void mp_sws_set_from_cmdline(struct mp_sws_context *ctx);
int mp_sws_scale(struct mp_sws_context *ctx, struct mp_image *dst,