📄 umc_vc1_enc_adv.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.
//
//
// VC-1 (VC1) encoder, advance profile
//
*/
#include "umc_defs.h"
#if defined (UMC_ENABLE_VC1_VIDEO_ENCODER)
#ifndef _ENCODER_VC1_ADV_H_
#define _ENCODER_VC1_ADV_H_
#include "umc_vc1_enc_sequence_adv.h"
#include "umc_vc1_enc_picture_adv.h"
#include "umc_vc1_video_encoder.h"
#include "umc_vc1_enc_bit_rate_control.h"
#include "umc_vc1_enc_planes.h"
#include "umc_me.h"
namespace UMC_VC1_ENCODER
{
#define N_FRAMES 10
class VC1EncoderADV
{
private:
VC1EncoderBitStreamAdv *m_CodedFrame;
VC1EncoderSequenceADV *m_SH;
VC1EncoderPictureADV *m_pCurrPicture;
VC1EncoderMBs *m_pMBs;
VC1EncoderCodedMB *m_pCodedMB;
///////////////////
VC1BitRateControl *m_BitRateControl;
//////////////////
Ipp32u m_iFrameNumber;
Ipp32u m_uiGOPLength;
Ipp32u m_uiBFrmLength;
Ipp16s* m_pSavedMV;
vm_char m_cLastError[VC1_ENC_STR_LEN];
Ipp32s m_iFrameCount;
bool m_bSequenceHeader;
Ipp8u m_uiPictuteQuantIndex;
bool m_bHalfQuant;
StoredFrames* m_pStoredFrames;
GOP* m_pGOP;
WaitingList* m_pWaitingList;
//motion estomation
UMC::MeBase* m_pME;
Ipp32s m_MESearchSpeed;
//MEMORY ALLOCATOR
UMC::MemoryAllocator *m_pMemoryAllocator;
bool m_bOwnAllocator;
UMC::MemID m_SavedMVID;
bool m_bFrameRecoding;
protected:
public:
VC1EncoderADV():
m_CodedFrame(0),
m_pSavedMV(0),
m_SH(0),
m_pCurrPicture(0),
m_bSequenceHeader(false),
m_uiPictuteQuantIndex(0),
m_bHalfQuant(false),
m_iFrameCount(0),
m_uiGOPLength(0),
m_uiBFrmLength(0),
m_pMBs(0),
m_BitRateControl(NULL),
m_pCodedMB(0),
m_pME(NULL),
m_pStoredFrames(0),
m_pGOP(0),
m_pWaitingList(0),
m_pMemoryAllocator(NULL),
m_bOwnAllocator(false),
m_SavedMVID((UMC::MemID)-1),
m_MESearchSpeed(66),
m_bFrameRecoding(false)
{
}
~VC1EncoderADV()
{
Close();
}
UMC::Status Init(UMC::VC1EncoderParams* pParams);
UMC::Status Close();
UMC::Status Reset();
UMC::Status GetInfo(UMC::VC1EncoderParams* pInfo);
UMC::Status GetFrame(UMC::MediaData *in, UMC::MediaData *out);
UMC::Status SetGOPParams(Ipp32u GOPLen, Ipp32u BFrames)
{
m_uiBFrmLength = BFrames;
m_uiGOPLength = GOPLen;
return UMC::UMC_OK;
}
ePType GetPictureType()
{
Ipp32s nFrameInGOP = (m_iFrameCount++) % m_uiGOPLength;
if (nFrameInGOP)
{
if ( nFrameInGOP %(m_uiBFrmLength+1)==0)
return VC1_ENC_P_FRAME;
else
return VC1_ENC_B_FRAME;
}
return VC1_ENC_I_FRAME;
}
void SetMemoryAllocator(UMC::MemoryAllocator *pMemoryAllocator, bool bOwnAllocator);
};
}
#endif
#endif //defined (UMC_ENABLE_VC1_VIDEO_ENCODER)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -