initial (partial) commit
This commit is contained in:
commit
ec15d449e1
11 changed files with 2789 additions and 0 deletions
49
src/common/defines.h
Normal file
49
src/common/defines.h
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
#ifndef __DEFS_H__
|
||||
#define __DEFS_H__
|
||||
|
||||
#define CODE_UP 0x5A
|
||||
#define CODE_DOWN 0x5B
|
||||
#define CODE_LEFT 0x5C
|
||||
#define CODE_RIGHT 0x5D
|
||||
#define CODE_A 0x5E
|
||||
#define CODE_B 0x5F
|
||||
#define CODE_X 0x60
|
||||
#define CODE_Y 0x61
|
||||
#define CODE_START 0x62
|
||||
#define CODE_SELECT 0x63
|
||||
#define CODE_L1 0x64
|
||||
#define CODE_R1 0x65
|
||||
#define CODE_L2 0x66
|
||||
#define CODE_R2 0x67
|
||||
#define CODE_MENU 0x68
|
||||
#define CODE_VOL_UP 0x6C
|
||||
#define CODE_VOL_DN 0x6D
|
||||
#define CODE_POWER 0x74
|
||||
|
||||
#define VOLUME_MIN 0
|
||||
#define VOLUME_MAX 20
|
||||
#define BRIGHTNESS_MIN 0
|
||||
#define BRIGHTNESS_MAX 10
|
||||
|
||||
#define SDCARD_PATH "/mnt/sdcard"
|
||||
#define SYSTEM_PATH SDCARD_PATH "/.system/" PLATFORM
|
||||
#define USERDATA_PATH SDCARD_PATH "/.userdata/" PLATFORM
|
||||
#define MAX_PATH 512
|
||||
|
||||
#define SCREEN_WIDTH 640
|
||||
#define SCREEN_HEIGHT 480
|
||||
#define SCREEN_DEPTH 16
|
||||
#define SCREEN_PITCH 1280
|
||||
#define SCREEN_BPP 2
|
||||
#define SCREEN_BUFFER_COUNT 3
|
||||
|
||||
|
||||
///////////////////////////////
|
||||
|
||||
#define STR_HELPER(x) #x
|
||||
#define STR(x) STR_HELPER(x)
|
||||
|
||||
#define MAX(a, b) (a) > (b) ? (a) : (b)
|
||||
#define MIN(a, b) (a) < (b) ? (a) : (b)
|
||||
|
||||
#endif // __DEFS_H__
|
||||
1041
src/common/scaler_neon.c
Executable file
1041
src/common/scaler_neon.c
Executable file
File diff suppressed because it is too large
Load diff
54
src/common/scaler_neon.h
Executable file
54
src/common/scaler_neon.h
Executable file
|
|
@ -0,0 +1,54 @@
|
|||
#ifndef __SCALER_NEON_H__
|
||||
#define __SCALER_NEON_H__
|
||||
#include <stdint.h>
|
||||
|
||||
//
|
||||
// arm NEON / C integer scalers for miyoomini
|
||||
// args/ src : src offset address of top left corner
|
||||
// dst : dst offset address of top left corner
|
||||
// sw : src width pixels
|
||||
// sh : src height pixels
|
||||
// sp : src pitch (stride) bytes if 0, (src width * [2|4]) is used
|
||||
// dp : dst pitch (stride) bytes if 0, (src width * [2|4] * multiplier) is used
|
||||
//
|
||||
// ** NOTE **
|
||||
// since 32bit aligned addresses need to be processed for NEON scalers,
|
||||
// x-offset and stride pixels must be even# in the case of 16bpp,
|
||||
// if odd#, then handled by the C scaler
|
||||
//
|
||||
|
||||
typedef void (*scale_neon_t)(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
|
||||
|
||||
// NEON scalers
|
||||
void scale1x_n16(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale1x_n32(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale2x_n16(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale2x_n32(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale3x_n16(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale3x_n32(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale4x_n16(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale4x_n32(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale5x_n16(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale5x_n32(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale6x_n16(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale6x_n32(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
|
||||
// C scalers
|
||||
void scale1x_c16(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale1x_c32(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale2x_c16(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale2x_c32(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale3x_c16(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale3x_c32(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale4x_c16(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale4x_c32(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
// c16b/c32b: faster when -Ofast/-O3 and aligned width, however dp must be 4xN
|
||||
void scale4x_c16b(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale4x_c32b(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale5x_c16(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale5x_c32(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale6x_c16(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
void scale6x_c32(void* __restrict src, void* __restrict dst, uint32_t sw, uint32_t sh, uint32_t sp, uint32_t dp);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue