📄 dcodeblock.h
字号:
/* //////////////////////////////////////////////////////////////////////////// INTEL CORPORATION PROPRIETARY INFORMATION// This software is supplied under the terms of a license agreement or// nondisclosure agreement with Intel Corporation and may not be copied// or disclosed except in accordance with the terms of that agreement.// Copyright(c) 2002-2005 Intel Corporation. All Rights Reserved.//////*/#ifndef __DCODEBLOCK_H__#define __DCODEBLOCK_H__#include "fixedarray.h"#include "bcodeblock.h"#include "cbcodingstyle.h"#include "dcblayer.h"#include "debcotwarning.h"#include "bdiagnoutput.h"class DCodeBlock : public BCodeBlock{public: DCodeBlock(); void Init( const ImageCore32sC1 &cbImage, const RectSize &size, unsigned int nOfLayers, IppiWTSubband subband, unsigned int cmpGuardBits, unsigned int sbDynRange, unsigned int sbLowestBitOffset, const CBCodingStyle &codingStyle); void AttachDiagnOutput(BDiagnOutput &diagnOutput) { m_diagnOutputPtr = diagnOutput; } void SetNextSegmentSize(unsigned int layer, unsigned int size, unsigned int nOfPasses); void SetNOfZeroBits (unsigned int nOfZeroBits); void SaveComprData(Ipp8u *dst) const; template<class ByteInput> void DecodeLayer(unsigned int layer, ByteInput &data) { FixedBuffer<Ipp8u> segmData; ippiDecodeCBProgrSetPassCounter_JPEG2K(m_layer[layer].NOfPasses(), State()); for(List<unsigned int>::Iterator segmentSize = m_layer[layer].SegmentSize().ItrFront(); segmentSize != m_layer[layer].SegmentSize().ItrBackBound(); ++segmentSize) { segmData.ReAlloc(*segmentSize); data.Read(segmData, *segmentSize); if(ippStsJPEG2KDamagedCodeBlock == ippiDecodeCBProgrStep_JPEG2K(segmData, *segmentSize, State()) ) { m_diagnOutputPtr->Warning(DiagnDescrCT<DEBCOTWarning, CodeBlockLayerDamage>()); } } int nOfResidualPasses; ippiDecodeCBProgrGetPassCounter_JPEG2K(State(), &nOfResidualPasses); if(nOfResidualPasses!=0) m_diagnOutputPtr->Warning(DiagnDescrCT<DEBCOTWarning, CodeBlockLayerNOfPassesMissmatch>()); int bitPlaneNum; ippiDecodeCBProgrGetCurBitPlaneNum_JPEG2K(State(), &bitPlaneNum); } int m_Lblock;protected: IppiDecodeCBProgrState_JPEG2K *State() { return (IppiDecodeCBProgrState_JPEG2K*)(Ipp8u*)m_state; } BDiagnOutputPtr m_diagnOutputPtr; FixedBuffer<Ipp8u> m_state; FixedBuffer<DCBLayer> m_layer; ImageCore32sC1 m_cbImage; RectSize m_size; IppiWTSubband m_subband; unsigned int m_cmpGuardBits; unsigned int m_sbDynRange; unsigned int m_sbLowestBitOffset; CBCodingStyle m_codingStyle;};#endif // __DCODEBLOCK_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -