RetroArch
Classes | Macros | Functions
rbmp.c File Reference
#include <stdio.h>
#include <stdint.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <retro_inline.h>
#include <formats/image.h>
#include <formats/rbmp.h>
Include dependency graph for rbmp.c:

Classes

struct  rbmp__context
 
struct  rbmp
 

Macros

#define RBMP__BYTECAST(x)   ((unsigned char) ((x) & 255))
 
#define RBMP_COMPUTE_Y(r, g, b)   ((unsigned char) ((((r) * 77) + ((g) * 150) + (29 * (b))) >> 8))
 

Functions

static INLINE unsigned char rbmp__get8 (rbmp__context *s)
 
static void rbmp__skip (rbmp__context *s, int n)
 
static int rbmp__get16le (rbmp__context *s)
 
static uint32_t rbmp__get32le (rbmp__context *s)
 
static unsigned char * rbmp__convert_format (unsigned char *data, int img_n, int req_comp, unsigned int x, unsigned int y)
 
static int rbmp__high_bit (unsigned int z)
 
static int rbmp__bitcount (unsigned int a)
 
static int rbmp__shiftsigned (int v, int shift, int bits)
 
static unsigned char * rbmp__bmp_load (rbmp__context *s, unsigned *x, unsigned *y, int *comp, int req_comp)
 
static unsigned char * rbmp_load_from_memory (unsigned char const *buffer, int len, unsigned *x, unsigned *y, int *comp, int req_comp)
 
static void rbmp_convert_frame (uint32_t *frame, unsigned width, unsigned height)
 
int rbmp_process_image (rbmp_t *rbmp, void **buf_data, size_t size, unsigned *width, unsigned *height)
 
bool rbmp_set_buf_ptr (rbmp_t *rbmp, void *data)
 
void rbmp_free (rbmp_t *rbmp)
 
rbmp_trbmp_alloc (void)
 

Macro Definition Documentation

◆ RBMP__BYTECAST

#define RBMP__BYTECAST (   x)    ((unsigned char) ((x) & 255))

◆ RBMP_COMPUTE_Y

#define RBMP_COMPUTE_Y (   r,
  g,
  b 
)    ((unsigned char) ((((r) * 77) + ((g) * 150) + (29 * (b))) >> 8))

Function Documentation

◆ rbmp__bitcount()

static int rbmp__bitcount ( unsigned int  a)
static
Here is the caller graph for this function:

◆ rbmp__bmp_load()

static unsigned char* rbmp__bmp_load ( rbmp__context s,
unsigned *  x,
unsigned *  y,
int *  comp,
int  req_comp 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rbmp__convert_format()

static unsigned char* rbmp__convert_format ( unsigned char *  data,
int  img_n,
int  req_comp,
unsigned int  x,
unsigned int  y 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rbmp__get16le()

static int rbmp__get16le ( rbmp__context s)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rbmp__get32le()

static uint32_t rbmp__get32le ( rbmp__context s)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rbmp__get8()

static INLINE unsigned char rbmp__get8 ( rbmp__context s)
static
Here is the caller graph for this function:

◆ rbmp__high_bit()

static int rbmp__high_bit ( unsigned int  z)
static
Here is the caller graph for this function:

◆ rbmp__shiftsigned()

static int rbmp__shiftsigned ( int  v,
int  shift,
int  bits 
)
static
Here is the caller graph for this function:

◆ rbmp__skip()

static void rbmp__skip ( rbmp__context s,
int  n 
)
static
Here is the caller graph for this function:

◆ rbmp_alloc()

rbmp_t* rbmp_alloc ( void  )
Here is the caller graph for this function:

◆ rbmp_convert_frame()

static void rbmp_convert_frame ( uint32_t frame,
unsigned  width,
unsigned  height 
)
static
Here is the caller graph for this function:

◆ rbmp_free()

void rbmp_free ( rbmp_t rbmp)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rbmp_load_from_memory()

static unsigned char* rbmp_load_from_memory ( unsigned char const buffer,
int  len,
unsigned *  x,
unsigned *  y,
int *  comp,
int  req_comp 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rbmp_process_image()

int rbmp_process_image ( rbmp_t rbmp,
void **  buf_data,
size_t  size,
unsigned *  width,
unsigned *  height 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rbmp_set_buf_ptr()

bool rbmp_set_buf_ptr ( rbmp_t rbmp,
void data 
)
Here is the caller graph for this function: