Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide
translations



Rockbox mail archive

Subject: Re[4]: LOW_WATER and high bitrates

Re[4]: LOW_WATER and high bitrates

From: Uwe Freese <mail_at_uwe-freese.de>
Date: Thu, 1 Aug 2002 11:47:40 +0200

Hello Nielsen,

Nielsen Linus (ext) wrote on Thursday, August 1, 2002, 7:40:46 AM:

>> How can I find the beginning of an mp3-frame (and find the header)?

NLe> You will have to search the bitstream for a frame sync word. First
NLe> of all, it would take the CPU a lot of time to search that data and
NLe> find the frame sync words.

I don't know if it takes this long to search for the sync words. Maybe
I'll test it the next days.

NLe> Secondly, we don't have floating point support. This CPU has no
NLe> floating point unit. I don't think that is feasible.

I didn't know that. But I'm sure it's possible with ints, too.

>> The playing time should also be updated while playing the song.

NLe> What firmware are you using? We have been displaying play time for
NLe> ages.

Is the playing time written somewhere in the mp3 file or calculated by
filesize/bitrate? I thought it was calculated by filesize/bitrate and
should be updated after calculating the average bitrate as I described
while playing the VBR song. I'm talking of UPDATING the playing time. I
know that there's already a (non changing) playing time shown.

>> I'd prefer this instead of reading in the whole file before
>> playing it (it takes too long).

NLe> What makes you think we read the whole file before playing it?

Is my english so bad? ;) I know that we don't do this now.

To calculate an average bitrate (my whole mail was about that), we can

1. read sync words, bitrates in mp3frames and calculate an average so
   far while playing (in the code that copies data from hdd to ram)

2. read the whole file before playing as described in id3.c:

 * Calculates the length (in milliseconds) of an MP3 file. Currently this code
 * doesn't care about VBR (Variable BitRate) files since it would have to scan
 * through the entire file but this should become a config option in the
 * future.

And I find the first solution better.

>> And I think it'll give a really good average value very quickly.

NLe> No, that is taken care of dynamically by the decoder DSP,
NLe> regardless of our efforts.

The DSP plays the stream without us saying him the bitrate of the mp3
frames. Yes. That's not the point.
How could that help to get an average bitrate of the VBR file in the
rockbox program?

Bye, Uwe.
Received on 2002-08-01

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy