[Bug 700977] opencv: add colour image enhancement element based on Retinex algorithm

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun May 26 01:20:14 PDT 2013


https://bugzilla.gnome.org/show_bug.cgi?id=700977
  GStreamer | gst-plugins-bad | 1.x

Sebastian Dröge <slomo> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #245300|none                        |needs-work
             status|                            |

--- Comment #4 from Sebastian Dröge <slomo at circular-chaos.org> 2013-05-26 08:20:05 UTC ---
Review of attachment 245300:
 --> (https://bugzilla.gnome.org/review?bug=700977&attachment=245300)

::: ext/opencv/gstretinex.c
@@ +184,3 @@
+  filter->method = DEFAULT_METHOD;
+  filter->scales = DEFAULT_SCALES;
+  gst_base_transform_set_in_place (GST_BASE_TRANSFORM (filter), FALSE);

Should be TRUE, not FALSE

@@ +206,3 @@
+        retinex->sigmas =
+            (double *) realloc (retinex->sigmas,
+            sizeof (double) * retinex->scales);

This all needs locking then, as set_property() can be called while transform()
is called. That's why I proposed to just do the allocation/initialization in
transform() if the scales value has changed

Best also to use g_realloc() here for portability

@@ +277,3 @@
+
+  free (filter->weights);
+  free (filter->sigmas);

Use g_free(), and set to NULL after freeing

@@ +304,3 @@
+  int filter_size;
+
+  if (TRUE != gst_buffer_map (buf, &info, GST_MAP_READWRITE)) {

Don't do comparisons for boolean checks, just "if (foo)" and "if (!foo)"

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list