Click here to Skip to main content
15,927,344 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCrashes in release but not in debug Pin
CptGreenwood25-Jun-04 2:40
CptGreenwood25-Jun-04 2:40 
GeneralRe: Crashes in release but not in debug Pin
David Crow25-Jun-04 4:12
David Crow25-Jun-04 4:12 
GeneralRe: Crashes in release but not in debug Pin
CptGreenwood26-Jun-04 4:51
CptGreenwood26-Jun-04 4:51 
GeneralRe: Crashes in release but not in debug Pin
PJ Arends25-Jun-04 8:15
professionalPJ Arends25-Jun-04 8:15 
QuestionHow to implement DWebBrowserEvents Pin
sundu25-Jun-04 1:51
sundu25-Jun-04 1:51 
Generaltemplate class member function - returing pointer to the class Pin
Beau Skinner25-Jun-04 1:33
Beau Skinner25-Jun-04 1:33 
GeneralRe: template class member function - returing pointer to the class Pin
Beau Skinner25-Jun-04 20:20
Beau Skinner25-Jun-04 20:20 
QuestionMore than 30ms for very basic img proc operations? Why? Pin
redmop25-Jun-04 1:17
redmop25-Jun-04 1:17 
Hi,

I've to develop a real-time capable image processing software. My data stream is 720 x 576 in RGB and my aim is to process 30 frames per second (as data is stored in tiff one single image is about 1.6MB).
Unfortunately I had to discover that a even very simple operations (like multiplication, division, ...) on every colour byte (that is 720 x 576 x 3) demand about 30ms. I'm quite surprised as I thought this very basic operations are performed much faster. I'm compiling on a 1,2 GH Pentium M with 512MB Ram and compiler setting are on "release" (.NET 2003, using c++).
I tried to speed things up and discovered that for example the following code needs about 40ms

loop throug all pixels
current_pixel = ( current_pixel * some_value ) / ( some_int_value)

If I changed "some_int_value" to a const value the whole loop executes in 15ms. But I need this value as an variable as it changes for each new frame I process, but in the loop the value doesnt change. Thus I wonder if there is some way to make use of this fact. Maybe some experts have some tips for me? (By the way, even 15ms exec time for these operations make me wonder, some comments on that? Shouldnt it be much faster?).


Another issue is: what is the best/appropriate method for loading a new frame each 30 ms. Simply loading the new file with GDI++ (using Image constructor) every new 30ms works for the first few frames but then fails (too slow). Do I need some kind of buffer solution? Any advice how to start, how to do this? Thanks Smile | :)

If you need more detailed information about the code I use please let me know.
I'm grateful for any advice that might help me.
Thank you very much

Michael
(a c++ novice)


Appendix:

My compiler settings for the project on release settings:
/O2 /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /D "_AFXDLL" /D "_MBCS" /FD /EHsc /MD /GS /Zc:wchar_t /Yu"stdafx.h" /Fp"Release/GazeMFC.pch" /Fo"Release/" /Fd"Release/vc70.pdb" /W3 /nologo /c /Wp64 /Zi /Gd /TP
AnswerRe: More than 30ms for very basic img proc operations? Why? Pin
Beau Skinner25-Jun-04 1:41
Beau Skinner25-Jun-04 1:41 
AnswerRe: More than 30ms for very basic img proc operations? Why? Pin
LittleYellowBird25-Jun-04 2:37
LittleYellowBird25-Jun-04 2:37 
AnswerRe: More than 30ms for very basic img proc operations? Why? Pin
Rick York25-Jun-04 6:26
mveRick York25-Jun-04 6:26 
AnswerRe: More than 30ms for very basic img proc operations? Why? Pin
vladfein25-Jun-04 8:08
vladfein25-Jun-04 8:08 
AnswerRe: More than 30ms for very basic img proc operations? Why? Pin
Christopher Lloyd25-Jun-04 8:51
Christopher Lloyd25-Jun-04 8:51 
AnswerRe: More than 30ms for very basic img proc operations? Why? Pin
redmop27-Jun-04 4:25
redmop27-Jun-04 4:25 
GeneralRe: More than 30ms for very basic img proc operations? Why? Pin
LittleYellowBird27-Jun-04 23:53
LittleYellowBird27-Jun-04 23:53 
AnswerRe: More than 30ms for very basic img proc operations? Why? Pin
pavanbabut28-Jun-04 8:01
pavanbabut28-Jun-04 8:01 
General[Microsoft][ODBC Microsoft Access Driver] Couldn't use '(unknown)'; file already in use. Pin
si_6925-Jun-04 1:14
si_6925-Jun-04 1:14 
Generallarge arrays, stack overflow, MFC Pin
hdaly25-Jun-04 0:30
hdaly25-Jun-04 0:30 
GeneralRe: large arrays, stack overflow, MFC Pin
User 665825-Jun-04 0:40
User 665825-Jun-04 0:40 
GeneralRe: large arrays, stack overflow, MFC Pin
hdaly25-Jun-04 0:56
hdaly25-Jun-04 0:56 
GeneralRe: large arrays, stack overflow, MFC Pin
David Crow25-Jun-04 2:27
David Crow25-Jun-04 2:27 
GeneralStupid question Pin
Jonathan [Darka]25-Jun-04 0:30
professionalJonathan [Darka]25-Jun-04 0:30 
GeneralRe: Stupid question Pin
V.25-Jun-04 1:46
professionalV.25-Jun-04 1:46 
GeneralRe: Stupid question Pin
Henry miller25-Jun-04 3:25
Henry miller25-Jun-04 3:25 
GeneralRe: Stupid question Pin
Jonathan [Darka]25-Jun-04 4:22
professionalJonathan [Darka]25-Jun-04 4:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.