Commit graph

366 commits

Author SHA1 Message Date
Solomon Peachy
49a2953ade surround: Fix two issues with the haas surround code.
1) Handle ID 0 is legal
 2) Make sure handle is initialized before trying to memset its buffer

Change-Id: I91db157863800c01dd9b92bc05a1df5c4fe0e95b
2020-09-08 13:38:26 +00:00
Dominik Riebeling
5f5e44f593 skin_parser: Modernize Makefile.
- Avoid use of uname, instead ask the compiler about the binaries it
  creates.
- Move platform specific commands used into functions.
- Replace use of echo with make functions.

Change-Id: I365f656e02ddb90ee91ae60fec1230b4aaaf224f
2020-09-04 19:13:54 +02:00
Solomon Peachy
8c7780bafc flac: fix warning introduced in 5758a05
Change-Id: I649f7c356b8b790d6dfbd071a8e391a84d0cdcca
2020-08-10 14:32:40 -04:00
Yuxuan Shui
5758a055fb Handle EOF properly in get_flac_metadata
Change-Id: I5e581990046a9f4a0859787aff2fd6fc06fbf7f5
2020-08-10 14:14:58 -04:00
Solomon Peachy
658026e626 [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.
Note:  I left behind lcd_bitmap in features.txt, because removing it
would require considerable work in the manual and the translations.

Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
2020-07-24 21:20:13 +00:00
Solomon Peachy
8cb555460f [3/4] Completely remove HWCODEC support
'swcodec' is now always set (and recording_swcodec for recording-capable
units) in feature.txt so the manual and language strings don't need to
all be fixed up.

Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
2020-07-24 21:20:13 +00:00
Solomon Peachy
092c340a20 [1/4] Remove SH support and all archos targets
This removes all code specific to SH targets

Change-Id: I7980523785d2596e65c06430f4638eec74a06061
2020-07-24 21:20:13 +00:00
Moshe Piekarski
e884140eae Add support for ID3 tags embedded in AIFF files
Change-Id: I15eb50b6ba1c26052f08e01861f47faede3b9b3b
2020-07-15 18:30:07 +00:00
Solomon Peachy
82943ea1c7 opus: shrink stack usage by nearly 700 bytes
By moving three structures to the heap.  None are in the hot decode
  loop, instead having to do with file sync / header state.

  Has neglible impact on performance (within measurement noise) on Clip+,
  Rocker, and Xduoo X3.

  On PP5022 (ipodmini2g) performance drops from 138.66% to 138.22% realtime.
  (0.3%)

  Unknown effect on Coldfire which lacks D$.

  Stack savings are pretty significant especially on lowmem devices.

Change-Id: Ic8a1e93062ff5a46230e824134032053c4e1986d
2020-07-15 15:09:08 +00:00
Solomon Peachy
17a367e0c4 FS#12966: display '+' for positive replaygain values
Change-Id: I976d5511096c2d4d19eb14fa1c6adf8dd3cd9006
2020-07-09 22:18:25 +00:00
Moshe Piekarski
9cf2492407 Fix logf warnings in more codecs
Change-Id: I7e83a9979aedadf3b7c2b162a8202efdc6227e88
2020-07-03 03:43:47 +00:00
Moshe Piekarski
3e7ab2a284 Fix logf build warnings in speex codec
Change-Id: I8ce9473c98f863cc53273c16b2e55321d7b0795a
2020-06-28 03:24:20 +00:00
Moshe Piekarski
59454f93b3 Add support for some native AIFF metadata fields
Change-Id: I710480a119e0a9b930a13184ed6571fd2dc1bd01
2020-06-22 18:04:40 +00:00
Solomon Peachy
b450707955 skins: Fix buffer overflow in skin_error_format_message()
Change-Id: I54849866c163f2ec7ab9c9f76cfe1b267a4bee56
2020-05-04 20:41:12 +02:00
James D. Smith
3cc3e600fe Get APEv2 tag album art format from magic number. Also support bmp artwork.
Change-Id: I81d8f79f47f09528e2f7fa462e579350451c81f1
2020-04-26 13:05:39 -06:00
Solomon Peachy
2deb7d7a8e libedemac: ARMv7 asm code is for NEON-equipped processors only
Change-Id: Ief36c70b47ec25932651a146051a29224bdd2a0b
2020-04-15 00:35:35 +02:00
Solomon Peachy
022dfe7ab3 sid: Fix an out-of-bounds read in the channel mixing code
Change-Id: Ie25b8ab90193e6bb580cd7c04f8c0ce281f7a301
2020-03-28 11:43:23 +01:00
William Wilgus
0ff6a31d7d opus reset decoder on seek completion to prevent stack overflow
apparently we should be doing this anyway

mark4o> The packets overlap and may reuse state set by other recent packets,
        so if you seek to a different position,
        resetting the state helps to ensure that the subsequent
        packets won't use the state set by the unrelated packets
        that were processed before the seek.

remove stack bump WORKAROUND_FS13060

Change-Id: I1c14e23b1721a360b91e3e55202c1557aef0fcc6
2019-08-14 17:54:35 +02:00
Solomon Peachy
22c6326974 Improvements for vbrfix plugin:
* Properly account for ID3v1 tags
 * Play time computation fixes
 * Add speech feedback

Patch by Igor Poretsky

Change-Id: Ia6df8fb171882a88527cfa9d3b76b705f09becdd
2019-08-13 17:07:07 +02:00
Solomon Peachy
f2fd8fe79b FS#11052 -- SID Playback in Stereo
Original patch by Stefan Waigand
Updated by Igor Poretsky

Change-Id: Icaf7beb8349ab90e21b94baee627c9412cb2b55d
2019-07-31 17:00:40 +02:00
William Wilgus
e1475a38ef Fix non aligned crashes with tlsf
When the starting address of the plugin buffer
 is not aligned to 8 bytes crashes occur in tlsf
(on ARM atleast)

Change-Id: I655500c25e1c8f84b4a2418e9ec5c5948e4bea82
2019-07-27 14:30:45 +02:00
aozima
975e309264 fixed alac_set_info() issues. 2019-07-25 18:16:48 -04:00
William Wilgus
8cadef4cbb opus fix playback opustag skipping
Change-Id: I9ec35e276e24ec7b5a2e1199d6264d9f2d5d9fc2
2019-01-25 17:50:39 +01:00
William Wilgus
9605237349 opus fix comment skipping code
opus requires the comment header to be a valid file our codec attemps to skip the comment data
in order to reduce the ram allocated originally it caused files with large album art to skip
the beginning of tracks my first attempt at fixing this then caused files with low bitrates
to do the same while fixing files with large album art

This patch should fix both although the initial start might be a bit slower but
this shouldn't cause too much of an issue

Change-Id: Ia1c3561347894cc45f24bb2659436914f8f03b43
2019-01-25 04:18:51 +01:00
William Wilgus
00943537e6 opus optimize playback function
knocks off about .5 second from decode time not a big change but might help a bit on
devices that barely achieve realtime

Change-Id: If6e822b7273613c9449c102ce7dd3543bf975d37
2019-01-23 23:37:46 +01:00
William Wilgus
100f4338de Fix Opus FS#13133 - Files with embedded artwork 45.8KiB+ skip near beginning
ogg_sync_reset() causes issues on the partial page boundary
due to the next page (already in buffer) being discarded

instead seek next page boundary past complete page

Change-Id: Ic05f188f489b015693d663f131e09cd92ad37ff7
2019-01-04 06:56:52 +01:00
Solomon Peachy
2c6094843c Third attempt to shut up the warble build printf() warning.
(resorting to an explicit cast this time)

Change-Id: Ib5fc7bcd9e573cd32fc4372003c6c5429e339652
2018-12-28 07:57:23 -05:00
Solomon Peachy
c77348f780 Another attempt to silence the warble build warning on 32-bit hosts
Change-Id: Ib83ce41582b18641badb389c3871e501c8be697f
2018-12-28 07:16:03 -05:00
Solomon Peachy
6c2a7ddc74 build: Put all codec optiomization definitions in one place
It was already mostly there.

Change-Id: I24ff278d9bf18a54be4b67c3075d5ebbe7947f65
2018-12-25 14:17:29 -05:00
Solomon Peachy
df1d386019 Hopefully silence the warning in the warble codec build.
Change-Id: I63eef2c33bf3ea31a135cd6336882b600723f946
2018-12-24 22:18:23 +01:00
Solomon Peachy
928557bb17 AAC bitstream format files support
Files with extension "aac" in ADTS or ADIF format are now playable.

Full credit goes to Igor Poretsky.

Change-Id: I413b34e15e5242fea60d3461966ae0984080f530
2018-12-22 20:12:10 -05:00
Solomon Peachy
9b9b30bd54 Realmedia related codecs fixes and enhancements
* More tolerance to the file format variations.
 * AC3 coded files in realaudio format are now playable

Full credit to Igor Poretsky

Change-Id: Id24e94bc00623e89fb8c80403efa92f69ab1e5d7
2018-12-22 20:12:10 -05:00
Solomon Peachy
b51995942e Improved seeking in a52 codec
(Patch by Igor Poretsky)

Change-Id: I0cdc2021b44f6cd6e76def190d9f04733b922454
2018-12-22 19:54:40 -05:00
William Wilgus
ed63ef077a Fix overlapping string region ape.c->read_ape_tags
Switch to strrchr to find the extension

Change-Id: Id7ea01ecc2e0553f560308f8b0fc53bd33b023e5
2018-12-08 20:30:12 +01:00
William Wilgus
69c6c77680 Fix speex warning lsp.c->lsp_to_lpc
I'm pretty sure this was a false positive

Change-Id: I0ab375d1d844b3d468c24888c371f588052e1ce9
2018-12-08 02:25:17 -06:00
Solomon Peachy
20b91a83d3 codecs: Fix elapsed time calculation for large files
In particular, this solves seeking glitches seen in ~6 hr mp3 files.

(Patch taken from Igor Poretsky's tree)

Change-Id: Id65b6726146b6d2d1a223e90b88e401d1b2d597a
2018-10-29 19:50:34 +01:00
Solomon Peachy
b1ee789f97 libmad: Back out a change that disabled optimization for libmad.
(Caused non-realtime playback on mips..)

Change-Id: I878229e16e31d49156f1ae71ab9c7bb627e4c17b
2018-09-02 11:55:39 -04:00
Cástor Muñoz
7442742208 iPod Classic: disable IRAM1
On Classic, IRAM1 (second 128Kb of a total of 256KB available IRAM) is
slower than DRAM. Codecs that actually are using regions of IRAM1 runs
faster when DRAM is used, so IRAM1 is disabled and only IRAM0 remains
enabled: 48KB for core and 80KB for codecs/plugins.

The next test_codec results shows how decode time is decreased:

file           boosted     unboosted
*.ra           ~1.5%       ~0.5%
*.mpc          ~21%        ~4.5%
*.ogg          ~0.5%       ~0%
nero_he*.m4a   ~8%         ~1%
nero*.m4a      ~25%        ~7%
wmapro*.wma    ~4.5%       ~0%
wma*.wma       ~25%        ~7%

In addition there is a small power save when IRAM1 HW is disabled.

Change-Id: I102adee11458e82037f23076d5d5956e23235de8
2018-07-30 18:50:27 -04:00
Marcin Bukat
d55680993d Agptek Rocker: Initial commit
Change-Id: I26b51106c7b1c36a603fba6d521e917d79b5a95b
2018-06-12 10:31:14 +02:00
Michael Sevakis
6c868dd48f Remove explicit 'enum codec_command_action' in codec API
Just use long so the compiler potentially doesn't complain about
use of other values not in the enum. It's also the type used
around the system for event ids.

Increase min codec API version.

No functional changes.

Change-Id: If4419b42912f5e4ef673adcdeb69313e503f94cc
2017-12-07 14:41:59 -05:00
Michael Sevakis
aced667f48 Undo hacks to meant to get around string formatting limitations
The new vuprintf makes unnecessary workarounds due to formatting
limitations. I checked grep output for whatever appeared to fit
but it's possible I missed some instances because they weren't
so obvious.

Also, this means sound settings can dynamically work with any
number of decimals rather than the current assumption of one or
two. Add an ipow() function to help and take advantage of dynamic
field width and precision. Consolidate string formatting of sound
settings.

Change-Id: I46caf534859dfd1916cd440cd25e5206b192fcd8
2017-11-21 05:01:14 -05:00
Michael Sevakis
826f99e187 libpcm: Get unbranded structure tag out of my way.
No functional changes.

Change-Id: If372023cb605389a203a635b700eca20685ad49b
2017-11-06 20:06:08 -05:00
Franklin Wei
2423d3d4ae Revert "tlsf: pack info structs"
This reverts commit 8a6d7cefc9.

Packing the structs was mostly a precautionary measure, tlsf should
still work without it.
2017-10-29 16:51:33 -04:00
Franklin Wei
60e5cd7276 tlsf: remove memset() call in add_new_area()
This call was not needed in the first place, but was causing crashes in
sgt-puzzles. Removing it fixes the crashes.

Change-Id: I1149d5600e1c97e0e848fdd34bf65d54c930adab
2017-10-29 12:49:39 -04:00
Franklin Wei
8a6d7cefc9 tlsf: pack info structs
This should make it build cleanly under -Wcast-align, which should
hopefully avoid any alignment issues on ARM.

Change-Id: Ie147323d2d8cb980dcbb94710387b7ee80826c4d
2017-10-29 12:49:39 -04:00
Michael Sevakis
a8e4b3a190 PBE+Surround: Localize some variables and fixup some flush ops
Change-Id: I9fba5b8cbf69d261a7ca1c66e080c08d2fc6d9db
2017-10-12 05:59:18 -04:00
Michael Sevakis
5eee28e37d Nitpick configuration code in a few DSP filters to fix some bugs
Most importantly is surround shouldn't operate in mono mode. Have it
watch and (de)activate itself on relevant format changes as it should.

Other changes to better handle buffer allocation failure.

PBE was set internally at 100 by default; SBZ.

Change-Id: I328e0b674e56751a255eae817d7892d685796b06
2017-10-12 04:44:55 -04:00
Michael Sevakis
66b49dc0b2 Need limits.h for hosted builds
Change-Id: Iac1433957de80ad5db51396f74acf1f4f8d45bf3
2017-10-01 23:27:41 -04:00
Michael Sevakis
b2a373eb64 Replace fp_sqrt function with one that only uses shift, or and sub.
Simply extends the current isqrt() to be able to do fractional bits
and improves the initial estimate using clz(). iqrt() itself is
no more and is equivalent to fp_sqrt(x, 0). The original also had
a small bug where the guess comparision should have been >=, not >.

Uses no large integer math or division and is very accurate
(simply returns a truncated fraction).

Change-Id: I2ae26e6505df1770dc01e56220f7385369f90ae9
2017-10-01 20:29:38 -04:00
Amaury Pouly
3b7263be2d fix warning in vorbis
Change-Id: I01dd320ac7f4641caaef62363556ca7527dbee19
2017-09-17 15:09:39 +02:00