image compression using golomb-rice algorithm

Discussion in 'VHDL' started by gokuldeep, Mar 29, 2013.

  1. gokuldeep

    gokuldeep

    Joined:
    Mar 29, 2013
    Messages:
    1
    Likes Received:
    0
    plz help me
    my project is image compression using gr algorithm any one have plz help me equalent vhdl code give me....and also attach the c code for my project one part for gr c code.
    plz help me ............i am so help less sir,,,,,,,,,,, this is my carrier ....................
    my c code is
    c code for unarry
    Encoding:
    UnaryEncode(n) {
    while (n > 0) {
    WriteBit(1);
    n--;
    }
    WriteBit(0);
    }


    Decoding: UnaryDecode() {
    n = 0;
    while (ReadBit(1) == 1) {
    n++;
    }
    return n;
    }
    c code for golomb-rice

    Encoding:
    GolombEncode(n, RBits) {
    q = n >> RBits;
    UnaryCode(q);
    WriteBits(n, RBits);
    }
    decoding:
    GolombDecode(RBits) {
    q = UnaryDecode();
    n = (q << RBits) + ReadBits(RBits);
    return n;
    }
     
    Last edited: Mar 29, 2013
    gokuldeep, Mar 29, 2013
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.