Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version

Embedded Zerotree Image Codec with Bior97 SSE Optimized Wavelet-transform

, 20 Oct 2007
This article demonstrates the use of Embedded zero tree still image codec with JPEG 2000 wavelet-filter.
ezw_demo.zip
bin
ezwconsole.exe
ezw_demo_update_1_.zip
ezwconsole.exe
ezw_src.zip
src
Lib
Release
ezw_src_update_1_.zip

#include "stdafx.h"
#include "vec1d.h"


vec1D::vec1D(unsigned int size, int offset, const float* data) : m_size(size), m_offset(offset), m_data(0)
{
        m_last = (m_size + m_offset) - 1;
        m_data = (float *)_aligned_malloc(m_size * sizeof(float), 16);     //MMX alignement
    
        for (unsigned int i = 0; i < m_size; i++) {
                if (data != 0)
                        m_data[i] = data[i];
                else
                        m_data[i] = 0.0f;
        }

        m_data -= m_offset;
}

vec1D::vec1D(const vec1D& v) : m_data(0)
{
        init(v);
}

vec1D::~vec1D()
{
        close();
}


void vec1D::init(const vec1D& v)
{
        close();

        m_size = v.size();
        m_offset = v.first();
        const float* data = v.data();
   
        m_last = (m_size + m_offset) - 1;
        m_data = (float *)_aligned_malloc(m_size * sizeof(float), 16);     //MMX alignement    

        for (unsigned int i = 0; i < m_size; i++)
                m_data[i] = data[i];  

        m_data -= m_offset;
}

void vec1D::close()
{
        if (m_data != 0) {
                m_data +=  m_offset;
                _aligned_free(m_data);
        }
}

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 GNU General Public License (GPLv3)

About the Author

Chesnokov Yuriy
Engineer
Russian Federation Russian Federation
No Biography provided

| Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 20 Oct 2007
Article Copyright 2007 by Chesnokov Yuriy
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid