[FFmpeg-cvslog] avfilter/signalstats: localize a few variables
Clément Bœsch
git at videolan.org
Wed Nov 26 21:58:51 CET 2014
ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Sun Nov 23 00:29:50 2014 +0100| [9cb1d81a60bd335190175bd168470e077e237579] | committer: Clément Bœsch
avfilter/signalstats: localize a few variables
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9cb1d81a60bd335190175bd168470e077e237579
---
libavfilter/vf_signalstats.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/libavfilter/vf_signalstats.c b/libavfilter/vf_signalstats.c
index 014b87d..3ef689f 100644
--- a/libavfilter/vf_signalstats.c
+++ b/libavfilter/vf_signalstats.c
@@ -360,7 +360,6 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
int i, j;
int w = 0, cw = 0, // in
pw = 0, cpw = 0; // prev
- int yuv, yuvu, yuvv;
int fil;
char metabuf[128];
unsigned int histy[DEPTH] = {0},
@@ -412,7 +411,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
// Calculate luma histogram and difference with previous frame or field.
for (j = 0; j < link->h; j++) {
for (i = 0; i < link->w; i++) {
- yuv = in->data[0][w + i];
+ const int yuv = in->data[0][w + i];
histy[yuv]++;
dify += abs(in->data[0][w + i] - prev->data[0][pw + i]);
}
@@ -423,8 +422,8 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
// Calculate chroma histogram and difference with previous frame or field.
for (j = 0; j < s->chromah; j++) {
for (i = 0; i < s->chromaw; i++) {
- yuvu = in->data[1][cw+i];
- yuvv = in->data[2][cw+i];
+ const int yuvu = in->data[1][cw+i];
+ const int yuvv = in->data[2][cw+i];
histu[yuvu]++;
difu += abs(in->data[1][cw+i] - prev->data[1][cpw+i]);
histv[yuvv]++;
More information about the ffmpeg-cvslog
mailing list