URL
https://opencores.org/ocsvn/mb-jpeg/mb-jpeg/trunk
Subversion Repositories mb-jpeg
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 39 to Rev 40
- ↔ Reverse comparison
Rev 39 → Rev 40
/trunk/bmp2jpg_mb/bmp2jpg_mb.c
13,7 → 13,7
#endif |
|
char* bmpimage; |
int bmpsize; |
int bmpsize; |
|
INFOHEADER _bmpheader; |
INFOHEADER *bmpheader; |
66,7 → 66,7
|
} |
|
void put_char(unsigned c) { |
void put_char(unsigned char c) { |
|
sysace_fwrite(&c, 1, 1, outfile); |
|
/trunk/bmp2jpg_mb/huffman.c
676,12 → 676,12
if (vlc_amount_remaining >= 8) //2 bytes to send, send first byte |
{ |
send=vlc_remaining>>(vlc_amount_remaining-8); //shift so that first byte is ready to send |
vlc_output_byte(send); |
vlc_output_byte(send&0xff); |
// fwrite(&send,1,1,file); |
if (send==0xFF) //is this still needed???? |
{ |
send=0x00; |
vlc_output_byte(send); |
vlc_output_byte(send&0xff); |
// fwrite(&send,1,1,file); |
} |
vlc_amount_remaining=vlc_amount_remaining -8; // lower the value to the amount of bits that still needs to be send |
692,7 → 692,7
mask=0x00; //init mask |
for (count=(8-vlc_amount_remaining); count>0; count--) mask=(mask<<1)|0x01; //create mask to fill byte up with ones |
send=send | mask; //add the ones to the byte |
vlc_output_byte(send); |
vlc_output_byte(send&0xff); |
// fwrite(&send,1,1,file); |
vlc_amount_remaining=0x00; //is this needed? |
} |
726,6 → 726,7
char difference; |
unsigned char magnitude,zerorun,ii,ert; |
unsigned int bits; |
unsigned char bit_char; |
char last_dc_value; |
//init |
// PrintMatrix(dataunit) ; |
732,7 → 733,8
last_dc_value = dcvalue[color]; |
difference = dataunit[0] - last_dc_value; |
last_dc_value=dataunit[0]; |
ReverseExtend(difference, &magnitude,&bits); |
ReverseExtend(difference, &magnitude,&bit_char); |
bits = bit_char; |
HuffmanEncodeUsingDCTable(magnitude); |
WriteRawBits16(magnitude,bits); |
zerorun=0; |
747,7 → 749,8
zerorun=zerorun-16; |
// printf("16 zeros: %d\n",zerorun); |
} |
ReverseExtend(dataunit[ii],&magnitude,&bits); |
ReverseExtend(dataunit[ii],&magnitude,&bit_char); |
bits=bit_char; |
ert= ((int)zerorun *16); //ERROR !!!!!!!!!!! |
ert=ert + magnitude; |
HuffmanEncodeUsingACTable(ert); |