• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category Codecs
  • Assigned To No-one
  • Operating System Another
  • Severity Low
  • Priority Very Low
  • Reported Version Version 3.2
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by MohamedTarek - 2009-05-02
Last edited by MichaelGiacomelli - 2009-09-13

FS#10182 - Addition of librm to svn

Addition of rm files to rockbox. It only adds the target files to rb’s directory not to the actual build.
librm includes a makefile and a main.c for producing a test program that would convert an input rm file with cook codec to a wav file.
The code still needs a lot of cleaning.

   librm.patch (514.4 KiB)
The task blocks this from closing
ID Project Summary Priority Severity Assigned To Progress
6852 Rockbox  FS#6852 - Ability to play real player files  Very Low Low
Closed by  MichaelGiacomelli
2009-09-13 23:52
Reason for closing:  Accepted
Additional comments about closing:  

Accepted in r21695.

MohamedTarek commented on 2009-05-02 09:20

Sorry, forgot to remove the libavutil/trash directory before making the previous patch

MichaelGiacomelli commented on 2009-05-04 14:46

Good work! Next step is to clean up all the dead code in there.

I only skimmed quickly, but some impressions:

cook_float should probably be removed since we’re not going to try and keep fp support.
The libavutil and ffmpeg_config.h defines you’re actually using can probably be combined into a cook.h file or similar.
dsputill.h can probably be combined too.
dsputil.c probably doesn’t have much in it beyond the windowing functions (ff_vector_fmul_add_add_c, etc), and these can be put into cook.c

MohamedTarek commented on 2009-05-06 15:25

Modified patch : Major code clean-up. I think it’s almost ready to be ported.

   librm.patch (233.2 KiB)
MohamedTarek commented on 2009-05-07 17:39

patch1 :
rm-wav converter using floating point cook decoder.

patch2 :
rm-wav converter using fixed point cook decoder.

patch3 :
clean code. (no ffmpeg-specific code)

MohamedTarek commented on 2009-05-09 21:37

-Removed main() from cook.c to a separate main.c.
-Created cook.h which defines COOKContext and the decoder’s functions protoypes.

Dave Chapman commented on 2009-05-09 23:25

I’ve committed the last libcook.patch2 as r20897 and r20898 - thanks.

MohamedTarek commented on 2009-05-10 21:27

Convert cook.c to use fixed-point arithmetic. Still didn’t drop almost any floating point code, although some functions maybe (#if 0)’ed for cook.c to compile.
@Dave : Thanks for the commit.

Dave Chapman commented on 2009-05-10 22:28

libcook.fixp_convert committed as r20901

MohamedTarek commented on 2009-05-10 22:47

Drop floating point code from cook.c/h.
Remove fft.c, mdct.c and dsputil.h.

MohamedTarek commented on 2009-05-10 22:59

Remove avcodec.h

MichaelGiacomelli commented on 2009-05-10 23:29
Drop floating point code from cook.c/h.
>Remove fft.c, mdct.c and dsputil.h.

Committed in r20902.

Dave Chapman commented on 2009-05-11 09:02

libcook.del_avcodec committed as r20909

MohamedTarek commented on 2009-05-15 21:46

“Preliminary” patch for get_rm_metadata().
This patch enables Rockbox to recognize a rm/ra file and parse it to get the metadata for the WPS.
The only codec supported now is cook. However, cook codec in this patch is just a fake a codec (actually it’s just the one I wrote
for my qualification task ) The purpose of the codec is just to make the file run for its length just to be able to check if the parsing
was done correctly.

For read_uint32be to work properly (to eliminate warnings during compiling ) I had to #undef uint32_t, and then redefine it to unsigned
int, as it seems it was defined for “long unsigned int”. Not an elegant solution, but it’s not my focus currently either.

Also I had to define read_uint8() [just reads a byte] and read_uint16be() as I couldn’t find it in metadata_common.h. Should I add
a read_byte() and a read_uint16be() to metadata_common.h, or just define them whenever I need them ?

MohamedTarek commented on 2009-06-23 13:17

This is a quick-and-dirty patch for getting rm playback to work in the sim.
The patch isn’t intended for committing, it’s mainly for debugging purposes.

MohamedTarek commented on 2009-06-23 14:25

Sorry the patch is no good. I’m working on another one.

MohamedTarek commented on 2009-06-23 14:47

This one should work. I tried it on a clean source copy.

MohamedTarek commented on 2009-07-04 09:44

This patch is to add support for rm playback in rockbox. Still no seeking.

MohamedTarek commented on 2009-07-05 13:19

Fixed some issues from the previous patch (Pointed out by Dave Chapman on IRC) which are:
-TABs were mistakenly used as indentation in some files.
-svn:executable property was added for some files. (I really don’t know how it was added !)
-Some local functions weren’t declared static.
-No handling for big endian targets.

Note : I don’t have a big endian target, so I’d appreciate it if someone who has one could test this patch on it.

MohamedTarek commented on 2009-07-05 17:33

Still fixing for playback on big endian targets.

MohamedTarek commented on 2009-07-05 22:21

Playback works on big endian targets. I have duplicated wma’s bswap.h since it already optimized for rockbox.

MohamedTarek commented on 2009-07-05 23:18

Some simple modifications on rm metadata parser.

Maurus Cuelenaere commented on 2009-07-06 08:57

I’m wondering why your read_uint*() implementations require pointers instead of just returning the data?

For example real_read_audio_stream_info() & rm_parse_header() could benefit of this, because the numerous variables could then be registers/on stack instead of memory variables (or am I wrong here and are these already on stack?)

MohamedTarek commented on 2009-07-08 13:55

The above patch was committed as r21695 after some modifications for reducing bin size.


Available keyboard shortcuts


Task Details

Task Editing