#include "jpeg.h"
#include "image_png.h"
-cvar_t sv_writepicture_quality = {CF_SERVER | CF_ARCHIVE, "sv_writepicture_quality", "10", "WritePicture quality offset (higher means better quality, but slower)"};
+extern cvar_t sv_writepicture_quality;
cvar_t r_texture_jpeg_fastpicmip = {CF_CLIENT | CF_ARCHIVE, "r_texture_jpeg_fastpicmip", "1", "perform gl_picmip during decompression for JPEG files (faster)"};
// jboolean is unsigned char instead of int on Win32
/* The decompressor output side may not use these variables. */
int dc_tbl_no; /* DC entropy table selector (0..3) */
int ac_tbl_no; /* AC entropy table selector (0..3) */
-
+
/* Remaining fields should be treated as private by applications. */
-
+
/* These values are computed during compression or decompression startup: */
/* Component's size in DCT blocks.
* Any dummy blocks added to complete an MCU are not counted; therefore
cinfo->in_color_space = JCS_RGB;
cinfo->input_components = 3;
qjpeg_set_defaults (cinfo);
- qjpeg_set_quality (cinfo, quality, FALSE);
+ qjpeg_set_quality (cinfo, quality, false);
cinfo->comp_info[0].h_samp_factor = 2;
cinfo->comp_info[0].v_samp_factor = 2;
if(strlen(imagename) >= MAX_QPATH)
return; // can't add this
-
+
i = (CompressedImageCacheItem*) Z_Malloc(sizeof(CompressedImageCacheItem));
- strlcpy(i->imagename, imagename, sizeof(i->imagename));
+ dp_strlcpy(i->imagename, imagename, sizeof(i->imagename));
i->maxsize = maxsize;
i->compressed = compressed;
i->compressed_size = compressed_size;