rosalina: screen_filter: save up around 10K using this simple trick
This commit is contained in:
parent
c7551a731c
commit
a67e8e60c6
@ -29,7 +29,7 @@ ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft
|
|||||||
DEFINES := -DARM11 -D_3DS
|
DEFINES := -DARM11 -D_3DS
|
||||||
|
|
||||||
CFLAGS := -g -std=gnu11 -Wall -Wextra -Werror -Wno-unused-value -O2 -mword-relocations \
|
CFLAGS := -g -std=gnu11 -Wall -Wextra -Werror -Wno-unused-value -O2 -mword-relocations \
|
||||||
-fomit-frame-pointer -ffunction-sections -fdata-sections \
|
-fomit-frame-pointer -ffunction-sections -fdata-sections -ffast-math \
|
||||||
$(ARCH) $(DEFINES)
|
$(ARCH) $(DEFINES)
|
||||||
|
|
||||||
CFLAGS += $(INCLUDE)
|
CFLAGS += $(INCLUDE)
|
||||||
@ -39,7 +39,7 @@ CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
|||||||
ASFLAGS := -g $(ARCH)
|
ASFLAGS := -g $(ARCH)
|
||||||
LDFLAGS = -specs=3dsx.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map),--section-start,.text=0x14000000
|
LDFLAGS = -specs=3dsx.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map),--section-start,.text=0x14000000
|
||||||
|
|
||||||
LIBS := -lctru -lm
|
LIBS := -lctru
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# list of directories containing libraries, this must be the top level containing
|
# list of directories containing libraries, this must be the top level containing
|
||||||
|
@ -144,10 +144,10 @@ void screenFiltersSetTemperature(int temperature)
|
|||||||
memset(&cs, 0, sizeof(cs));
|
memset(&cs, 0, sizeof(cs));
|
||||||
|
|
||||||
cs.temperature = temperature;
|
cs.temperature = temperature;
|
||||||
cs.gamma[0] = 1.0F;
|
/*cs.gamma[0] = 1.0F;
|
||||||
cs.gamma[1] = 1.0F;
|
cs.gamma[1] = 1.0F;
|
||||||
cs.gamma[2] = 1.0F;
|
cs.gamma[2] = 1.0F;
|
||||||
cs.brightness = 1.0F;
|
cs.brightness = 1.0F;*/
|
||||||
|
|
||||||
applyColorSettings(&cs);
|
applyColorSettings(&cs);
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <math.h>
|
//#include <math.h>
|
||||||
|
|
||||||
#include "redshift/redshift.h"
|
#include "redshift/redshift.h"
|
||||||
|
|
||||||
@ -282,8 +282,10 @@ interpolate_color(float a, const float *c1, const float *c2, float *c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Helper macro used in the fill functions */
|
/* Helper macro used in the fill functions */
|
||||||
#define F(Y, C) pow((Y) * setting->brightness * \
|
#define F(Y, C) ((Y) * white_point[C])
|
||||||
white_point[C], 1.0/setting->gamma[C])
|
|
||||||
|
/*#define F(Y, C) pow((Y) * setting->brightness * \
|
||||||
|
white_point[C], 1.0/setting->gamma[C])*/
|
||||||
|
|
||||||
void
|
void
|
||||||
colorramp_fill(uint16_t *gamma_r, uint16_t *gamma_g, uint16_t *gamma_b,
|
colorramp_fill(uint16_t *gamma_r, uint16_t *gamma_g, uint16_t *gamma_b,
|
||||||
|
Reference in New Issue
Block a user