This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/v4l-utils.git tree:

Subject: gamma.c: run through checkpatch.pl
Author:  Hans Verkuil <hverk...@xs4all.nl>
Date:    Fri Apr 30 08:26:27 2010 +0200

Signed-off-by: Hans Verkuil <hverk...@xs4all.nl>

 lib/libv4lconvert/processing/gamma.c |   48 +++++++++++++++++----------------
 1 files changed, 25 insertions(+), 23 deletions(-)

---

http://git.linuxtv.org/v4l-utils.git?a=commitdiff;h=2ef6bc2a91f976bd57e29b66ed52f811c73f3ef2

diff --git a/lib/libv4lconvert/processing/gamma.c 
b/lib/libv4lconvert/processing/gamma.c
index fcb5bb0..937a0a6 100644
--- a/lib/libv4lconvert/processing/gamma.c
+++ b/lib/libv4lconvert/processing/gamma.c
@@ -14,44 +14,46 @@
 # You should have received a copy of the GNU Lesser General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/
+ */
 
 #include <math.h>
 #include "libv4lprocessing.h"
 #include "libv4lprocessing-priv.h"
 
-#define CLIP(color) (unsigned 
char)(((color)>0xff)?0xff:(((color)<0)?0:(color)))
+#define CLIP(color) (unsigned char)(((color) > 0xff) ? 0xff : (((color) < 0) ? 
0 : (color)))
 
-static int gamma_active(struct v4lprocessing_data *data) {
-  int gamma = v4lcontrol_get_ctrl(data->control, V4LCONTROL_GAMMA);
+static int gamma_active(struct v4lprocessing_data *data)
+{
+       int gamma = v4lcontrol_get_ctrl(data->control, V4LCONTROL_GAMMA);
 
-  return gamma && gamma != 1000;
+       return gamma && gamma != 1000;
 }
 
 static int gamma_calculate_lookup_tables(
-  struct v4lprocessing_data *data,
-  unsigned char *buf, const struct v4l2_format *fmt)
+               struct v4lprocessing_data *data,
+               unsigned char *buf, const struct v4l2_format *fmt)
 {
-  int i, x, gamma;
+       int i, x, gamma;
 
-  gamma = v4lcontrol_get_ctrl(data->control, V4LCONTROL_GAMMA);
+       gamma = v4lcontrol_get_ctrl(data->control, V4LCONTROL_GAMMA);
 
-  if (gamma != data->last_gamma) {
-    for (i = 0; i < 256; i++) {
-      x = powf(i / 255.0, 1000.0 / gamma) * 255;
-      data->gamma_table[i] = CLIP(x);
-    }
-    data->last_gamma = gamma;
-  }
+       if (gamma != data->last_gamma) {
+               for (i = 0; i < 256; i++) {
+                       x = powf(i / 255.0, 1000.0 / gamma) * 255;
+                       data->gamma_table[i] = CLIP(x);
+               }
+               data->last_gamma = gamma;
+       }
 
-  for (i = 0; i < 256; i++) {
-    data->comp1[i] = data->gamma_table[data->comp1[i]];
-    data->green[i] = data->gamma_table[data->green[i]];
-    data->comp2[i] = data->gamma_table[data->comp2[i]];
-  }
+       for (i = 0; i < 256; i++) {
+               data->comp1[i] = data->gamma_table[data->comp1[i]];
+               data->green[i] = data->gamma_table[data->green[i]];
+               data->comp2[i] = data->gamma_table[data->comp2[i]];
+       }
 
-  return 1;
+       return 1;
 }
 
 struct v4lprocessing_filter gamma_filter = {
-  gamma_active, gamma_calculate_lookup_tables };
+       gamma_active, gamma_calculate_lookup_tables
+};

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to