diff options
author | Clément Bœsch <u@pkh.me> | 2014-11-23 00:33:19 +0100 |
---|---|---|
committer | Clément Bœsch <clement@stupeflix.com> | 2014-11-26 21:29:09 +0100 |
commit | c2ea7069c4895dffac4e4765373ad0032e9f7d72 (patch) | |
tree | c446eaec0b1c764cef01a3e43bb4f2e0cada3f12 /libavfilter | |
parent | 9cb1d81a60bd335190175bd168470e077e237579 (diff) | |
download | ffmpeg-c2ea7069c4895dffac4e4765373ad0032e9f7d72.tar.gz |
avfilter/signalstats: re-use yuv/yuvu/yuvv vars in diff
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_signalstats.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/vf_signalstats.c b/libavfilter/vf_signalstats.c index 3ef689f4cf..4b2792f117 100644 --- a/libavfilter/vf_signalstats.c +++ b/libavfilter/vf_signalstats.c @@ -413,7 +413,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in) for (i = 0; i < link->w; i++) { const int yuv = in->data[0][w + i]; histy[yuv]++; - dify += abs(in->data[0][w + i] - prev->data[0][pw + i]); + dify += abs(yuv - prev->data[0][pw + i]); } w += in->linesize[0]; pw += prev->linesize[0]; @@ -425,9 +425,9 @@ static int filter_frame(AVFilterLink *link, AVFrame *in) 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]); + difu += abs(yuvu - prev->data[1][cpw+i]); histv[yuvv]++; - difv += abs(in->data[2][cw+i] - prev->data[2][cpw+i]); + difv += abs(yuvv - prev->data[2][cpw+i]); histsat[p_sat[i]]++; histhue[((int16_t*)p_hue)[i]]++; |