Build pictureflow using overlay on lowmem targets, support JPEG AA in PF on all targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20864 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
580b1a5c4b
commit
5621fd393a
7 changed files with 79 additions and 20 deletions
|
@ -55,10 +55,6 @@ text_editor.c
|
||||||
wavview.c
|
wavview.c
|
||||||
robotfindskitten.c
|
robotfindskitten.c
|
||||||
|
|
||||||
#if defined(HAVE_TAGCACHE)
|
|
||||||
pictureflow.c
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_LCD_COLOR
|
#ifdef HAVE_LCD_COLOR
|
||||||
ppmviewer.c
|
ppmviewer.c
|
||||||
#endif
|
#endif
|
||||||
|
@ -109,6 +105,7 @@ zxbox.c
|
||||||
/* overlay loader for Goban */
|
/* overlay loader for Goban */
|
||||||
#if (PLUGIN_BUFFER_SIZE < 0x10000) && !defined(SIMULATOR)
|
#if (PLUGIN_BUFFER_SIZE < 0x10000) && !defined(SIMULATOR)
|
||||||
goban.c
|
goban.c
|
||||||
|
pictureflow.c
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* not support recorder models for now */
|
/* not support recorder models for now */
|
||||||
|
|
|
@ -16,6 +16,9 @@ rockboy
|
||||||
|
|
||||||
/* For all targets with a bitmap display */
|
/* For all targets with a bitmap display */
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
#ifdef HAVE_TAGCACHE
|
||||||
|
pictureflow
|
||||||
|
#endif
|
||||||
chessbox
|
chessbox
|
||||||
jpeg
|
jpeg
|
||||||
sudoku
|
sudoku
|
||||||
|
|
1
apps/plugins/pictureflow/SOURCES
Normal file
1
apps/plugins/pictureflow/SOURCES
Normal file
|
@ -0,0 +1 @@
|
||||||
|
pictureflow.c
|
|
@ -957,13 +957,8 @@ bool create_albumart_cache(void)
|
||||||
input_bmp.data = buf;
|
input_bmp.data = buf;
|
||||||
input_bmp.width = DISPLAY_WIDTH;
|
input_bmp.width = DISPLAY_WIDTH;
|
||||||
input_bmp.height = DISPLAY_HEIGHT;
|
input_bmp.height = DISPLAY_HEIGHT;
|
||||||
#if PLUGIN_BUFFER_SIZE > 0x10000
|
|
||||||
ret = read_image_file(albumart_file, &input_bmp,
|
ret = read_image_file(albumart_file, &input_bmp,
|
||||||
buf_size, format, &format_transposed);
|
buf_size, format, &format_transposed);
|
||||||
#else
|
|
||||||
ret = scaled_read_bmp_file(albumart_file, &input_bmp,
|
|
||||||
buf_size, format, &format_transposed);
|
|
||||||
#endif
|
|
||||||
if (ret <= 0) {
|
if (ret <= 0) {
|
||||||
rb->splash(HZ, "Could not read bmp");
|
rb->splash(HZ, "Could not read bmp");
|
||||||
continue; /* skip missing/broken files */
|
continue; /* skip missing/broken files */
|
||||||
|
@ -2556,7 +2551,7 @@ enum plugin_status plugin_start(const void *parameter)
|
||||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||||
rb->cpu_boost(true);
|
rb->cpu_boost(true);
|
||||||
#endif
|
#endif
|
||||||
#if PLUGIN_BUFFER_SIZE > 0x10000
|
#if PLUGIN_BUFFER_SIZE > 0x10000 && 0
|
||||||
buf = rb->plugin_get_buffer(&buf_size);
|
buf = rb->plugin_get_buffer(&buf_size);
|
||||||
#else
|
#else
|
||||||
buf = rb->plugin_get_audio_buffer(&buf_size);
|
buf = rb->plugin_get_audio_buffer(&buf_size);
|
58
apps/plugins/pictureflow/pictureflow.make
Normal file
58
apps/plugins/pictureflow/pictureflow.make
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
# __________ __ ___.
|
||||||
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||||
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||||
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
|
# \/ \/ \/ \/ \/
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
|
||||||
|
PICTUREFLOW_SRCDIR = $(APPSDIR)/plugins/pictureflow
|
||||||
|
PICTUREFLOW_OBJDIR = $(BUILDDIR)/apps/plugins/pictureflow
|
||||||
|
|
||||||
|
PICTUREFLOW_SRC := $(call preprocess, $(PICTUREFLOW_SRCDIR)/SOURCES)
|
||||||
|
PICTUREFLOW_OBJ := $(call c2obj, $(PICTUREFLOW_SRC))
|
||||||
|
|
||||||
|
OTHER_SRC += $(PICTUREFLOW_SRC)
|
||||||
|
|
||||||
|
ifndef SIMVER
|
||||||
|
ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET)))))
|
||||||
|
### lowmem targets
|
||||||
|
ROCKS += $(PICTUREFLOW_OBJDIR)/pictureflow.ovl
|
||||||
|
PICTUREFLOW_OUTLDS = $(PICTUREFLOW_OBJDIR)/picutreflow.link
|
||||||
|
PICTUREFLOW_OVLFLAGS = -T$(PICTUREFLOW_OUTLDS) -Wl,--gc-sections -Wl,-Map,$(basename $@).map
|
||||||
|
else
|
||||||
|
### all other targets
|
||||||
|
ROCKS += $(PICTUREFLOW_OBJDIR)/pictureflow.rock
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
### simulator
|
||||||
|
ROCKS += $(PICTUREFLOW_OBJDIR)/pictureflow.rock
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CPU),sh)
|
||||||
|
# sh need to retain its' -Os
|
||||||
|
PICTUREFLOWFLAGS = $(PLUGINFLAGS)
|
||||||
|
else
|
||||||
|
PICTUREFLOWFLAGS = $(filter-out -O%,$(PLUGINFLAGS)) -O2
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(PICTUREFLOW_OBJDIR)/pictureflow.rock: $(PICTUREFLOW_OBJ)
|
||||||
|
|
||||||
|
$(PICTUREFLOW_OBJDIR)/pictureflow.refmap: $(PICTUREFLOW_OBJ)
|
||||||
|
|
||||||
|
$(PICTUREFLOW_OUTLDS): $(PLUGIN_LDS) $(PICTUREFLOW_OBJDIR)/pictureflow.refmap
|
||||||
|
$(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DOVERLAY_OFFSET=$(shell \
|
||||||
|
$(TOOLSDIR)/ovl_offset.pl $(PICTUREFLOW_OBJDIR)/pictureflow.refmap))
|
||||||
|
|
||||||
|
$(PICTUREFLOW_OBJDIR)/pictureflow.ovl: $(PICTUREFLOW_OBJ) $(PICTUREFLOW_OUTLDS)
|
||||||
|
$(SILENT)$(CC) $(PLUGINFLAGS) -o $(basename $@).elf \
|
||||||
|
$(filter %.o, $^) \
|
||||||
|
$(filter %.a, $+) \
|
||||||
|
-lgcc $(PICTUREFLOW_OVLFLAGS)
|
||||||
|
$(call PRINTS,LD $(@F))$(OC) -O binary $(basename $@).elf $@
|
||||||
|
|
||||||
|
# special pattern rule for compiling pictureflow with extra flags
|
||||||
|
$(PICTUREFLOW_OBJDIR)/%.o: $(PICTUREFLOW_SRCDIR)/%.c $(PLUGINBITMAPLIB) $(PICTUREFLOW_SRCDIR)/pictureflow.make
|
||||||
|
$(SILENT)mkdir -p $(dir $@)
|
||||||
|
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PICTUREFLOWFLAGS) -c $< -o $@
|
|
@ -91,7 +91,7 @@ static void fix_path_part(char* path, int offset, int count)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
|
#if defined(HAVE_JPEG) || defined(PLUGIN)
|
||||||
const char * extensions[] = { "jpeg", "jpg", "bmp" };
|
const char * extensions[] = { "jpeg", "jpg", "bmp" };
|
||||||
int extension_lens[] = { 4, 3, 3 };
|
int extension_lens[] = { 4, 3, 3 };
|
||||||
/* Try checking for several file extensions, return true if a file is found and
|
/* Try checking for several file extensions, return true if a file is found and
|
||||||
|
@ -134,7 +134,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
|
||||||
const char *artist;
|
const char *artist;
|
||||||
int dirlen;
|
int dirlen;
|
||||||
int albumlen;
|
int albumlen;
|
||||||
#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
|
#if defined(HAVE_JPEG) || defined(PLUGIN)
|
||||||
int pathlen;
|
int pathlen;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
|
||||||
/* the first file we look for is one specific to the track playing */
|
/* the first file we look for is one specific to the track playing */
|
||||||
strip_extension(path, sizeof(path) - strlen(size_string) - 4, trackname);
|
strip_extension(path, sizeof(path) - strlen(size_string) - 4, trackname);
|
||||||
strcat(path, size_string);
|
strcat(path, size_string);
|
||||||
#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
|
#if defined(HAVE_JPEG) || defined(PLUGIN)
|
||||||
strcat(path, ".");
|
strcat(path, ".");
|
||||||
pathlen = strlen(path);
|
pathlen = strlen(path);
|
||||||
found = try_exts(path, pathlen);
|
found = try_exts(path, pathlen);
|
||||||
|
@ -165,7 +165,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
|
||||||
{
|
{
|
||||||
/* if it doesn't exist,
|
/* if it doesn't exist,
|
||||||
* we look for a file specific to the track's album name */
|
* we look for a file specific to the track's album name */
|
||||||
#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
|
#if defined(HAVE_JPEG) || defined(PLUGIN)
|
||||||
pathlen = snprintf(path, sizeof(path),
|
pathlen = snprintf(path, sizeof(path),
|
||||||
"%s%s%s.", dir, id3->album, size_string);
|
"%s%s%s.", dir, id3->album, size_string);
|
||||||
fix_path_part(path, dirlen, albumlen);
|
fix_path_part(path, dirlen, albumlen);
|
||||||
|
@ -181,7 +181,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
|
||||||
if (!found)
|
if (!found)
|
||||||
{
|
{
|
||||||
/* if it still doesn't exist, we look for a generic file */
|
/* if it still doesn't exist, we look for a generic file */
|
||||||
#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
|
#if defined(HAVE_JPEG) || defined(PLUGIN)
|
||||||
pathlen = snprintf(path, sizeof(path),
|
pathlen = snprintf(path, sizeof(path),
|
||||||
"%scover%s.", dir, size_string);
|
"%scover%s.", dir, size_string);
|
||||||
found = try_exts(path, pathlen);
|
found = try_exts(path, pathlen);
|
||||||
|
@ -192,7 +192,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
|
#if defined(HAVE_JPEG) || defined(PLUGIN)
|
||||||
if (!found)
|
if (!found)
|
||||||
{
|
{
|
||||||
snprintf (path, sizeof(path), "%sfolder.jpg", dir);
|
snprintf (path, sizeof(path), "%sfolder.jpg", dir);
|
||||||
|
@ -205,7 +205,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
|
||||||
if (!found && artist && id3->album)
|
if (!found && artist && id3->album)
|
||||||
{
|
{
|
||||||
/* look in the albumart subdir of .rockbox */
|
/* look in the albumart subdir of .rockbox */
|
||||||
#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
|
#if defined(HAVE_JPEG) || defined(PLUGIN)
|
||||||
pathlen = snprintf(path, sizeof(path),
|
pathlen = snprintf(path, sizeof(path),
|
||||||
ROCKBOX_DIR "/albumart/%s-%s%s.",
|
ROCKBOX_DIR "/albumart/%s-%s%s.",
|
||||||
artist,
|
artist,
|
||||||
|
@ -241,7 +241,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
|
||||||
{
|
{
|
||||||
/* we look in the parent directory
|
/* we look in the parent directory
|
||||||
* for a file specific to the track's album name */
|
* for a file specific to the track's album name */
|
||||||
#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
|
#if defined(HAVE_JPEG) || defined(PLUGIN)
|
||||||
pathlen = snprintf(path, sizeof(path),
|
pathlen = snprintf(path, sizeof(path),
|
||||||
"%s%s%s.", dir, id3->album, size_string);
|
"%s%s%s.", dir, id3->album, size_string);
|
||||||
fix_path_part(path, dirlen, albumlen);
|
fix_path_part(path, dirlen, albumlen);
|
||||||
|
@ -258,7 +258,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
|
||||||
{
|
{
|
||||||
/* if it still doesn't exist, we look in the parent directory
|
/* if it still doesn't exist, we look in the parent directory
|
||||||
* for a generic file */
|
* for a generic file */
|
||||||
#if defined(HAVE_JPEG) || (defined(PLUGIN) && PLUGIN_BUFFER_SIZE > 0x10000)
|
#if defined(HAVE_JPEG) || defined(PLUGIN)
|
||||||
pathlen = snprintf(path, sizeof(path),
|
pathlen = snprintf(path, sizeof(path),
|
||||||
"%scover%s.", dir, size_string);
|
"%scover%s.", dir, size_string);
|
||||||
found = try_exts(path, pathlen);
|
found = try_exts(path, pathlen);
|
||||||
|
|
|
@ -326,6 +326,11 @@ STOP
|
||||||
if ($line =~ /([^,]*),(.*)/) {
|
if ($line =~ /([^,]*),(.*)/) {
|
||||||
my ($plugin, $dir)=($1, $2);
|
my ($plugin, $dir)=($1, $2);
|
||||||
move("$rbdir/rocks/${plugin}.rock", "$rbdir/rocks/$dir/${plugin}.rock");
|
move("$rbdir/rocks/${plugin}.rock", "$rbdir/rocks/$dir/${plugin}.rock");
|
||||||
|
if(-e "$rbdir/rocks/${plugin}.ovl") {
|
||||||
|
# if there's an "overlay" file for the .rock, move that as
|
||||||
|
# well
|
||||||
|
move("$rbdir/rocks/${plugin}.ovl", "$rbdir/rocks/$dir");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue