🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.multimedia
Article #328

Re: jpg to bmp from FrameCallbackProc without fileio

#328
From: Peter Fagerbrant
Date: Wed, 19 Jan 2005 11:02
56 lines
3160 bytes
> Could you do a test to see what the impact on performance is by statement
>
>   int iGrey = b*0.11 + g*0.59 + r*0.30;
>
> Just make it int iGrey = 111; // value does not matter.
>
It maked maybe a single frame extra (faster) per second.


> Think that those three multiplications are a performance break.
>
> If so than there are possibilities.
>
Maybe its folish of me to first convert the JPEG stream to RGB24 with the 
TJPEGImage component and then greyscale convert it to 8 bit. Two complex 
algoritms that should be taken care of after the capture and not in the 
callback routine.
Unfortenly my boss incists in the realtime conversion.

>> Is it for example possible to set the bit depht and greyscale directly in 
>> the JPEGImage component and would it be faster?
>
> Don't know that much about that. You better start a new thread in
> borland.public.cppbuilder.graphics where you post your problem.
I'l try to post a question there, thanks Hans.

>
> Please do the test. Could you spend an extra 16MB for a table ?
>
Memory is not an issue here
I already using:
struct CAPIMAGE
{
  DWORD dwTime;
  BYTE Data[CAMRESX*CAMRESY];     //640x480
};

pImages  = new CAPIMAGE[MAXIMAGES];    //MAXIMAGES=50

BYTE* pData8Out = pImages[iIndex].Data;

This is my capturebuffer where I store the captured bitmaps. After the 
capure I do my imageprocessingstuff where i measure and so on.

The only things that do matter is speed. Most of the customer want to see 
what happens under the first second from the impact.

Ok, the speed is not so bad. The old system with the bitmapcamera could 
process 15-16 fps. Now with the decoding of jpeg it processes 13-15 fps. The 
problem is that, my boss do not accept to go under 15fps processing and the 
old bitmapcamera is discontinued by the manufacturer.

Hard life for a simple programmer.

reg/
PFa 
Technical Details
Message-ID: <41ee3e3f$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
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>

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>
Subject: Re: jpg to bmp from FrameCallbackProc without fileio
Date: Wed, 19 Jan 2005 12:02:23 +0100
Lines: 58
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: <41ee3e3f$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1106132543 193.14.171.139 (19 Jan 2005 03:02:23 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail