Article View: borland.public.cppbuilder.multimedia
Article #330Re: jpg to bmp from FrameCallbackProc without fileio
From: Peter Fagerbrant
Date: Wed, 19 Jan 2005 12:14
Date: Wed, 19 Jan 2005 12:14
39 lines
2522 bytes
2522 bytes
"Hans Galema" <notused@notused.nl> skrev i meddelandet
news:41ee43e8$1@newsgroups.borland.com...
>How many frmes can you handle
> in a second if you omit the 'I Use this for storing the bitmapinfo in a
> array:'
> completely. So just offer an empty array to the next routine.
> Keep the rest the same.
>
> I like to know the percentage of time that conversion takes.
>
> Hans.
Without the for( int y=0;y<CAMRESY;y++) {...}
It runs with 26-30 fps.
When I comment out the for( int x=0;x<CAMRESX;x++)
but keeps y loop including BYTE* pLine = (BYTE*)
((THackJPEGImage*)JPEGImage)->Bitmap->ScanLine[y];
It drops to 15fps.
When I commenting out the "JPEGImage)->Bitmap->ScanLine[y];"
Enabling the x loop but only do:
for( int x=0;x<CAMRESX;x++)
{
int r = 11; //pLine[ xoffsIn + 0];
int g = 11; //pLine[ xoffsIn + 1];
int b = 11; //pLine[ xoffsIn + 2];
int iGrey = b*0.11 + g*0.59 + r*0.30;
pData8Out[ x + yoffsOut ] = iGrey;
xoffsIn += 3;
}
It runs on 22-26 fps
It looks like the ScanLine[y]; is the big thief here.
reg/
PFa
Technical Details
Message-ID:
<41ee4f26$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-in.ntli.net!newsrout1-win.ntli.net!ntli.net!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<41ebb760@newsgroups.borland.com> <41ebbf15$1@newsgroups.borland.com> <41ebc6d3$1@newsgroups.borland.com> <41ebcb8c$1@newsgroups.borland.com> <41ebce5b$1@newsgroups.borland.com> <41ebd086$1@newsgroups.borland.com> <41ebd7a4@newsgroups.borland.com> <41ebdb02@newsgroups.borland.com> <41ee20a3$1@newsgroups.borland.com> <41ee3744$1@newsgroups.borland.com> <41ee3e3f$1@newsgroups.borland.com> <41ee43e8$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10d0fc,e7775a35dcf064b6 X-Google-Attributes: gid10d0fc,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Peter Fagerbrant" <peter@fagerbrant.com> Newsgroups: borland.public.cppbuilder.multimedia References: <41ebb760@newsgroups.borland.com> <41ebbf15$1@newsgroups.borland.com> <41ebc6d3$1@newsgroups.borland.com> <41ebcb8c$1@newsgroups.borland.com> <41ebce5b$1@newsgroups.borland.com> <41ebd086$1@newsgroups.borland.com> <41ebd7a4@newsgroups.borland.com> <41ebdb02@newsgroups.borland.com> <41ee20a3$1@newsgroups.borland.com> <41ee3744$1@newsgroups.borland.com> <41ee3e3f$1@newsgroups.borland.com> <41ee43e8$1@newsgroups.borland.com> Subject: Re: jpg to bmp from FrameCallbackProc without fileio Date: Wed, 19 Jan 2005 13:14:30 +0100 Lines: 41 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 193.14.171.139 Message-ID: <41ee4f26$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1106136870 193.14.171.139 (19 Jan 2005 04:14:30 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-in.ntli.net!newsrout1-win.ntli.net!ntli.net!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail