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

📄 umc_video_data.h

📁 这是在PCA下的基于IPP库示例代码例子,在网上下了IPP的库之后,设置相关参数就可以编译该代码.
💻 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) 2003-2005 Intel Corporation. All Rights Reserved.//*/#ifndef __UMC_VIDEO_DATA_H__#define __UMC_VIDEO_DATA_H__#include "vm_event.h"#include "umc_structures.h"#include "umc_media_data.h"namespace UMC{enum{    NUMBER_OF_PLANES            = 3};class VideoData : public MediaData{    DYNAMIC_CAST_DECL(VideoData, MediaData)public:    // Default constructor    VideoData();    // Destructor    virtual ~VideoData();    // Release video data    virtual Status Close(void);    // Sets buffer pointer as well as initializes m_lpImageDest[]    // array of pointers.    virtual Status SetBufferPointer(vm_byte *ptr, size_t bytes);    // Set destination pointer    Status SetDest(void *pDest0, void *pDest1 = NULL, void *pDest2 = NULL);    // Set image pitch(es)    Status SetPitch(size_t lPitch0, size_t lPitch1 = 0, size_t lPitch2 = 0);    // Set image width, height, color format and pitch.    virtual Status SetVideoParameters(vm_var32 width,                                      vm_var32 height,                                      ColorFormat cFormat);    // Set image width, height, color format and pitch.    virtual Status GetVideoParameters(vm_var32& width,                                      vm_var32& height,                                      ColorFormat& cFormat);    // Set frame type    Status SetFrameType(FrameType ft);    // Set color format    Status SetColorFormat(ColorFormat cFormat);    inline VideoData &operator = (VideoData &in);    // Returns the needed size of a buffer for mapping.    static size_t GetMappingSize(vm_var32 width,                                 vm_var32 height,                                 ColorFormat cFormat);    // Returns mapping size of the images.    static size_t GetImagesSize(vm_var32 width,                                vm_var32 height,                                ColorFormat cFormat);    vm_byte * const ((&m_lpDest)[3]);               // (vm_byte * const ([])) public use pointer(s) to picture    const size_t (&m_lPitch)[3];                    // (const size_t []) public use pitch(es)    const FrameType &m_FrameType;                   // (const FrameType) public use frame type    const ColorFormat &m_ColorFormat;               // (color ColorFormat) public use color format of imageprotected:    vm_byte *(m_lpImageDest[NUMBER_OF_PLANES]);                 // (vm_byte *([])) pointer(s) to data    size_t m_lImagePitch[3];                        // (size_t []) image pitch(es)    FrameType m_ImageFrameType;                     // (FrameType) type of frame    ColorFormat m_ImageColorFormat;                 // (ColorFormat) color format of image    vm_var32 m_Width;                               // (vm_var32) width of the frame.    vm_var32 m_Height;                              // (vm_var32) height of the frame.};class VideoDataSync : public VideoData{    DYNAMIC_CAST_DECL(VideoDataSync, VideoData)public:    VideoDataSync():m_pEvent(NULL){};    // Set pointer to synchro tool    inline void SetSync(vm_event *pEvent);    // Get pointer to synchro tool    inline void GetSync(vm_event *(&pEvent));    // unlock image    inline void UnlockImage(void);    inline VideoDataSync& operator = (VideoDataSync& in);protected:    vm_event *m_pEvent;   // (vm_event) use protection tool};inlineStatus VideoData::SetDest(void *pDest0, void *pDest1, void *pDest2){    m_lpImageDest[0] = reinterpret_cast<vm_byte *> (pDest0);    m_lpImageDest[1] = reinterpret_cast<vm_byte *> (pDest1);    m_lpImageDest[2] = reinterpret_cast<vm_byte *> (pDest2);    return UMC_OK;} // Status VideoData::SetDest(void *pDest0, void *pDest1, void *pDest2)inlineStatus VideoData::SetPitch(size_t lPitch0, size_t lPitch1, size_t lPitch2){    m_lImagePitch[0] = lPitch0;    m_lImagePitch[1] = lPitch1;    m_lImagePitch[2] = lPitch2;    return UMC_OK;} // Status VideoData::SetPitch(size_t lPitch0, size_t lPitch1, size_t lPitch2)inlineStatus VideoData::SetFrameType(FrameType ft){    m_ImageFrameType = ft;    return UMC_OK;} // Status VideoData::SetFrameType(FrameType ft)inlineStatus VideoData::SetColorFormat(ColorFormat cFormat){    m_ImageColorFormat = cFormat;    return UMC_OK;} // Status VideoData::SetColorFormat(ColorFormat cFormat)inlineVideoData &VideoData::operator = (VideoData &in){    MediaData::operator=(in);    m_ImageColorFormat = in.m_ImageColorFormat;    m_ImageFrameType   = in.m_ImageFrameType;    m_lImagePitch[0]   = in.m_lImagePitch[0];    m_lImagePitch[1]   = in.m_lImagePitch[1];    m_lImagePitch[2]   = in.m_lImagePitch[2];    m_lpImageDest[0]   = in.m_lpImageDest[0];    m_lpImageDest[1]   = in.m_lpImageDest[1];    m_lpImageDest[2]   = in.m_lpImageDest[2];    m_Width            = in.m_Width;    m_Height           = in.m_Height;    return *this;} // VideoData &VideoData::operator = (VideoData &in)inlinevoid VideoDataSync::SetSync(vm_event *pEvent){    m_pEvent = pEvent;} // void VideoDataSync::SetSync(vm_event *pEvent)inlinevoid VideoDataSync::GetSync(vm_event *(&pEvent)){    pEvent = m_pEvent;} // void VideoDataSync::GetSync(vm_event *(&pEvent))inlinevoid VideoDataSync::UnlockImage(void){    if (m_pEvent)        vm_event_signal(m_pEvent);} // void VideoDataSync::UnlockImage(void)inlineVideoDataSync &VideoDataSync::operator = (VideoDataSync &in){    VideoData::operator = (in);    m_pEvent = in.m_pEvent;    return *this;} // VideoDataSync &VideoDataSync::operator = (VideoDataSync &in)} // end namespace UMC#endif // __UMC_VIDEO_DATA_H__

⌨️ 快捷键说明

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