mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-14 06:40:48 +00:00
(RJPEG) Add rjpeg_alloc
This commit is contained in:
parent
98a403defd
commit
d3df016005
@ -38,6 +38,7 @@ void *image_transfer_new(enum image_type_enum type)
|
|||||||
break;
|
break;
|
||||||
case IMAGE_TYPE_JPEG:
|
case IMAGE_TYPE_JPEG:
|
||||||
#ifdef HAVE_RJPEG
|
#ifdef HAVE_RJPEG
|
||||||
|
return rjpeg_alloc();
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include <retro_inline.h>
|
#include <retro_inline.h>
|
||||||
#include <boolean.h>
|
#include <boolean.h>
|
||||||
#include <formats/image.h>
|
#include <formats/image.h>
|
||||||
|
#include <formats/rjpeg.h>
|
||||||
#include <features/features_cpu.h>
|
#include <features/features_cpu.h>
|
||||||
|
|
||||||
enum
|
enum
|
||||||
@ -64,6 +65,11 @@ typedef struct
|
|||||||
int ypos; /* which pre-expansion row we're on */
|
int ypos; /* which pre-expansion row we're on */
|
||||||
} rjpeg__resample;
|
} rjpeg__resample;
|
||||||
|
|
||||||
|
struct rjpeg
|
||||||
|
{
|
||||||
|
void *empty;
|
||||||
|
};
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#define RJPEG_HAS_LROTL
|
#define RJPEG_HAS_LROTL
|
||||||
#endif
|
#endif
|
||||||
@ -2460,3 +2466,11 @@ bool rjpeg_image_load(uint8_t *_buf, void *data, size_t size,
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void *rjpeg_alloc(void)
|
||||||
|
{
|
||||||
|
rjpeg_t *rjpeg = (rjpeg_t*)calloc(1, sizeof(*rjpeg));
|
||||||
|
if (!rjpeg)
|
||||||
|
return NULL;
|
||||||
|
return rjpeg;
|
||||||
|
}
|
||||||
|
@ -32,9 +32,13 @@
|
|||||||
|
|
||||||
RETRO_BEGIN_DECLS
|
RETRO_BEGIN_DECLS
|
||||||
|
|
||||||
|
typedef struct rjpeg rjpeg_t;
|
||||||
|
|
||||||
bool rjpeg_image_load(uint8_t *buf, void *data, size_t size,
|
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 a_shift, unsigned r_shift, unsigned g_shift, unsigned b_shift);
|
||||||
|
|
||||||
|
void *rjpeg_alloc(void);
|
||||||
|
|
||||||
RETRO_END_DECLS
|
RETRO_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user