You are here: Home » Topic » ivorbis

ivorbis

This topic contains 10 replies, has 6 voices, and was last updated by  MrE 8 years, 5 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1153

    otternase
    Participant

    Hi,

    first of all: Thanks a lot for the great work in buidling firefly! It is a beautiful piece of software.

    I use a linkstation II as media server with a robu soundbridge:

    – openlink
    – firefly

    It works well. But there is a problem with ogg transcoding. It´s too slow and therefore doesn´t work. I have learned that the cpu of the linkstation has no floating point unit, so I have to use a hacked version of oggdec .

    I installed ogg-libs, vorbis-libs and tremor . But I can´t find a source tarball of the ivorbis-tools, which is a modified version of vorbis-tools, using integers.

    My question:

    Does anyone hae a hint for me how to find the sources of ivorbis-tools?

    Thanks a lot

    Regards

    Rolf

    #9425

    rpedde
    Participant

    @otternase wrote:

    Hi,

    first of all: Thanks a lot for the great work in buidling firefly! It is a beautiful piece of software.

    I use a linkstation II as media server with a robu soundbridge:

    – openlink
    – firefly

    It works well. But there is a problem with ogg transcoding. It´s too slow and therefore doesn´t work. I have learned that the cpu of the linkstation has no floating point unit, so I have to use a hacked version of oggdec .

    I installed ogg-libs, vorbis-libs and tremor . But I can´t find a source tarball of the ivorbis-tools, which is a modified version of vorbis-tools, using integers.

    My question:

    Does anyone hae a hint for me how to find the sources of ivorbis-tools?

    Thanks a lot

    Regards

    Rolf

    Here’s a thread that talks about just that:

    http://forums.fireflymediaserver.org/viewtopic.php?t=5332

    Note that depending on the endian-ness of your machine you may have to comment out the byteswapping part. Yell if that doesn’t make sense, or if you need more detailed info.

    — Ron

    #9426

    otternase
    Participant

    Hi,

    Im sorry to ask again …

    http://forums.fireflymediaserver.org/viewtopic.php?t=5332

    But to be honest, I don´t have a clue how to apply the patch to the soruces. I have compiled all the stuff (including tremor) and “make install” on all the files except vorbis-tools_1.0 .

    Can you pls. explain the next steps or give me a hint where to find the information?

    Sorry, but I never patched any source file before and when I try this happens:


    patch -pl < oggdec-tremor.patch
    patching file vorbis-tools-1.0/ogg123/Makefile.in
    patch: Bad src file

    thanks in advance

    Rolf[/code]

    #9427

    otternase
    Participant

    Hi,

    sorry. I applied the patch correctly right now. Was just a typo.


    patch -pl < oggdec-tremor.patch
    patching file vorbis-tools-1.0/ogg123/Makefile.in
    patch: Bad src file

    I tell you what happens after compiling.

    Rolf

    #9428

    otternase
    Participant

    Hi,

    I got it running!

    Note that depending on the endian-ness of your machine you may have to comment out the byteswapping part. Yell if that doesn’t make sense, or if you need more detailed info.

    Firstly, I tried it with the original patch. That did not work. Although everything seems to be o.k. (no errors in log) all I hear was something like “white noise”. I deleted the byteswap part of your patch, applied it to the sources, compiled it again and now I´m listening to Simple Minds “Once upon a time”, transcoded from ogg-vorbis 🙂

    Thank you very much for your help and the great work in developing the patch.

    Regards

    Rolf

    #9429

    thorstenhirsch
    Participant

    Hi guys,

    just wanted to say, that I’ve updated the oggdec_tremor.patch. Here it is:

    diff -Npur vorbis-tools-1.2.0/Makefile.in vorbis-tools-1.2.0.th/Makefile.in
    --- vorbis-tools-1.2.0/Makefile.in 2008-03-02 23:48:02.000000000 -0600
    +++ vorbis-tools-1.2.0.th/Makefile.in 2008-03-03 22:46:56.000000000 -0600
    @@ -187,7 +187,7 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIB
    USE_NLS = @[email protected]
    VERSION = @[email protected]
    VORBISENC_LIBS = @[email protected]
    -VORBISFILE_LIBS = @[email protected]
    +VORBISFILE_LIBS = -lvorbisidec
    VORBIS_CFLAGS = @[email protected]
    VORBIS_LIBS = @[email protected]
    WOE32DLL = @[email protected]
    diff -Npur vorbis-tools-1.2.0/oggdec/oggdec.c vorbis-tools-1.2.0.th/oggdec/oggdec.c
    --- vorbis-tools-1.2.0/oggdec/oggdec.c 2008-03-02 23:37:25.000000000 -0600
    +++ vorbis-tools-1.2.0.th/oggdec/oggdec.c 2008-03-03 22:52:35.000000000 -0600
    @@ -22,7 +22,7 @@
    #include
    #endif

    -#include
    +#include

    #include "i18n.h"

    @@ -30,10 +30,7 @@ struct option long_options[] = {
    {"quiet", 0,0,'Q'},
    {"help",0,0,'h'},
    {"version", 0, 0, 'v'},
    - {"bits", 1, 0, 'b'},
    - {"endianness", 1, 0, 'e'},
    {"raw", 0, 0, 'R'},
    - {"sign", 1, 0, 's'},
    {"output", 1, 0, 'o'},
    {NULL,0,0,0}
    };
    @@ -80,7 +77,7 @@ static void parse_options(int argc, char
    int option_index = 1;
    int ret;

    - while((ret = getopt_long(argc, argv, "Qhvb:e:Rs:o:",
    + while((ret = getopt_long(argc, argv, "QhvR:o:",
    long_options, &option_index)) != -1)
    {
    switch(ret)
    @@ -96,19 +93,6 @@ static void parse_options(int argc, char
    version();
    exit(0);
    break;
    - case 's':
    - sign = atoi(optarg);
    - break;
    - case 'b':
    - bits = atoi(optarg);
    - if(bits < = 8)
    - bits = 8;
    - else
    - bits = 16;
    - break;
    - case 'e':
    - endian = atoi(optarg);
    - break;
    case 'o':
    outfilename = strdup(optarg);
    break;
    @@ -306,7 +290,7 @@ static int decode_file(FILE *in, FILE *o
    }
    }

    - while((ret = ov_read(&vf, buf, buflen, endian, bits/8, sign, &bs)) != 0) {
    + while((ret = ov_read(&vf, buf, buflen, &bs)) != 0) {
    if(bs != 0) {
    vorbis_info *vi = ov_info(&vf, -1);
    if(channels != vi->channels || samplerate != vi->rate) {

    It is working with the current svn trunk code of tremor (http://svn.xiph.org/trunk/Tremor/) and vorbis-tools-1.2.0. And 2 more infos if you’ve got problems:

      * provide full path names of oggdec, wavstream and flac in mt-daapd-ssc.sh
      * if “ldd `which oggdec`” says, that libivorbis.so.1 could not be found, you might need to configure/update your library cache with ldconfig
    #9430

    MrE
    Participant

    Hi,

    Thanks for posting this updated version of the patch.

    Unfortunately I’m having difficulties applying the patch.

    At first I got a number of “malformed patch at line x” errors

    # patch -p1 < oggdec_tremor.patch

    patching file Makefile.in
    patch: **** malformed patch at line 5: USE_NLS = @[email protected]

    I fixed them by getting rid of the 4 spaces that somehow automatically get inserted in front of all the lines when copying and pasting it from the website into a text file. When that didn’t work, I looked at the previous version of the patch and noticed that the lines giving me the malformed patch errors were all prefixed with a single space, and indeed adding a space got rid of those errors.

    Then I got the following error:


    # patch -p1 < oggdec_tremor.patch

    patching file Makefile.in
    patching file oggdec/oggdec.c
    patch: **** malformed patch at line 25: @@ -30,10 +30,7 @@ struct option long_options[] = {

    I tried inserting a space in front of this line to but that resulted in the following error:

    # patch -p1 < oggdec_tremor.patch

    patching file Makefile.in
    Reversed (or previously applied) patch detected! Assume -R? [n] y
    patching file oggdec/oggdec.c
    Hunk #1 FAILED at 22.
    1 out of 1 hunk FAILED -- saving rejects to file oggdec/oggdec.c.rej
    missing header for unified diff at line 36 of patch
    can't find file to patch at input line 36
    Perhaps you used the wrong -p or --strip option?
    The text leading up to this was:
    | {"version", 0, 0, 'v'},
    |- {"bits", 1, 0, 'b'},
    |- {"endianness", 1, 0, 'e'},
    | {"raw", 0, 0, 'R'},
    |- {"sign", 1, 0, 's'},
    | {"output", 1, 0, 'o'},
    | {NULL,0,0,0}
    |};
    File to patch:

    I’m completely stuck at this point for I don’t know how patch files work and can’t see what could be wrong with the mentioned lines.

    Has anyone else managed to apply this patch correctly?

    I’m running Debian Lenny on a Linksys NSLU2 and have installed the latest Tremor SVN trunk (revision 15934) as well as the source for vorbis-tools-1.2.0

    Any hints will be greatly appreciated!

    Thanks
    Emile

    #9431

    fizze
    Participant

    Well, i think there is a different set of this software around.
    there actually is no such thing as ivorbis-tools, they’re just the regular vorbis-tools with those patches applied.
    And as it is with patches, they are hardly ever version-safe.

    The error message you get is because the file to patch is too short. It has less than 36 lines, which the patch wants to modify.
    Take a look at what a quick google-search turned up:
    http://bembelbee.wordpress.com/2008/03/19/fixed-point-ogg-vorbis-and-musepack-decoder-packages-for-debian-etch-arm/

    #9432

    mas
    Participant

    By the way, in case people are puzzled why and when all this “tremor-patch” thing has to be done, the background is actually quite simple:

    1. oggdec uses normally floating point arithmetic for the decoding.

    2. Some of the small network storage units (as e.g. the NSLU) have a RISC processor that does NOT have a floating point unit in the processor. No problem, the linux kernel uses software emulation for such instructions then.

    3. The software emulation of an FPU is of course way slower than a hardware unit. And if the processor is then in general underpowered (as these CPUs often are!), it won’t work fast enough.

    4. The tremor patch is a hack that substitutes all floating point arithmetic with integer operations. That runs then natively on the processor and is much faster.

    5. Oh, and to make it more nasty, some of the ARM processors are BIG endian (this means how a 2 byte word is encoded, first highest significant byte, then the LSB – that is exotic!), while all intel and most other are little endian (as all normal computers). So if you run a tremor patch written for a big endian processor (this patch is badly (!) written as it hardcodes a byteswap!) on a little-endian machine, you get the bytes swapped and you hear only noise, because the LEAST significant byte gets interpreted as the most significant byte. Nasty.

    6. As these CPUs without a FPU are quite rare that tremor patch is not mainstream. On all “normal” CPUs the FPU version works perfect and better than the tremor one.

    #9433

    fizze
    Participant

    Nice explanation for the less technically inclined. 🙂
    I feel to have to add my 0.02€ though 😉

    @mas wrote:

    6. As these CPUs without a FPU are quite rare that tremor patch is not mainstream. On all “normal” CPUs the FPU version works perfect and better than the tremor one.

    From wikipedia:

    The ARM architecture is the most widely used 32-bit CPU architecture in the world. The ARM architecture is used in about 3/4 of all 32 bit processors sold.
    (…)
    As of January 2008, over 10 billion ARM cores have been built, and iSuppli predicts that 5 billion a year will ship in 2011.

    Most ARM-based processors do not have floating point capability. It’s only available through a numeric co-processor, or special instruction sets for signal processing, for instance.
    I couldn’t get numbers on Intel or AMD processors built so far, but I doubt they go even as high as 1 billion.
    Just to put “rare” into perspective. 😉

    #9434

    MrE
    Participant

    Hi Fizze,

    Thanks for your reply and for the link.

    I found that blog in June last year already and have had some help from the author already, see the comments of that blog post.

    The links he posted to the Lenny binaries are no longer active. I have left another comment there, asking if he’d be so kind as to making them available again, but as it’s an old blog, he may not get to see my latest comment. In this case I rely on a working patch to get Firefly to play my FLAC and Vorbis files, something I’ve not been able to do for more than two years now. This is somewhat frustrating, knowing that there are people out there who have managed to get this working on their Debian NSLU2s!

    Any help is really much appreciated!

    Thanks
    Emile

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.