diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2010-06-03 01:38:50 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2010-06-03 01:38:50 +0000 |
commit | e208b7491531588a11ec2e5034d6cc2d5570e9a7 (patch) | |
tree | 189796dbe66879368cf2333fee79ce71423921c0 /apps | |
parent | cc38700b7a8541a6a9285e1fae473863993d3227 (diff) | |
download | rockbox-e208b7491531588a11ec2e5034d6cc2d5570e9a7.tar.gz rockbox-e208b7491531588a11ec2e5034d6cc2d5570e9a7.zip |
FFT plugin: give everything in the main file a nice 'static'-ing. Saves approx. 1-3K size depending upon the target and so should speed it up a bit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26499 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/fft/fft.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/apps/plugins/fft/fft.c b/apps/plugins/fft/fft.c index 3884f2c413..23c37fb72c 100644 --- a/apps/plugins/fft/fft.c +++ b/apps/plugins/fft/fft.c | |||
@@ -405,7 +405,7 @@ static struct { | |||
405 | #define QLIN_MAX (0x00001157 >> 1) | 405 | #define QLIN_MAX (0x00001157 >> 1) |
406 | 406 | ||
407 | /* Apply window function to input */ | 407 | /* Apply window function to input */ |
408 | void apply_window_func(enum fft_window_func mode) | 408 | static void apply_window_func(enum fft_window_func mode) |
409 | { | 409 | { |
410 | int i; | 410 | int i; |
411 | 411 | ||
@@ -428,7 +428,7 @@ void apply_window_func(enum fft_window_func mode) | |||
428 | } | 428 | } |
429 | 429 | ||
430 | /* Calculates the magnitudes from complex numbers and returns the maximum */ | 430 | /* Calculates the magnitudes from complex numbers and returns the maximum */ |
431 | int32_t calc_magnitudes(bool logarithmic_amp) | 431 | static int32_t calc_magnitudes(bool logarithmic_amp) |
432 | { | 432 | { |
433 | /* A major assumption made when calculating the Q*MAX constants | 433 | /* A major assumption made when calculating the Q*MAX constants |
434 | * is that the maximum magnitude is 29 bits long. */ | 434 | * is that the maximum magnitude is 29 bits long. */ |
@@ -489,7 +489,7 @@ int32_t calc_magnitudes(bool logarithmic_amp) | |||
489 | 489 | ||
490 | /* Move plot bins into a logarithmic scale by sliding them towards the | 490 | /* Move plot bins into a logarithmic scale by sliding them towards the |
491 | * Nyquist bin according to the translation in the binlog array. */ | 491 | * Nyquist bin according to the translation in the binlog array. */ |
492 | void logarithmic_plot_translate(void) | 492 | static void logarithmic_plot_translate(void) |
493 | { | 493 | { |
494 | int i; | 494 | int i; |
495 | 495 | ||
@@ -531,7 +531,7 @@ void logarithmic_plot_translate(void) | |||
531 | } | 531 | } |
532 | 532 | ||
533 | /* Calculates the translation for logarithmic plot bins */ | 533 | /* Calculates the translation for logarithmic plot bins */ |
534 | void logarithmic_plot_init(void) | 534 | static void logarithmic_plot_init(void) |
535 | { | 535 | { |
536 | int i, j; | 536 | int i, j; |
537 | /* | 537 | /* |
@@ -570,12 +570,12 @@ void logarithmic_plot_init(void) | |||
570 | /************************ End of math functions ***********************/ | 570 | /************************ End of math functions ***********************/ |
571 | 571 | ||
572 | /********************* Plotting functions (modes) *********************/ | 572 | /********************* Plotting functions (modes) *********************/ |
573 | void draw_lines_vertical(void); | 573 | static void draw_lines_vertical(void); |
574 | void draw_lines_horizontal(void); | 574 | static void draw_lines_horizontal(void); |
575 | void draw_bars_vertical(void); | 575 | static void draw_bars_vertical(void); |
576 | void draw_bars_horizontal(void); | 576 | static void draw_bars_horizontal(void); |
577 | void draw_spectrogram_vertical(void); | 577 | static void draw_spectrogram_vertical(void); |
578 | void draw_spectrogram_horizontal(void); | 578 | static void draw_spectrogram_horizontal(void); |
579 | 579 | ||
580 | #ifdef HAVE_LCD_COLOR | 580 | #ifdef HAVE_LCD_COLOR |
581 | #define COLOR_DEFAULT_FG LCD_DEFAULT_FG | 581 | #define COLOR_DEFAULT_FG LCD_DEFAULT_FG |
@@ -594,7 +594,7 @@ void draw_spectrogram_horizontal(void); | |||
594 | #define POPUP_HPADDING 3 /* 3 px of horizontal padding and */ | 594 | #define POPUP_HPADDING 3 /* 3 px of horizontal padding and */ |
595 | #define POPUP_VPADDING 2 /* 2 px of vertical padding */ | 595 | #define POPUP_VPADDING 2 /* 2 px of vertical padding */ |
596 | 596 | ||
597 | void draw_message_string(const unsigned char *message, bool active) | 597 | static void draw_message_string(const unsigned char *message, bool active) |
598 | { | 598 | { |
599 | int x, y; | 599 | int x, y; |
600 | lcd_(getstringsize)(message, &x, &y); | 600 | lcd_(getstringsize)(message, &x, &y); |
@@ -626,7 +626,7 @@ void draw_message_string(const unsigned char *message, bool active) | |||
626 | lcd_(set_background)(COLOR_DEFAULT_BG); | 626 | lcd_(set_background)(COLOR_DEFAULT_BG); |
627 | } | 627 | } |
628 | 628 | ||
629 | void draw(const unsigned char* message) | 629 | static void draw(const unsigned char* message) |
630 | { | 630 | { |
631 | static long show_message_tick = 0; | 631 | static long show_message_tick = 0; |
632 | static const unsigned char* last_message = 0; | 632 | static const unsigned char* last_message = 0; |
@@ -750,7 +750,7 @@ void draw(const unsigned char* message) | |||
750 | graph_settings.changed.clear_all = false; | 750 | graph_settings.changed.clear_all = false; |
751 | } | 751 | } |
752 | 752 | ||
753 | void draw_lines_vertical(void) | 753 | static void draw_lines_vertical(void) |
754 | { | 754 | { |
755 | static int max = 0; | 755 | static int max = 0; |
756 | 756 | ||
@@ -825,7 +825,7 @@ void draw_lines_vertical(void) | |||
825 | } | 825 | } |
826 | } | 826 | } |
827 | 827 | ||
828 | void draw_lines_horizontal(void) | 828 | static void draw_lines_horizontal(void) |
829 | { | 829 | { |
830 | static int max = 0; | 830 | static int max = 0; |
831 | 831 | ||
@@ -901,7 +901,7 @@ void draw_lines_horizontal(void) | |||
901 | } | 901 | } |
902 | } | 902 | } |
903 | 903 | ||
904 | void draw_bars_vertical(void) | 904 | static void draw_bars_vertical(void) |
905 | { | 905 | { |
906 | static int max = 0; | 906 | static int max = 0; |
907 | 907 | ||
@@ -961,7 +961,7 @@ void draw_bars_vertical(void) | |||
961 | } | 961 | } |
962 | } | 962 | } |
963 | 963 | ||
964 | void draw_bars_horizontal(void) | 964 | static void draw_bars_horizontal(void) |
965 | { | 965 | { |
966 | static int max = 0; | 966 | static int max = 0; |
967 | 967 | ||
@@ -1021,7 +1021,7 @@ void draw_bars_horizontal(void) | |||
1021 | } | 1021 | } |
1022 | } | 1022 | } |
1023 | 1023 | ||
1024 | void draw_spectrogram_vertical(void) | 1024 | static void draw_spectrogram_vertical(void) |
1025 | { | 1025 | { |
1026 | const int32_t scale_factor = MIN(LCD_HEIGHT, ARRAYLEN_PLOT); | 1026 | const int32_t scale_factor = MIN(LCD_HEIGHT, ARRAYLEN_PLOT); |
1027 | 1027 | ||
@@ -1075,7 +1075,7 @@ void draw_spectrogram_vertical(void) | |||
1075 | lcd_scroll_left(1); | 1075 | lcd_scroll_left(1); |
1076 | } | 1076 | } |
1077 | 1077 | ||
1078 | void draw_spectrogram_horizontal(void) | 1078 | static void draw_spectrogram_horizontal(void) |
1079 | { | 1079 | { |
1080 | const int32_t scale_factor = MIN(LCD_WIDTH, ARRAYLEN_PLOT); | 1080 | const int32_t scale_factor = MIN(LCD_WIDTH, ARRAYLEN_PLOT); |
1081 | 1081 | ||