LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Cvs-checkins > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: cvs at opencores.org<cvs@o...>
    Date: Mon Jul 17 02:49:19 CEST 2006
    Subject: [cvs-checkins] MODIFIED: mb-jpeg ...
    Top
    Date: 00/06/07 17:02:49

    Modified: mb-jpeg/encoder main.c
    Log:
    Modified to be compiled on Microblaze with __MICROBLAZE defined


    Revision Changes Path
    1.2 mb-jpeg/encoder/main.c

    http://www.opencores.org/cvsweb.shtml/mb-jpeg/encoder/main.c.diff?r1=1.1&r2=1.2

    (In the diff below, changes in quantity of whitespace are not shown.)

    Index: main.c
    ===================================================================
    RCS file: /cvsroot/quickwayne/mb-jpeg/encoder/main.c,v
    retrieving revision 1.1
    retrieving revision 1.2
    diff -u -b -r1.1 -r1.2
    --- main.c 17 Jul 2006 00:31:42 -0000 1.1
    +++ main.c 17 Jul 2006 00:49:19 -0000 1.2
    @@ -11,13 +11,16 @@

    #include <stdio.h>
    #include <stdlib.h>
    +#ifndef __MICROBLAZE
    #include <windows.h>
    +#endif
    #include "zzq.h"
    #include "io.h"
    #include "huffman.h"
    #include "dct.h"
    #pragma hdrstop

    +
    //---------------------------------------------------------------------------

    INFOHEADER _bmpheader;
    @@ -42,7 +45,9 @@
    FILE *infile, *outfile;
    INFOHEADER *bmpheader;
    JPEGHEADER *jpegheader;
    +#ifndef __MICROBLAZE
    LARGE_INTEGER st, en;
    +#endif
    unsigned int col, cols, row, rows, remaining,component;
    unsigned char amount_remaining, Ydcvalue, Cbdcvalue, Crdcvalue ;

    @@ -82,7 +87,9 @@
    }
    else { //start codec
    outfile = fopen(argv[2],"wb");
    +#ifndef __MICROBLAZE
    QueryPerformanceCounter(&st);
    +#endif
    if(encode) { //encode infile to JPEG
    if (getbmpheader(infile,bmpheader)) { //File is a valid BMP
    printf("\nImage width: %d pixels", bmpheader->width);
    @@ -150,8 +157,10 @@
    fprintf(outfile,"0x%x, ",header[i]);
    fclose(outfile);
    fclose(infile); */
    +#ifndef __MICROBLAZE
    QueryPerformanceCounter(&en);
    printf("\nExecution time: %f seconds",(double)(en.QuadPart-st.QuadPart)/1000000);
    +#endif
    // free(bmpheader);
    }
    printf("\n\nHit ENTER to close this window.");



     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.