viterbi.h
来自「signal-processing.rar信号处理demo原码」· C头文件 代码 · 共 97 行
H
97 行
/*
//
// 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) 2006 Intel Corporation. All Rights Reserved.
//
*/
#include "ipps.h"
#include "ippcore.h"
#include "viterbi_ce.h"
#include "viterbi_mp.h"
#define VITERBI_SNR_MIN 15.0 /* minimum SNR for Viterbi decoder */
#define TRELLIS_SEQ_LEN 1000 /* trellis sequence lenght */
#define VITERBI_TEST_LEN 100 /* test performing time */
typedef struct _ViterbiTestInfo {
Ipp8u numPossStates; /* number of possible next states from given current state */
Ipp8u *ceStates; /* pointer to array which contains convolutional encoder diagram */
Ipp8u *ceInput; /* pointer to array which contains convolutional encoder inputs */
Ipp8u ceDlState; /* convolutional encoder delay state */
Ipp8u vState; /* Viterbi decoder type */
} ViterbiTestInfo;
typedef enum _ViterbiState {
ViterbiState16 = 16,
ViterbiState32 = 32,
ViterbiState64 = 64
} ViterbiState;
typedef struct _Real4DSymbl
{
Ipp16sc m_firstPoint;
Ipp16sc m_secondPoint;
} Real4DSymbl;
typedef struct _Symbl4D
{
Ipp8u m_firstIndex;
Ipp8u m_secondIndex;
} Symbl4D;
typedef Ipp16sc VarPoint;
#define m_Error re
#define m_Index im
typedef struct _Current4DSymbl
{
Symbl4D m_IdealSymbl;
Ipp16u m_Error;
} Current4DSymbl;
typedef Ipp16sc ViterbiPath;
#define m_oldState im
typedef struct _ViterbiInfo
{
Real4DSymbl m_ReferencePoint[64];
ViterbiPath m_PathTable[4096];
VarPoint m_VariantPoint[16];
Current4DSymbl m_CurrentSubsetPoint[32];
Ipp16u m_BranchError[64];
Ipp16u m_PathError[64];
Ipp8u m_NextState[1024];
Ipp16u m_TableDept;
Ipp16u m_MinPathError;
Ipp16u m_Tick;
Ipp16u m_flRealData;
Ipp16u m_TickMask;
Ipp8u m_NumInputBits;
Ipp8u m_NumInputCombination;
Ipp8u m_MinSost;
Ipp8u m_BitInvertion;
Ipp8u m_State;
} ViterbiInfo;
void ViterbiInit( ViterbiTestInfo *viterbiInf, Ipp8u viterbiState);
void GetTrellisSequence( Real4DSymbl *trSeq, int len, ViterbiTestInfo *vInf );
int CheckViterbiOut( const Real4DSymbl *tOutput, const Real4DSymbl *vInput, int len, const ViterbiTestInfo* vInf, long* failCount);
int AddChannelNoise( Real4DSymbl *tOutput, Real4DSymbl *vInput, int len, double SNR );
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?