Click here to Skip to main content
11,483,586 members (68,239 online)
Click here to Skip to main content
Add your own
alternative version

Introduction to MMX Programming

, 25 Jul 2013 CPOL 220.4K 3.6K 93
An article shows an example of image processing using the Intel MMX™ technology
// ChildView.h : interface of the CChildView class
//


#pragma once

#include <atlimage.h>

#include "Img8Operations.h"

// CChildView window

class CChildView : public CWnd
{
// Construction
public:
	CChildView();

// Attributes
public:

// Operations
public:

// Overrides
protected:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);

    void TestMMX();
    void InitImage();
    void ShowTime(__int64 nTime);
    void InvertImage(CImg8Operations::INVERT_IMAGE pFunction);
    void ChangeBrightness(CImg8Operations::CHANGE_BRIGHTNESS pFunction);

    CImg8Operations m_Operations;

    BOOL m_bMMX;            // TRUE if MMX is supported

    CImage m_Image;
    BYTE* m_pImageBits;     // points to start of the image bits in m_Image

    BYTE* m_pInitialImage;  // initial array of image bits


// Implementation
public:
	virtual ~CChildView();

	// Generated message map functions
protected:
	afx_msg void OnPaint();
	DECLARE_MESSAGE_MAP()
public:
    afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
    afx_msg void OnOperationsReset();
    afx_msg void OnInvertcolorsAssemblyMmx();
    afx_msg void OnUpdateMmx(CCmdUI *pCmdUI);
    afx_msg void OnInvertcolorsC();
    afx_msg void OnInvertcolorsC3Mmx();
    afx_msg BOOL OnEraseBkgnd(CDC* pDC);
    afx_msg void OnChangebrightnessC();
    afx_msg void OnChangebrightnessAssemblyMmx();
    afx_msg void OnChangebrightnessCMmx();
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Alex Fr
Software Developer
Israel Israel
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150520.1 | Last Updated 25 Jul 2013
Article Copyright 2003 by Alex Fr
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid