Click here to Skip to main content
11,417,972 members (48,101 online)
Click here to Skip to main content
Add your own
alternative version

Introduction to MMX Programming

, 25 Jul 2013 CPOL
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 "Img32Operations.h"

// CChildView window

class CChildView : public CWnd
// Construction

// Attributes

// Operations

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

// Implementation
	virtual ~CChildView();

    void InitImage();
    void TestMMX();
    void ShowTime(__int64 nTime);
    void InvertImage(CImg32Operations::INVERT_IMAGE pFunction);
    void ComputeColors(CImg32Operations::COMPUTE_COLORS pFunction);

    CImg32Operations 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

	// Generated message map functions
	afx_msg void OnPaint();
    afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
    afx_msg void OnColorsC();
    afx_msg void OnColorsCMmx();
    afx_msg void OnUpdateMmx(CCmdUI *pCmdUI);
    afx_msg void OnColorsAssemblyMmx();
    afx_msg void OnInvertcolorsC();
    afx_msg void OnInvertcolorsAssemblyMmx();
    afx_msg void OnInvertcolorsCMmx();
    afx_msg void OnOperationsReset();
    afx_msg BOOL OnEraseBkgnd(CDC* pDC);

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.


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


About the Author

Alex Fr
Software Developer
Israel Israel
No Biography provided

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