Musepack Forums

Musepack Forums (https://forum.musepack.net/index.php)
-   Development (https://forum.musepack.net/forumdisplay.php?f=11)
-   -   Musepack codec on Roku PhotoBridge (https://forum.musepack.net/showthread.php?t=186)

soiaf 12 May 2005 01:07 pm

Musepack codec on Roku PhotoBridge
 
Hi,

Thought some of you might be interested in knowing I've used libmpcdec-1.2 to produce a MPC codec for the Roku PhotoBridge.
The Roku PhotoBridge is an 'open platform' and a few weeks ago they (Roku) released a (currently very much beta) version of their firmware that supported a plugin codec model. So, their new version of music playing software is still pretty basic, but anyone who wants can download a version of the MPC codec (from my site) and enjoy their Musepack encoded music.

Heres a link to the forum post (that contains a link to the source code etc.)
http://www.rokulabs.com/forums/viewt...?p=14961#14961


Heres an link to the brochure page to the PhotoBridge (so you can see what one looks like!)
http://www.rokulabs.com/products/photobridge/index.php

I only had a make a few tiny changes to the libmpcdec-1.2 source code to make it compile/work.
It makes use of MPC_FIXED_POINT - with this not defined its (very rough figures) about 3x slower than real time, with MPC_FIXED_POINT defined it can decode (again rough figures) at around 6x realtime.

Peter

Seed 12 May 2005 01:42 pm

That's very nice. I'd like to see this hardware in action.

Lefungus 12 May 2005 05:07 pm

Re: Musepack codec on Roku PhotoBridge
 
Quote:

Originally Posted by soiaf
Hi,

I only had a make a few tiny changes to the libmpcdec-1.2 source code to make it compile/work.

Are you able to say those changes ?

Quote:

Originally Posted by soiaf
It makes use of MPC_FIXED_POINT - with this not defined its (very rough figures) about 3x slower than real time, with MPC_FIXED_POINT defined it can decode (again rough figures) at around 6x realtime.

The lib use floating-point mode by default as it's usually the fastest mode on desktop cpus. Maybe the roku photobridge cpu is using floating point mode emulation, that would explain its slowness compared to fixed-point :)

Thanks for your plugin !

soiaf 12 May 2005 05:43 pm

Re: Musepack codec on Roku PhotoBridge
 
Quote:

Originally Posted by Lefungus
Are you able to say those changes ?

(Edited this as I dug out the changes)
As I mentioned I had to declare MPC_FIXED_POINT in math.h but thats a normal change.

You're able to download all my source code from the link above, but the minor changes were in requant.c

Change 1
The PhotoBridge did not like the way ptr was declared in find_shift
All that was required was to declare ptr a few lines earlier

Modified code
Code:

#ifdef MPC_FIXED_POINT
static mpc_uint32_t find_shift(double fval)
{
        mpc_uint32_t ptr;
        mpc_int64_t val = (mpc_int64_t)fval;
        if (val<0) val = -val;
        ptr = 0;
        while(val) {val>>=1;ptr++;}

        return ptr > 31 ? 0 : 31 - ptr;
}
#endif

Change 2
The PhotoBridge seemed unhappy with the use/declaration of __Cc and __Dc

All that was required was to remove the const keyword from their declaration.

Quote:

Originally Posted by Lefungus
The lib use floating-point mode by default as it's usually the fastest mode on desktop cpus. Maybe the roku photobridge cpu is using floating point mode emulation, that would explain its slowness compared to fixed-point :)

Yes, it doesn't have a FPU, so it was using emulation. I really only tried the floating-point code to see how much slower it was than fixed-point. Answer (on the PhotoBridge anyway) - a lot slower! :)


All times are GMT. The time now is 09:07 pm.

Powered by vBulletin® Version 3.8.11 Beta 2
Copyright ©2000 - 2020, vBulletin Solutions Inc.