OpenCores
URL https://opencores.org/ocsvn/mpdma/mpdma/trunk

Subversion Repositories mpdma

[/] [mpdma/] [trunk/] [mb-bmp2jpg/] [bmp2jpg_mb.c] - Diff between revs 18 and 22

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 18 Rev 22
Line 96... Line 96...
 
 
  int i;
  int i;
  unsigned int col, cols, row, rows;
  unsigned int col, cols, row, rows;
  int compression;
  int compression;
  int sample;
  int sample;
  char* bmpfilename = "image06.bmp";
  char* bmpfilename = "image04.bmp";
  char* jpgfilename = "image06.jpg";
  char* jpgfilename = "image04.jpg";
  int bmpsizelimit = 2*1024*1024;
  int bmpsizelimit = 2*1024*1024;
 
 
  compression = 0;
  compression = 0;
 
 
//  bmpimage=(unsigned char*)0x70000000;
//  bmpimage=(unsigned char*)0x70000000;
Line 152... Line 152...
 
 
   for (row = 0; row < rows; row++) {
   for (row = 0; row < rows; row++) {
        for (col = 0; col < cols; col++) {
        for (col = 0; col < cols; col++) {
                get_MB(row, col, pixelmatrix);
                get_MB(row, col, pixelmatrix);
 
 
 
                RGB2YCrCb(pixelmatrix,YMatrix,CrMatrix,CbMatrix,sample);
 
 
 
 
 
#if 0
 
 
// dct->zz/q->vlc               dct call zz/q call vlc
// dct->zz/q->vlc               dct call zz/q call vlc
 
 
/*              RGB2Y_matrix(pixelmatrix, pmatrix2);
/*              RGB2Y_matrix(pixelmatrix, pmatrix2);
                dct(pmatrix2, 0);
                dct(pmatrix2, 0);
                RGB2Cr_matrix(pixelmatrix, pmatrix2);
                RGB2Cr_matrix(pixelmatrix, pmatrix2);
Line 172... Line 177...
                                                        dct(CrMatrix,1);
                                                        dct(CrMatrix,1);
                                                        //Cb-encoding
                                                        //Cb-encoding
                                                        dct(CbMatrix,2);
                                                        dct(CbMatrix,2);
                                                }
                                                }
                                        }
                                        }
 
#endif          
        }
        }
   }
   }
 
 
   vlc_end_done();
   vlc_end_done();
   zzq_encode_end_done();
   zzq_encode_end_done();
   dct_end_done();
   dct_end_done();
 
   cc_end_done();
 
 
 
 
   xil_printf("\r\nProcessed %d %dx%d-blocks.\r\n",(row-1)*cols+col,MATRIX_SIZE,MATRIX_SIZE);
   xil_printf("\r\nProcessed %d %dx%d-blocks.\r\n",(row-1)*cols+col,MATRIX_SIZE,MATRIX_SIZE);
   writejpegfooter(outfile);
   writejpegfooter(outfile);
 
 
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.