decqtbl.cpp
Go to the documentation of this file.
00001 /*
00002 //
00003 //               INTEL CORPORATION PROPRIETARY INFORMATION
00004 //  This software is supplied under the terms of a license agreement or
00005 //  nondisclosure agreement with Intel Corporation and may not be copied
00006 //  or disclosed except in accordance with the terms of that agreement.
00007 //    Copyright (c) 2001-2004 Intel Corporation. All Rights Reserved.
00008 //
00009 //  Intel® Integrated Performance Primitives JPEG Viewer Sample for Windows*
00010 //
00011 //  By downloading and installing this sample, you hereby agree that the
00012 //  accompanying Materials are being provided to you under the terms and
00013 //  conditions of the End User License Agreement for the Intel® Integrated
00014 //  Performance Primitives product previously accepted by you. Please refer
00015 //  to the file ipplic.htm located in the root directory of your Intel® IPP product
00016 //  installation for more information.
00017 //
00018 //  JPEG is an international standard promoted by ISO/IEC and other organizations.
00019 //  Implementations of these standards, or the standard enabled platforms may
00020 //  require licenses from various entities, including Intel Corporation.
00021 //
00022 //
00023 */
00024 
00025 #include "precomp.h"
00026 
00027 #ifndef __DECQTBL_H__
00028 #include "decqtbl.h"
00029 #endif
00030 
00031 
00032 
00033 
00034 CJPEGDecoderQuantTable::CJPEGDecoderQuantTable(void)
00035 {
00036   m_id          = 0;
00037   m_precision   = 0;
00038   m_initialized = 0;
00039 
00040   m_raw = (Ipp8u*)OWN_ALIGN_PTR(m_rbf,CPU_CACHE_LINE);
00041   m_qnt = (Ipp16u*)OWN_ALIGN_PTR(m_qbf,CPU_CACHE_LINE); // align for max performance
00042 
00043   ippsZero_8u(m_raw,sizeof(m_raw));
00044   ippsZero_8u((Ipp8u*)m_qnt,sizeof(m_qnt));
00045 
00046   return;
00047 } // ctor
00048 
00049 
00050 CJPEGDecoderQuantTable::~CJPEGDecoderQuantTable(void)
00051 {
00052   m_initialized = 0;
00053 
00054   ippsZero_8u(m_raw,sizeof(m_raw));
00055   ippsZero_8u((Ipp8u*)m_qnt,sizeof(m_qnt));
00056 
00057   return;
00058 } // dtor
00059 
00060 
00061 JERRCODE CJPEGDecoderQuantTable::Init(int id,Ipp8u raw[64])
00062 {
00063   IppStatus status;
00064 
00065   m_id        = id & 0x0f;
00066   m_precision = 0; // 8-bit hardcoded
00067 
00068   ippsCopy_8u(raw,m_raw,DCTSIZE2);
00069 
00070   status = ippiQuantInvTableInit_JPEG_8u16u(m_raw,m_qnt);
00071   if(ippStsNoErr != status)
00072   {
00073     LOG1("IPP Error: ippiQuantInvTableInit_JPEG_8u16u() failed - ",status);
00074     return JPEG_INTERNAL_ERROR;
00075   }
00076 
00077   m_initialized = 1;
00078 
00079   return JPEG_OK;
00080 } // CJPEGDecoderQuantTable::Init()
00081 


canon_vbc50i
Author(s): Cedric Pradalier
autogenerated on Sun Oct 5 2014 23:47:45