changeset 35299:7b3815b8238d

Remove useless casts.
author reimar
date Sat, 10 Nov 2012 13:13:29 +0000
parents 99e63193b542
children ebcf337f1786
files libmpcodecs/vf_remove_logo.c
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_remove_logo.c	Sat Nov 10 13:11:49 2012 +0000
+++ b/libmpcodecs/vf_remove_logo.c	Sat Nov 10 13:13:29 2012 +0000
@@ -306,13 +306,13 @@
 
   /* Create a circular mask for each size up to max_mask_size. When the filter is applied, the mask size is
      determined on a pixel by pixel basis, with pixels nearer the edge of the logo getting smaller mask sizes. */
-  mask = (int * * *) safe_malloc(sizeof(int * *) * (max_mask_size + 1));
+  mask = safe_malloc(sizeof(int * *) * (max_mask_size + 1));
   for (a = 0; a <= max_mask_size; a++)
   {
-    mask[a] = (int * *) safe_malloc(sizeof(int *) * ((a * 2) + 1));
+    mask[a] = safe_malloc(sizeof(int *) * ((a * 2) + 1));
     for (b = -a; b <= a; b++)
     {
-      mask[a][b + a] = (int *) safe_malloc(sizeof(int) * ((a * 2) + 1));
+      mask[a][b + a] = safe_malloc(sizeof(int) * ((a * 2) + 1));
       for (c = -a; c <= a; c++)
       {
         if ((b * b) + (c * c) <= (a * a)) /* Circular 0/1 mask. */
@@ -533,7 +533,7 @@
   int maximum_greyscale_value;
   FILE * input;
   int pnm_number;
-  pgm_structure * new_pgm = (pgm_structure *) safe_malloc (sizeof(pgm_structure));
+  pgm_structure * new_pgm = safe_malloc (sizeof(pgm_structure));
   char * write_position;
   char * end_position;
   int image_size; /* width * height */
@@ -553,7 +553,7 @@
   if (maximum_greyscale_value >= 256) REMOVE_LOGO_LOAD_PGM_ERROR_MESSAGE("[vf]remove_logo: Only 1 byte per pixel (pgm) or 1 byte per color value (ppm) are supported.\n");
   load_pgm_skip(input);
 
-  new_pgm->pixel = (unsigned char *) safe_malloc (sizeof(unsigned char) * new_pgm->width * new_pgm->height);
+  new_pgm->pixel = safe_malloc (sizeof(unsigned char) * new_pgm->width * new_pgm->height);
 
   /* Load the pixels. */
   /* Note: I am aware that fgetc(input) isn't the fastest way of doing things, but it is quite compact and the code only runs once when the filter is initialized.*/
@@ -599,7 +599,7 @@
 static pgm_structure * generate_half_size_image(vf_instance_t * vf, pgm_structure * input_image)
 {
   int x, y;
-  pgm_structure * new_pgm = (pgm_structure *) safe_malloc (sizeof(pgm_structure));
+  pgm_structure * new_pgm = safe_malloc (sizeof(pgm_structure));
   int has_anything_changed = 1;
   int current_pass;
   int max_mask_size;
@@ -607,7 +607,7 @@
 
   new_pgm->width = input_image->width / 2;
   new_pgm->height = input_image->height / 2;
-  new_pgm->pixel = (unsigned char *) safe_malloc (sizeof(unsigned char) * new_pgm->width * new_pgm->height);
+  new_pgm->pixel = safe_malloc (sizeof(unsigned char) * new_pgm->width * new_pgm->height);
 
   /* Copy over the image data, using the average of 4 pixels for to calculate each downsampled pixel. */
   for (y = 0; y < new_pgm->height; y++)