Skip to content

Commit

Permalink
Small changes to avoid warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
masc4ii committed Jul 19, 2017
1 parent cc1b486 commit 67ae12e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/debayer/debayer.c
Expand Up @@ -92,7 +92,7 @@ void debayerAmaze(uint16_t * debayerto, float * bayerdata, int width, int height

}

int rgb_pixels = pixelsize * 3;
//int rgb_pixels = pixelsize * 3;

/* Giv back as RGB, not separate channels */
for (int i = 0; i < pixelsize; i++)
Expand Down
4 changes: 2 additions & 2 deletions src/imageio/bitmap/bitmap.c
Expand Up @@ -276,7 +276,7 @@ imagestruct bmpread(char * imagename)
/* Memory to store image */
uint8_t * imagedata = (uint8_t *)malloc(imagesize * sizeof(uint8_t));
fseek(file, offset, SEEK_SET); /* Move to start of image */
int v;
uint32_t v;
for (v = 0; v < imageheight; v++)
{
fseek(file, ( offset + v * paddedwidth ), SEEK_SET); /* Move to current row */
Expand All @@ -286,4 +286,4 @@ imagestruct bmpread(char * imagename)
/* Create and return image structure */
imagestruct image = { imagewidth, imageheight, imagedata };
return image;
}
}
2 changes: 1 addition & 1 deletion src/mlv/frame_caching.c
Expand Up @@ -80,7 +80,7 @@ void cache_mlv_frames(mlvObject_t * video)
{
int width = getMlvWidth(video);
int height = getMlvHeight(video);
int threads = getMlvCpuCores(video) / 2 + 1;
//int threads = getMlvCpuCores(video) / 2 + 1;
int cache_frames = MIN((int)video->cache_limit_frames, (int)video->frames);
int frame_size_rgb = width * height * 3;

Expand Down
4 changes: 2 additions & 2 deletions src/mlv/video_mlv.c
Expand Up @@ -114,8 +114,8 @@ void getMlvRawFrameFloat(mlvObject_t * video, int frameIndex, float * outputFram

void setMlvProcessing(mlvObject_t * video, processingObject_t * processing)
{
double camera_matrix[9];
double xyz_to_rgb_matrix[9];
//double camera_matrix[9];
//double xyz_to_rgb_matrix[9];

/* Easy bit */
video->processing = processing;
Expand Down
6 changes: 3 additions & 3 deletions src/processing/raw_processing.c
Expand Up @@ -99,7 +99,7 @@ void applyProcessingObject( processingObject_t * processing,

memcpy(outputImage, inputImage, img_s * sizeof(uint16_t));

uint16_t * test = malloc(sizeof(uint16_t) * 65536);

This comment has been minimized.

Copy link
@ilia3101

ilia3101 Jul 23, 2017

Owner

Fixed the big the memory leak 👍
Can't imagine what idiot put that there (me)

//uint16_t * test = malloc(sizeof(uint16_t) * 65536);

/* Apply some precalcuolated settings */
for (int i = 0; i < img_s; ++i)
Expand Down Expand Up @@ -241,7 +241,7 @@ void processingSetExposureStops(processingObject_t * processing, double exposure
processing->exposure_stops = exposureStops;

/* Real value of exposure(not stops) */
double exposure_value = pow(2, exposureStops);
//double exposure_value = pow(2, exposureStops);

processing_update_matrices(processing);
}
Expand Down Expand Up @@ -390,4 +390,4 @@ void freeProcessingObject(processingObject_t * processing)
free(processing->pre_calc_sat);
for (int i = 0; i < 9; ++i) free(processing->pre_calc_matrix[i]);
free(processing);
}
}

1 comment on commit 67ae12e

@ilia3101
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are all unused variables? If so, thanks for sorting them out 👍

Please sign in to comment.