Rockbox

  • Status Closed
  • Percent Complete
    0%
  • 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
Attached to Project: Rockbox
Opened by lowlight - 2005-11-09
Last edited by amiconn - 2005-11-11

FS#2741 - Shorten codec

Shorten codec for iriver based on the shorten decoder
from the ffmpeg project (it uses some of the existing
libffmpegFLAC files…I’d suggest renaming that directory
to just libffmpeg).

My test files play at about 20% boost ratio, so some
optimization needs to be done (most comparisons show
shn decoding almost twice as fast as flac on x86).

There’s no metadata and no seeking at this time.
Playback didn’t sound gapless (probably my fault).

Unzip the shorten.zip in the rockbox-devel root and
apply the patch.

Closed by  amiconn
2005-11-11 19:50
Reason for closing:  Accepted

No performance update, but codec size is now 11.5 KB :)

Note to any devs…if get_ur_golomb_jpegls is put in iram and
not inlined then the codec size is about 7KB! Performance
(boost ratio) stays about the same. Don’t know if there’s any
adverse effect on flac.

Note to any devs…if get_ur_golomb_jpegls is put in iram and
not inlined then the codec size is about 7KB! Performance
(boost ratio) stays about the same. Don’t know if there’s any
adverse effect on flac.

Nice work on the patch.

I agree that libffmpegFLAC is now misnamed - but for the
sake of keeping CVS tidy, I think it’s best to just leave it
as it is for now.

There are a small number of problems and areas where it
could be improved if you are interested in doing more work
on it:

1) The LOGF macros require an rb structure to be defined
(see the other codecs). So the codec doesn’t build when
LOGF is enabled.

2) The codec doesn’t work in the simulator (I tested the X11
sim). My guess would be that this is an endian problem. I
had a quick look at fixing that, but couldn’t make it work.

3) We can live without proper seeking, but you should try
and deal with the special case of seeking to the beginning
of a file - so users can skip backwards in a playlist.

4) We need a simplified shorten parser to live in the
get_metadata() function (apps/metadata.c) capable of
extracting the basic information from the file - samplerate,
bit-depth, bitrate and total length. We also need to keep
track of the number of samples decoded in order to update
the elapsed time for display in the WPS.

Let me know if you plan to do any more work on this,
otherwise, I’ll try and fill in the gaps. I’ld like to get
this committed.

In response to linuxstb:

1) I put the rb structure back in.

2) I agree there may be endian issues because I found it odd
that it needed the bit swap in order to work on both the iriver
and the windows sim.

3) I think I got skiping to the start of tracks working. Seeking
will be difficult because seek tables are either appended to
the shn file or are in separate “skt” files.

4) Total & elapsed time now works. I’m not sure what to do
about the metadata outside of the codec because it is in the
wave header which is encoded, so get_metadata() would
have to link to the decoder.

I’m hear a “click” that I hear between tracks so something is
wrong with gapless playback.

You are welcome to work on this as I’m not a programmer
and don’t know how to do the optimizations.

THE PATCH IS NOW INCLUDED IN THE ZIP FILE.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing