- Status Closed
- Percent Complete
- Task Type Patches
- Category
- Assigned To No-one
- Operating System
- Severity Low
- Priority Very Low
- Reported Version
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#2127 - Faster & smaller recording routines
This patch contains 2 changes to the recording routines:
(1) There are recorder models with different
active/inactive levels of the PR pin to request data
from the MAS. The original routines use 2 different
loops to account for that (in drain_dma_buffer() and
rec_tick()).
This patch unifies these 2 different loops by using xor
to toggle the PR pin within the loops and setting the
correct initial "inactive" value in mpeg_init(). This
delivers
- no speed gain or loss
- 178 bytes less code in total
- 102 bytes less code in IRAM
These modified C routines are used if you uncomment the
#define PREFER_C_RECORDING at the top.
(2) Optimized transfer loops in assembler. These do not
"wait at least 5 cycles before the data is read" but
always wait for the PRTW level change. That delivers:
- approx. 50% speedup (sorry I cannot measure this)
- another 32 bytes less code in total
- another 4 bytes less code in IRAM
I did a test recording of > 2 hrs at 44.1 kHz, stereo,
Q=7 and did not get any incomplete frames and no
audible glitches.
The xor toggling of PR is not protected from accidental
changes by other parts of Rockbox since both Linus and
I agree that this would be too defensive coding style.
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
Ptach updated to adapt to the latest changes in mpeg.c