⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 umc_vc1_enc_sm.h

📁 audio-video-codecs.rar语音编解码器
💻 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, vc1 encoder simple profile
//
*/
#include "umc_defs.h"

#if defined (UMC_ENABLE_VC1_VIDEO_ENCODER)

#ifndef _ENCODER_VC1_SM_H_
#define _ENCODER_VC1_SM_H_

#include "umc_vc1_enc_sequence_sm.h"
#include "umc_vc1_enc_picture_sm.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"

#ifdef VC1_ENC_STAT
#include "umc_vc1_enc_statistic.h"
#endif
namespace UMC_VC1_ENCODER
{

#define N_FRAMES    10
class VC1EncoderSM
{
private:

    VC1EncoderBitStreamSM   *m_CodedFrame;
    VC1EncoderSequenceSM    *m_SH;
    VC1EncoderPictureSM     *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;

    //Ipp32s                   m_uiNFrames;

    bool                     m_bSequenceHeader;
    Ipp8u                    m_uiPictuteQuantIndex;
    bool                     m_bHalfQuant;
    Ipp8u                    m_uiRoundControl;                // 0,1;

    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;

#ifdef VC1_ENC_STAT
    EncoderStatistic*         m_pEncStat;
#endif

protected:

    static Ipp8u    GetRoundControl(ePType pictureType, Ipp8u roundControl);
public:

    VC1EncoderSM():
        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_uiRoundControl(0),
        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)
    {
#ifdef VC1_ENC_STAT
        m_pEncStat = 0;
#endif
    }
    ~VC1EncoderSM()
    {
        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);
    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 + -