[FFmpeg-cvslog] avfilter/signalstats: re-use yuv/yuvu/yuvv vars in diff

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:33:19 2014 +0100| [c2ea7069c4895dffac4e4765373ad0032e9f7d72] | committer: Clément Bœsch

avfilter/signalstats: re-use yuv/yuvu/yuvv vars in diff

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c2ea7069c4895dffac4e4765373ad0032e9f7d72
---

 libavfilter/vf_signalstats.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavfilter/vf_signalstats.c b/libavfilter/vf_signalstats.c
index 3ef689f..4b2792f 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]]++;



More information about the ffmpeg-cvslog mailing list