[Bug 700977] opencv: add colour image enhancement element based on Retinex algorithm
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Sun May 26 11:43:13 PDT 2013
https://bugzilla.gnome.org/show_bug.cgi?id=700977
GStreamer | gst-plugins-bad | 1.x
--- Comment #7 from Miguel (elmiguelao) Casas-Sanchez <miguelecasassanchez at gmail.com> 2013-05-26 18:43:10 UTC ---
(In reply to comment #4)
> Review of attachment 245300 [details]:
>
> ::: 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
>
ok done
> @@ +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
>
I didn't know that =-0, I moved then the allocation to the transform function,
but then I added a static int to keep track of the last "scales" value, to
compare with the one from the filter struct..
> 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
>
done.
> @@ +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)"
done too.
New patch on its way!
--
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