mirror of
https://github.com/libretro/RetroArch
synced 2025-01-27 21:35:25 +00:00
(RJPEG) Remove unused rjpeg_image_load
This commit is contained in:
parent
558dfd64f2
commit
8c640a28c6
@ -2580,36 +2580,6 @@ int rjpeg_process_image(rjpeg_t *rjpeg, void **buf_data,
|
||||
return IMAGE_PROCESS_END;
|
||||
}
|
||||
|
||||
bool rjpeg_image_load(uint8_t *buf, void *data, size_t size,
|
||||
unsigned a_shift, unsigned r_shift,
|
||||
unsigned g_shift, unsigned b_shift)
|
||||
{
|
||||
unsigned width = 0;
|
||||
unsigned height = 0;
|
||||
struct texture_image *out_img = (struct texture_image*)data;
|
||||
rjpeg_t *rjpeg = rjpeg_alloc();
|
||||
|
||||
if (!rjpeg)
|
||||
goto error;
|
||||
|
||||
if (!rjpeg_set_buf_ptr(rjpeg, &buf))
|
||||
goto error;
|
||||
|
||||
if (rjpeg_process_image(rjpeg, (void**)&buf, size, &width, &height) != IMAGE_PROCESS_END)
|
||||
goto error;
|
||||
|
||||
out_img->pixels = (uint32_t*)rjpeg->output_image;
|
||||
out_img->width = width;
|
||||
out_img->height = height;
|
||||
|
||||
return true;
|
||||
|
||||
error:
|
||||
if (rjpeg)
|
||||
free(rjpeg);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool rjpeg_set_buf_ptr(rjpeg_t *rjpeg, void *data)
|
||||
{
|
||||
if (!rjpeg)
|
||||
|
@ -37,9 +37,6 @@ typedef struct rjpeg rjpeg_t;
|
||||
int rjpeg_process_image(rjpeg_t *rjpeg, void **buf,
|
||||
size_t size, unsigned *width, unsigned *height);
|
||||
|
||||
bool rjpeg_image_load(uint8_t *buf, void *data, size_t size,
|
||||
unsigned a_shift, unsigned r_shift, unsigned g_shift, unsigned b_shift);
|
||||
|
||||
bool rjpeg_set_buf_ptr(rjpeg_t *rjpeg, void *data);
|
||||
|
||||
void rjpeg_free(rjpeg_t *rjpeg);
|
||||
|
Loading…
x
Reference in New Issue
Block a user