summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/decode/vd_lavc.c8
-rw-r--r--video/filter/vf_down3dright.c8
-rw-r--r--video/filter/vf_hqdn3d.c4
-rw-r--r--video/filter/vf_lavfi.c2
-rw-r--r--video/filter/vf_phase.c2
-rw-r--r--video/filter/vf_scale.c8
-rw-r--r--video/filter/vf_softpulldown.c6
-rw-r--r--video/out/gl_lcms.c4
-rw-r--r--video/out/gl_video.c10
-rw-r--r--video/out/vo_opengl_old.c4
-rw-r--r--video/out/vo_sdl.c4
-rw-r--r--video/out/vo_vdpau.c3
12 files changed, 29 insertions, 34 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index 978462fbe5..3ee1b40bb8 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -96,7 +96,7 @@ struct hwdec {
const char *codec, *hw_codec;
};
-static const struct hwdec hwdec[] = {
+static const struct hwdec hwdec_list[] = {
{HWDEC_VDPAU, "h264", "h264_vdpau"},
{HWDEC_VDPAU, "wmv3", "wmv3_vdpau"},
{HWDEC_VDPAU, "vc1", "vc1_vdpau"},
@@ -120,9 +120,9 @@ static const struct hwdec hwdec[] = {
static struct hwdec *find_hwcodec(enum hwdec_type api, const char *codec)
{
- for (int n = 0; hwdec[n].api; n++) {
- if (hwdec[n].api == api && strcmp(hwdec[n].codec, codec) == 0)
- return (struct hwdec *)&hwdec[n];
+ for (int n = 0; hwdec_list[n].api; n++) {
+ if (hwdec_list[n].api == api && strcmp(hwdec_list[n].codec, codec) == 0)
+ return (struct hwdec *)&hwdec_list[n];
}
return NULL;
}
diff --git a/video/filter/vf_down3dright.c b/video/filter/vf_down3dright.c
index 21616a4ad2..895753bafc 100644
--- a/video/filter/vf_down3dright.c
+++ b/video/filter/vf_down3dright.c
@@ -37,16 +37,16 @@ struct vf_priv_s {
int scaleh;
};
-static void toright(unsigned char *dst[3], unsigned char *src[3],
+static void toright(unsigned char *adst[3], unsigned char *asrc[3],
int dststride[3], int srcstride[3],
int w, int h, struct vf_priv_s* p)
{
int k;
for (k = 0; k < 3; k++) {
- unsigned char* fromL = src[k];
- unsigned char* fromR = src[k];
- unsigned char* to = dst[k];
+ unsigned char* fromL = asrc[k];
+ unsigned char* fromR = asrc[k];
+ unsigned char* to = adst[k];
int src = srcstride[k];
int dst = dststride[k];
int ss;
diff --git a/video/filter/vf_hqdn3d.c b/video/filter/vf_hqdn3d.c
index c5d99b2ace..8351707659 100644
--- a/video/filter/vf_hqdn3d.c
+++ b/video/filter/vf_hqdn3d.c
@@ -119,7 +119,6 @@ static void deNoiseSpacial(
}
for (Y = 1; Y < H; Y++){
- unsigned int PixelAnt;
sLineOffs += sStride, dLineOffs += dStride;
/* First pixel on each line doesn't have previous pixel */
PixelAnt = Frame[sLineOffs]<<16;
@@ -127,7 +126,6 @@ static void deNoiseSpacial(
FrameDest[dLineOffs]= ((PixelDst+0x10007FFF)>>16);
for (X = 1; X < W; X++){
- unsigned int PixelDst;
/* The rest are normal */
PixelAnt = LowPassMul(PixelAnt, Frame[sLineOffs+X]<<16, Horizontal);
PixelDst = LineAnt[X] = LowPassMul(LineAnt[X], PixelAnt, Vertical);
@@ -185,7 +183,6 @@ static void deNoise(unsigned char *Frame, // mpi->planes[x]
}
for (Y = 1; Y < H; Y++){
- unsigned int PixelAnt;
unsigned short* LinePrev=&FrameAnt[Y*W];
sLineOffs += sStride, dLineOffs += dStride;
/* First pixel on each line doesn't have previous pixel */
@@ -196,7 +193,6 @@ static void deNoise(unsigned char *Frame, // mpi->planes[x]
FrameDest[dLineOffs]= ((PixelDst+0x10007FFF)>>16);
for (X = 1; X < W; X++){
- unsigned int PixelDst;
/* The rest are normal */
PixelAnt = LowPassMul(PixelAnt, Frame[sLineOffs+X]<<16, Horizontal);
LineAnt[X] = LowPassMul(LineAnt[X], PixelAnt, Vertical);
diff --git a/video/filter/vf_lavfi.c b/video/filter/vf_lavfi.c
index d1e7a6e0cf..9cb731ae18 100644
--- a/video/filter/vf_lavfi.c
+++ b/video/filter/vf_lavfi.c
@@ -282,7 +282,7 @@ static int filter_ext(struct vf_instance *vf, struct mp_image *mpi)
av_frame_free(&frame);
for (;;) {
- AVFrame *frame = av_frame_alloc();
+ frame = av_frame_alloc();
if (av_buffersink_get_frame(p->out, frame) < 0) {
// Not an error situation - no more output buffers in queue.
av_frame_free(&frame);
diff --git a/video/filter/vf_phase.c b/video/filter/vf_phase.c
index 0b31ede5e5..5754b5f2c7 100644
--- a/video/filter/vf_phase.c
+++ b/video/filter/vf_phase.c
@@ -86,7 +86,7 @@ static void do_plane(unsigned char *to, unsigned char *from,
static enum mode analyze_plane(unsigned char *old, unsigned char *new,
int w, int h, int os, int ns, enum mode mode,
- int verbose, int fields)
+ int unused, int fields)
{
double bdiff, pdiff, tdiff, scale;
int bdif, tdif, pdif;
diff --git a/video/filter/vf_scale.c b/video/filter/vf_scale.c
index 738487f7d8..35c9e3cbae 100644
--- a/video/filter/vf_scale.c
+++ b/video/filter/vf_scale.c
@@ -203,15 +203,15 @@ static unsigned int find_best_out(vf_instance_t *vf, int in_format)
}
if (!best) {
// Try anything else. outfmt_list is just a list of preferred formats.
- for (int format = IMGFMT_START; format < IMGFMT_END; format++) {
- int ret = check_outfmt(vf, format);
+ for (int cur = IMGFMT_START; cur < IMGFMT_END; cur++) {
+ int ret = check_outfmt(vf, cur);
if (ret & VFCAP_CSP_SUPPORTED_BY_HW) {
- best = format; // no conversion -> bingo!
+ best = cur; // no conversion -> bingo!
break;
}
if (ret & VFCAP_CSP_SUPPORTED && !best)
- best = format; // best with conversion
+ best = cur; // best with conversion
}
}
return best;
diff --git a/video/filter/vf_softpulldown.c b/video/filter/vf_softpulldown.c
index 9fd75a0ba0..02a1158d5d 100644
--- a/video/filter/vf_softpulldown.c
+++ b/video/filter/vf_softpulldown.c
@@ -95,9 +95,9 @@ static int filter(struct vf_instance *vf, struct mp_image *mpi)
vf_add_output_frame(vf, new);
vf->priv->out++;
if (flags & MP_IMGFIELD_REPEAT_FIRST) {
- struct mp_image *new = mp_image_new_ref(mpi);
- new->pts = vf_softpulldown_adjust_pts(&vf->priv->ptsbuf, mpi->pts, 0, 0, 3);
- vf_add_output_frame(vf, new);
+ struct mp_image *new2 = mp_image_new_ref(mpi);
+ new2->pts = vf_softpulldown_adjust_pts(&vf->priv->ptsbuf, mpi->pts, 0, 0, 3);
+ vf_add_output_frame(vf, new2);
vf->priv->out++;
vf->priv->state=0;
} else {
diff --git a/video/out/gl_lcms.c b/video/out/gl_lcms.c
index f7e418f1d1..fdab119fb1 100644
--- a/video/out/gl_lcms.c
+++ b/video/out/gl_lcms.c
@@ -39,9 +39,9 @@
#include <lcms2.h>
-static bool parse_3dlut_size(const char *s, int *p1, int *p2, int *p3)
+static bool parse_3dlut_size(const char *arg, int *p1, int *p2, int *p3)
{
- if (sscanf(s, "%dx%dx%d", p1, p2, p3) != 3)
+ if (sscanf(arg, "%dx%dx%d", p1, p2, p3) != 3)
return false;
for (int n = 0; n < 3; n++) {
int s = ((int[]) { *p1, *p2, *p3 })[n];
diff --git a/video/out/gl_video.c b/video/out/gl_video.c
index 98862b92e7..bb99d769b4 100644
--- a/video/out/gl_video.c
+++ b/video/out/gl_video.c
@@ -1592,7 +1592,7 @@ static void draw_osd_cb(void *ctx, struct mpgl_osd_part *osd,
for (int n = 0; n < osd->packer->count; n++) {
struct sub_bitmap *b = &imgs->parts[n];
- struct pos p = osd->packer->result[n];
+ struct pos pos = osd->packer->result[n];
// NOTE: the blend color is used with SUBBITMAP_LIBASS only, so it
// doesn't matter that we upload garbage for the other formats
@@ -1602,7 +1602,7 @@ static void draw_osd_cb(void *ctx, struct mpgl_osd_part *osd,
write_quad(&va[osd->num_vertices],
b->x, b->y, b->x + b->dw, b->y + b->dh,
- p.x, p.y, p.x + b->w, p.y + b->h,
+ pos.x, pos.y, pos.x + b->w, pos.y + b->h,
osd->w, osd->h, color, false);
osd->num_vertices += VERTICES_PER_QUAD;
}
@@ -1657,12 +1657,12 @@ static bool test_fbo(struct gl_video *p, GLenum format)
gl->BindFramebuffer(GL_FRAMEBUFFER, fbo.fbo);
gl->ReadBuffer(GL_COLOR_ATTACHMENT0);
for (int i = 0; i < 4; i++) {
- float p = -1;
+ float pixel = -1;
float val = vals[i];
gl->ClearColor(val, 0.0f, 0.0f, 1.0f);
gl->Clear(GL_COLOR_BUFFER_BIT);
- gl->ReadPixels(0, 0, 1, 1, GL_RED, GL_FLOAT, &p);
- mp_msg(MSGT_VO, MSGL_V, " %s: %a\n", val_names[i], val - p);
+ gl->ReadPixels(0, 0, 1, 1, GL_RED, GL_FLOAT, &pixel);
+ mp_msg(MSGT_VO, MSGL_V, " %s: %a\n", val_names[i], val - pixel);
}
gl->BindFramebuffer(GL_FRAMEBUFFER, 0);
glCheckError(gl, "after FBO read");
diff --git a/video/out/vo_opengl_old.c b/video/out/vo_opengl_old.c
index 2caf0c3f28..1e8fba6495 100644
--- a/video/out/vo_opengl_old.c
+++ b/video/out/vo_opengl_old.c
@@ -1832,8 +1832,8 @@ static bool get_image(struct vo *vo, mp_image_t *mpi, int *th, bool *cplane)
height = p->texture_height;
}
int avgbpp16 = 0;
- for (int p = 0; p < 4; p++)
- avgbpp16 += (16 * mpi->fmt.bpp[p]) >> mpi->fmt.xs[p] >> mpi->fmt.ys[p];
+ for (int pl = 0; pl < 4; pl++)
+ avgbpp16 += (16 * mpi->fmt.bpp[pl]) >> mpi->fmt.xs[pl] >> mpi->fmt.ys[pl];
int avgbpp = avgbpp16 / 16;
mpi->stride[0] = width * avgbpp / 8;
needed_size = mpi->stride[0] * height;
diff --git a/video/out/vo_sdl.c b/video/out/vo_sdl.c
index c5ecc2be8c..6b8b393984 100644
--- a/video/out/vo_sdl.c
+++ b/video/out/vo_sdl.c
@@ -721,11 +721,11 @@ static void draw_osd(struct vo *vo, struct osd_state *osd)
{
struct priv *vc = vo->priv;
- static const bool formats[SUBBITMAP_COUNT] = {
+ static const bool osdformats[SUBBITMAP_COUNT] = {
[SUBBITMAP_RGBA] = true,
};
- osd_draw(osd, vc->osd_res, osd->vo_pts, 0, formats, draw_osd_cb, vo);
+ osd_draw(osd, vc->osd_res, osd->vo_pts, 0, osdformats, draw_osd_cb, vo);
}
static int preinit(struct vo *vo)
diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c
index 85ad4ecf80..6f1483cdd9 100644
--- a/video/out/vo_vdpau.c
+++ b/video/out/vo_vdpau.c
@@ -1390,7 +1390,6 @@ static void destroy_vdpau_objects(struct vo *vo)
struct vdpctx *vc = vo->priv;
struct vdp_functions *vdp = vc->vdp;
- int i;
VdpStatus vdp_st;
free_video_specific(vo);
@@ -1406,7 +1405,7 @@ static void destroy_vdpau_objects(struct vo *vo)
"vdp_presentation_queue_target_destroy");
}
- for (i = 0; i < vc->num_output_surfaces; i++) {
+ for (int i = 0; i < vc->num_output_surfaces; i++) {
if (vc->output_surfaces[i] == VDP_INVALID_HANDLE)
continue;
vdp_st = vdp->output_surface_destroy(vc->output_surfaces[i]);