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

📄 umc_vc1_dec_frame_descr.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) 2004-2007 Intel Corporation. All Rights Reserved.
//
//
//          VC-1 (VC1) decoder, Frame description for multi-frame parallelization
//
*/
#include "umc_defs.h"

#if defined (UMC_ENABLE_VC1_VIDEO_DECODER)

#ifndef __UMC_VC1_DEC_FRAME_DESCR_H_
#define __UMC_VC1_DEC_FRAME_DESCR_H_

#include "vm_types.h"
#include "umc_structures.h"
#include "umc_vc1_common_defs.h"
#include "umc_vc1_dec_seq.h"
#include "umc_media_data_ex.h"


#include "umc_memory_allocator.h"

namespace UMC
{
    class VC1TaskStore;
    class VC1FrameDescriptor
    {
        friend class VC1TaskStore;
        DYNAMIC_CAST_DECL_BASE(VC1FrameDescriptor);

    public:
        // Default constructor
        VC1FrameDescriptor(MemoryAllocator* pMemoryAllocator):m_pContext(NULL),
                                                              m_iFrameCounter(0),
                                                              m_bIsWarningStream(false),
                                                              m_iRemainActiveTasks(0),
                                                              m_bIsReadyToLoad(true),
                                                              m_iSelfID(0),
                                                              m_iRefFramesDst(0),
                                                              m_iBFramesDst(0),
                                                              m_bIsReferenceReady(false),
                                                              m_bIsBReady(false),
                                                              m_bIsReadyToDisplay(false),
                                                              m_bIsSkippedFrame(false),
                                                              m_bIsReadyToProcess(false),
                                                              m_pPred(NULL),
                                                              m_pDiffMem(NULL),
                                                              m_iActiveTasksInFirstField(0),
                                                              m_bIsValidFrame(true),
                                                              m_bBframeDelay(false),
                                                              m_bIsSpecialBSkipFrame(false)

        {
            m_pMemoryAllocator = pMemoryAllocator;
        }

        virtual bool Init                (Ipp32u         DescriporID,
                                          VC1Context*    pContext,
                                          VC1TaskStore*  pStore);
        virtual void Release();
        void         Reset();
        void         processFrame        (Ipp32u*  pOffsets,
                                          Ipp32u*  pValues);
        Status       preProcData         (Ipp8u*                 pbufferStart,
                                          Ipp32u                 bufferSize,
                                          Ipp64u                 frameCount,
                                          bool                   isWMV);

        Ipp8u*       getPredMem()
        {
            return m_pPred;
        }

        bool isDescriptorValid()
        {
            return m_bIsValidFrame;
        }

        bool isEmpty()
        {
            return m_bIsReadyToLoad;
        }


        virtual ~VC1FrameDescriptor()
        {
            Release();
        }

        bool IsNeedToDelayBFrame()
        {
            bool pBframeTemp = m_bBframeDelay;
            m_bBframeDelay = false;
            return pBframeTemp;
        }
        bool isSpecialBSkipFrame()
        {
            return m_bIsSpecialBSkipFrame;
        }

        VC1Context*                m_pContext;
        Ipp64u                     m_iFrameCounter;
        bool                       m_bIsWarningStream;

    protected:

        Status SetDisplayIndex_Adv             (Ipp32u                 PTYPE);
        Status SetDisplayIndex                 (Ipp32u                 PTYPE);

        Ipp32u                     m_iRemainActiveTasks;
        Ipp32u                     m_iSelfID;
        bool                       m_bIsReadyToLoad;
        Ipp32s                     m_iRefFramesDst;
        Ipp32s                     m_iBFramesDst;
        bool                       m_bIsReferenceReady;
        bool                       m_bIsBReady;
        bool                       m_bIsReadyToDisplay;
        bool                       m_bIsReadyToProcess;
        bool                       m_bIsSkippedFrame;
        Ipp8u*                     m_pPred;
        Ipp16s*                    m_pDiffMem;
        Ipp32s                     m_iActiveTasksInFirstField;

        VC1TaskStore*              m_pStore;

        MemoryAllocator*           m_pMemoryAllocator; // (MemoryAllocator*) pointer to memory allocator
        UMC::MemID                 m_pDiffMemID;       // diffrences memory
        UMC::MemID                 m_pPredBlockID;     // for prediction

        bool                       m_bIsValidFrame; // no errors during decoding
        bool                       m_bBframeDelay;
        bool                       m_bIsSpecialBSkipFrame;

    };
}
#endif //__umc_vc1_dec_frame_descr_H__
#endif //UMC_ENABLE_VC1_VIDEO_DECODER

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -