View | Details | Raw Unified | Return to bug 148455
Collapse All | Expand All

(-)renderer/rf_image.c (-17 / +2 lines)
Lines 44-50 Link Here
44
image_t			*r_lmTextures[R_MAX_LIGHTMAPS];
44
image_t			*r_lmTextures[R_MAX_LIGHTMAPS];
45
static image_t	r_imageList[MAX_IMAGES];
45
static image_t	r_imageList[MAX_IMAGES];
46
static image_t	*r_imageHashTree[MAX_IMAGE_HASH];
46
static image_t	*r_imageHashTree[MAX_IMAGE_HASH];
47
static uint32	r_numImages;
47
uint32	r_numImages;
48
48
49
static byte		r_intensityTable[256];
49
static byte		r_intensityTable[256];
50
static byte		r_gammaTable[256];
50
static byte		r_gammaTable[256];
Lines 261-281 Link Here
261
    cinfo->src->bytes_in_buffer -= (size_t) num_bytes;
261
    cinfo->src->bytes_in_buffer -= (size_t) num_bytes;
262
}
262
}
263
263
264
static void jpeg_mem_src (j_decompress_ptr cinfo, byte *mem, int len)
265
{
266
    cinfo->src = (struct jpeg_source_mgr *)
267
	(*cinfo->mem->alloc_small)((j_common_ptr) cinfo,
268
				   JPOOL_PERMANENT,
269
				   sizeof(struct jpeg_source_mgr));
270
    cinfo->src->init_source = jpg_noop;
271
    cinfo->src->fill_input_buffer = jpg_fill_input_buffer;
272
    cinfo->src->skip_input_data = jpg_skip_input_data;
273
    cinfo->src->resync_to_restart = jpeg_resync_to_restart;
274
    cinfo->src->term_source = jpg_noop;
275
    cinfo->src->bytes_in_buffer = len;
276
    cinfo->src->next_input_byte = mem;
277
}
278
279
/*
264
/*
280
=============
265
=============
281
R_LoadJPG
266
R_LoadJPG
Lines 610-616 Link Here
610
		png_set_filler (png_ptr, 0xFF, PNG_FILLER_AFTER);
595
		png_set_filler (png_ptr, 0xFF, PNG_FILLER_AFTER);
611
596
612
	if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY && info_ptr->bit_depth < 8)
597
	if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY && info_ptr->bit_depth < 8)
613
		png_set_gray_1_2_4_to_8 (png_ptr);
598
		png_set_expand_gray_1_2_4_to_8 (png_ptr);
614
599
615
	if (png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS))
600
	if (png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS))
616
		png_set_tRNS_to_alpha (png_ptr);
601
		png_set_tRNS_to_alpha (png_ptr);

Return to bug 148455