📄 umc_avs_dec_deblocker.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) 2007 Intel Corporation. All Rights Reserved.
//
//
*/
#ifndef __UMC_AVS_DEC_DEBLOCKER_H
#define __UMC_AVS_DEC_DEBLOCKER_H
#include "ippdefs.h"
#include "ippvc.h"
#include "umc_avs_dec_context.h"
namespace UMC
{
extern Ipp8u AVS_ALPHA_TABLE[64];
extern Ipp8u AVS_BETA_TABLE[64];
extern Ipp8u AVS_QP_SCALE_CR[64];
// forward declaration of used types
struct AVS_MB_INFO;
class AVSDeblocker
{
public:
enum
{
VerticalEdge = 0,
HorizontalEdge
};
// Default constructor
AVSDeblocker(void);
// Destructor
virtual
~AVSDeblocker(void);
//
// Initialization functions
//
// Set decoding parameters
inline
void SetDeblockingContext(AVS_DEBLOCKING_CONTEXT &decCtx);
// Get deblocking parameters
inline
AVS_DEBLOCKING_CONTEXT & GetDeblockingContext(void);
// Set decoding decoding parameters
//
// Deblocking functions
//
void DeblockIMacroBlocksRow(void);
void DeblockPBMacroBlocksRow(void);
protected:
// Prepare pointers to neighbours macroblock info
void PrepareNeighbours(AVS_BASE_CONTEXT *pCtx);
// Update decoding variables
void AdvanceDeblocking(void);
// Advance pointers to neighbours macroblocks
void AdvanceNeighbours(void);
// Finalize decoding stuff, set specials flags
void FinalizeDeblocking(void);
// Deblocking of I-picture macroblocks
void DeblockOneIMb(Ipp32s direction);
// Deblocking of P/B-picture macroblocks
void DeblockOnePBMb(Ipp32s direction);
// get Strengt for blocks ih MB for P picture
void GetStrengthsForPMb(Ipp8u* pStrength,
AVS_MB_INFO *pMbCurrent,
AVS_MB_INFO *pMbPrev,
Ipp32s direction);
// get Strengt for blocks ih MB for B picture
void GetStrengthsForBMb(Ipp8u* pStrength,
AVS_MB_INFO* pMbCurrent,
AVS_MB_INFO* pMbPrev,
Ipp32s direction);
IppStatus FilterDeblockingLuma_VerEdge(Ipp8u* pSrcDst,
Ipp32s srcdstStep,
Ipp8u* pAlpha,
Ipp8u* pBeta,
Ipp8u* pBS,
Ipp32s* pThreshold,
Ipp32s bit_depth);
IppStatus FilterDeblockingLuma_HorEdge(Ipp8u* pSrcDst,
Ipp32s srcdstStep,
Ipp8u* pAlpha,
Ipp8u* pBeta,
Ipp8u* pBS,
Ipp32s* pThreshold,
Ipp32s bit_depth);
IppStatus FilterDeblockingChroma_VerEdge(Ipp8u* pSrcDst,
Ipp32s srcdstStep,
Ipp8u* pAlpha,
Ipp8u* pBeta,
Ipp8u* pBS,
Ipp32s* pThreshold,
Ipp32s bit_depth);
IppStatus FilterDeblockingChroma_HorEdge(Ipp8u* pSrcDst,
Ipp32s srcdstStep,
Ipp8u* pAlpha,
Ipp8u* pBeta,
Ipp8u* pBS,
Ipp32s* pThreshold,
Ipp32s bit_depth);
IppStatus (AVSDeblocker::*AVSDeblockingTbl[4]) (Ipp8u *, Ipp32s, Ipp8u *, Ipp8u *, Ipp8u *, Ipp32s *, Ipp32s );
AVS_DEBLOCKING_CONTEXT m_debCtx; // (AVS_DEBLOCKING_CONTEXT) deblocking process parameters
//
// common members
//
Ipp32s MbIndex; // (Ipp32s) index of being decoded macroblock
AVS_MB_INFO *m_pMbInfo; // (AVS_MB_INFO *) current macroblock's properties
AVS_MB_INFO *m_pMbInfoLeft; // (AVS_MB_INFO *) left macroblock's properties
AVS_MB_INFO *m_pMbInfoTop; // (AVS_MB_INFO *) top macroblock's properties*/
};
inline
void AVSDeblocker::SetDeblockingContext(AVS_DEBLOCKING_CONTEXT &debCtx)
{
m_debCtx = debCtx;
} // void AVSDeblocker::SetDeblockingContext(AVS_DEBLOCKING_CONTEXT &debCtx)
inline
AVS_DEBLOCKING_CONTEXT & AVSDeblocker::GetDeblockingContext(void)
{
return m_debCtx;
} // AVS_DEBLOCKING_CONTEXT & AVSDeblocker::GetDeblockingContext(void)
template <class dst_t>
inline
dst_t ICLIP(dst_t valMin, dst_t valMax, Ipp32s Val)
{
if (valMin > Val)
return valMin;
else if (valMax < Val)
return valMax;
return (dst_t) Val;
} // dst_t ICLIP(dst_t Min, dst_t Max, int Val)
} // namespace UMC
#endif // __UMC_AVS_DEC_DEBLOCKER_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -