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;
}
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: