[gst-cvs] gst-plugins-bad: videoanalyse: Fix brightness calculation to not only use the first rowstride

Sebastian Dröge slomo at kemper.freedesktop.org
Fri Feb 27 11:44:24 PST 2009


Module: gst-plugins-bad
Branch: master
Commit: 22a9d7577f74b9d09a4e5a90af2a9e085a45fc7a
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=22a9d7577f74b9d09a4e5a90af2a9e085a45fc7a

Author: Andrzej Polatyński <apolatynski at gmail.com>
Date:   Fri Feb 27 20:43:25 2009 +0100

videoanalyse: Fix brightness calculation to not only use the first rowstride

Fixes bug #573391.

---

 gst/videosignal/gstvideoanalyse.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gst/videosignal/gstvideoanalyse.c b/gst/videosignal/gstvideoanalyse.c
index ee84be3..8f4ef6c 100644
--- a/gst/videosignal/gstvideoanalyse.c
+++ b/gst/videosignal/gstvideoanalyse.c
@@ -200,7 +200,7 @@ gst_video_analyse_420 (GstVideoAnalyse * videoanalyse, guint8 * data,
   /* do brightness as average of pixel brightness in 0.0 to 1.0 */
   for (i = 0; i < height; i++) {
     for (j = 0; j < width; j++) {
-      sum += data[j];
+      sum += d[j];
     }
     d += GST_VIDEO_I420_Y_ROWSTRIDE (width);
   }





More information about the Gstreamer-commits mailing list