📄 pf.h
字号:
//------------------------------------------------------------------------------
//
// Copyright (C) 2004, Motorola Inc. All Rights Reserved
//
//------------------------------------------------------------------------------
//
// Copyright (C) 2005, Freescale Semiconductor, Inc. All Rights Reserved
// THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT
// BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
// Freescale Semiconductor, Inc.
//
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
//
// File: pf.h
//
// Public definitions for Postfilter Driver
//
//------------------------------------------------------------------------------
#ifndef __PF_H__
#define __PF_H__
#ifdef __cplusplus
extern "C" {
#endif
//------------------------------------------------------------------------------
// Defines
// Postfilter EOF Event
#define PF_EOF_EVENT_NAME L"Pf EOF Event"
// IOCTL to configure PF
#define PF_IOCTL_CONFIGURE 1
// IOCTL to start PF tasks
#define PF_IOCTL_START 2
// IOCTL to resume a paused H.264 PF task
#define PF_IOCTL_RESUME 3
#define PF_SUCCESS 0
#define PF_ERR_NOT_RUNNING 1
#define PF_ERR_PAUSE_NOT_ENABLED 2
#define PF_ERR_INVALID_PARAMETER 3
//------------------------------------------------------------------------------
// Types
// Postfiltering operation mode
typedef enum pfModeEnum
{
pfMode_Disabled, // No postfiltering
pfMode_MPEG4Deblock, // MPEG4 Deblock only
pfMode_MPEG4Dering, // MPEG4 Dering only
pfMode_MPEG4DeblockDering, // MPEG4 Deblock and Dering
pfMode_H264Deblock, // H.264 Deblock
} pfMode;
// Postfiltering Frame Size Structure
typedef struct pfFrameSizeStruct {
UINT16 width;
UINT16 height;
} pfFrameSize, *pPfFrameSize;
// Structure for Postfilter buffer.
typedef struct pfBufferStruct
{
int size; // Size of buffer allocated
UINT32 *yBufPtr; // Y Buffer pointer in memory.
UINT32 uOffset; // Optional starting relative offset of U data
// from beginning of buffer. Set to 0 to use default
// calculated based on height and stride.
UINT32 vOffset; // Optional starting relative offset of V data
// from beginning of buffer. Set to 0 to use default
// calculated based on height and stride.
} pfBuffer, *pPfBuffer;
// Postfiltering Configuration Data Structure
typedef struct pfConfigDataStruct
{
// Postfiltering mode
pfMode mode;
// Frame data
pfFrameSize frameSize; // frame size
UINT32 frameStride; // stride in bytes
// Quantization Parameter and Boundary Strength data
UINT32 *qpBuf; // Buffer containing, sequentially, quantization
// parameter and boundary strength
// data for the Postfilter operation.
UINT32 qpSize; // size of QP and BS buffer
}pfConfigData, *pPfConfigData;
// Structure for Postfilter start parameters.
typedef struct PfStartParamsStruct
{
pPfBuffer in; // Pointer to input buffer address and offsets
pPfBuffer out; // Pointer to output buffer address and offsets
UINT32 h264_pause_row; // Row to pause at for H.264 mode. 0 to disable pause
}pfStartParams, *pPfStartParams;
//------------------------------------------------------------------------------
// Functions
HANDLE PFOpenHandle(void);
BOOL PFCloseHandle(HANDLE);
void PFConfigure(HANDLE hPP, pPfConfigData pConfigData);
void PFStart(HANDLE hPP, pPfStartParams pStartParms);
DWORD PFResume(HANDLE hPP, unsigned int h264_pause_row);
#ifdef __cplusplus
}
#endif
#endif // __PF_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -