<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 1, 2016 at 6:10 AM, Oded Gabbay <span dir="ltr"><<a href="mailto:oded.gabbay@gmail.com" target="_blank">oded.gabbay@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
> - params = pixman_filter_create_separable_convolution (<br>
> - &n_params,<br>
> - sx * 65536.0 + 0.5,<br>
> - sy * 65536.0 + 0.5,<br>
> - get_value (app, filters, "reconstruct_x_combo_box"),<br>
> - get_value (app, filters, "reconstruct_y_combo_box"),<br>
> - get_value (app, filters, "sample_x_combo_box"),<br>
> - get_value (app, filters, "sample_y_combo_box"),<br>
> - gtk_adjustment_get_value (app->subsample_adjustment),<br>
> - gtk_adjustment_get_value (app->subsample_adjustment));<br>
> + if (get_value (app, filter_types, "filter_combo_box") ==<br>
> + PIXMAN_FILTER_SEPARABLE_CONVOLUTION)<br>
> + {<br>
> + params = pixman_filter_create_separable_convolution (<br>
> + &n_params,<br>
> + sx * 65536.0 + 0.5,<br>
> + sy * 65536.0 + 0.5,<br>
> + get_value (app, filters, "reconstruct_x_combo_box"),<br>
> + get_value (app, filters, "reconstruct_y_combo_box"),<br>
> + get_value (app, filters, "sample_x_combo_box"),<br>
> + get_value (app, filters, "sample_y_combo_box"),<br>
> + gtk_adjustment_get_value (app->subsample_adjustment),<br>
> + gtk_adjustment_get_value (app->subsample_adjustment));<br>
> + }<br>
> + else<br>
> + {<br>
> + params = 0;<br>
> + n_params = 0;<br>
> + }<br>
<br>
</div></div>Wait, what the above code has to do with this patch ?<br>
It wasn't in the previous version (v7) and I don't see how it is<br>
related to the gnuplot.<br>
This seems like a fix to the demo code.<br>
If what I said is correct, please split it into a different patch.<br></blockquote><div><br></div><div>I had to patch it so it did not run the filter generator twice when set to good/best, otherwise the plot flashed back and forth annoyingly.</div><div><br></div><div>But this also makes the demo a bit faster showing accurately the speed at which transforms are done, so I think putting this in an earlier patch is a good idea. <br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
> +#if PIXMAN_GNUPLOT<br>
<br>
</span>To keep consistency with other defines checks, please use #ifdef when<br>
checking just one define<br></blockquote><div><br></div><div>OK</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
> @@ -346,5 +387,9 @@ out:<br>
> free (horz);<br>
> free (vert);<br>
><br>
> +#if PIXMAN_GNUPLOT<br>
<br>
</div></div>To keep consistency with other defines checks, please use #ifdef when<br>
checking just one define<br>
<span class=""><br>
> + gnuplot_filter(width, subsample_x, params+4);<br>
> +#endif<br>
> +<br>
<br>
</span>What's the point in printing the filter after the out: label ?<br>
You can get here in cases where there were errors in the function.<br>
Why not put the call to gnuplot_filter() just before the out: label ?<br></blockquote><div><br></div><div>You are correct it should only do this on success. My mistake.</div><div> </div></div></div></div>