mirror of
https://github.com/Motion-Project/motion.git
synced 2026-05-24 06:27:41 -04:00
Revise to use bools
This commit is contained in:
@@ -200,7 +200,7 @@ static boolean jpgutl_fill_input_buffer(j_decompress_ptr cinfo)
|
||||
{
|
||||
cinfo->src->next_input_byte = EOI_data;
|
||||
cinfo->src->bytes_in_buffer = 2;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -352,7 +352,7 @@ METHODDEF(boolean) empty_output_buffer(j_compress_ptr cinfo)
|
||||
dest->pub.next_output_byte = dest->buf;
|
||||
dest->pub.free_in_buffer = dest->bufsize;
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
ERREXIT(cinfo, JERR_BUFFER_SIZE);
|
||||
}
|
||||
|
||||
@@ -453,7 +453,7 @@ int jpgutl_decode_jpeg (unsigned char *jpeg_data_in, int jpeg_data_len,
|
||||
|
||||
jpgutl_buffer_src (&dinfo, jpeg_data_in, jpeg_data_len);
|
||||
|
||||
jpeg_read_header (&dinfo, TRUE);
|
||||
jpeg_read_header (&dinfo, true);
|
||||
|
||||
//420 sampling is the default for YCbCr so no need to override.
|
||||
dinfo.out_color_space = JCS_YCbCr;
|
||||
@@ -561,9 +561,9 @@ int jpgutl_put_yuv420p(unsigned char *dest_image, int image_size,
|
||||
|
||||
jpeg_set_colorspace(&cinfo, JCS_YCbCr);
|
||||
|
||||
cinfo.raw_data_in = TRUE; // Supply downsampled data
|
||||
cinfo.raw_data_in = true; // Supply downsampled data
|
||||
#if JPEG_LIB_VERSION >= 70
|
||||
cinfo.do_fancy_downsampling = FALSE; // Fix segfault with v7
|
||||
cinfo.do_fancy_downsampling = false; // Fix segfault with v7
|
||||
#endif
|
||||
cinfo.comp_info[0].h_samp_factor = 2;
|
||||
cinfo.comp_info[0].v_samp_factor = 2;
|
||||
@@ -572,13 +572,13 @@ int jpgutl_put_yuv420p(unsigned char *dest_image, int image_size,
|
||||
cinfo.comp_info[2].h_samp_factor = 1;
|
||||
cinfo.comp_info[2].v_samp_factor = 1;
|
||||
|
||||
jpeg_set_quality(&cinfo, quality, TRUE);
|
||||
jpeg_set_quality(&cinfo, quality, true);
|
||||
cinfo.dct_method = JDCT_FASTEST;
|
||||
|
||||
_jpeg_mem_dest(&cinfo, dest_image, image_size); // Data written to mem
|
||||
|
||||
|
||||
jpeg_start_compress(&cinfo, TRUE);
|
||||
jpeg_start_compress(&cinfo, true);
|
||||
|
||||
put_jpeg_exif(&cinfo, cam, ts1, box);
|
||||
|
||||
@@ -642,11 +642,11 @@ int jpgutl_put_grey(unsigned char *dest_image, int image_size,
|
||||
|
||||
jpeg_set_defaults(&cjpeg);
|
||||
|
||||
jpeg_set_quality(&cjpeg, quality, TRUE);
|
||||
jpeg_set_quality(&cjpeg, quality, true);
|
||||
cjpeg.dct_method = JDCT_FASTEST;
|
||||
_jpeg_mem_dest(&cjpeg, dest_image, image_size); // Data written to mem
|
||||
|
||||
jpeg_start_compress (&cjpeg, TRUE);
|
||||
jpeg_start_compress (&cjpeg, true);
|
||||
|
||||
put_jpeg_exif(&cjpeg, cam, ts1, box);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user