📄 pbdll.h
字号:
//==========================================================================//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR// PURPOSE.//// Copyright (c) 1999 - 2001 On2 Technologies Inc. All Rights Reserved.////--------------------------------------------------------------------------/****************************************************************************** Module Title : PBDLL** Description : Video CODEC DEMO playback dll header********************************************************************************/#ifndef __INC_PBDLL_H#define __INC_PBDLL_H#define VAL_RANGE 256#include "rawTypes.h"#include "codec_common.h"#include "Huffman.h"#include "YUVtofromRGB.h"#include "vfw_PB_Interface.h"/***************************************************************************** Module constants.******************************************************************************/ #define INPUT_BUFFER_SIZE MAX_FRAME_SIZE // VFW must be able to take a whole frame at once.#define IB_HIGH_WATER ((INPUT_BUFFER_SIZE * 3) / 4)#define IB_LOW_WATER (INPUT_BUFFER_SIZE / 4)#define VAL_RANGE 256/***************************************************************************** Types******************************************************************************//***************************************************************************** MACROS******************************************************************************//***************************************************************************** Global Variables******************************************************************************/extern UINT8 LimitVal_VP31[VAL_RANGE * 3];// Truth table to indicate if the given mode uses motion estimationextern BOOL ModeUsesMC[MAX_MODES];// Bit reader function copied and de c++ ified from tims code typedef struct _BITREADER{ int bitsinremainder; // # of bits still used in remainder uint32 remainder; // remaining bits from original long cuchar * position; // character pointer position within data cuchar * const origin; // starting point of original data } BITREADER;typedef struct coeffNode{ int i; struct coeffNode *next;} COEFFNODE;//typedef struct PB_INSTANCE * xPB_INST;typedef struct PB_INSTANCE{ //**************************************************************************************** // Bitstream input and Output Pointers //**************************************************************************************** /* Current access points fopr input and output buffers */ BITREADER br; //**************************************************************************************** // Decoder and Frame Type Information UINT8 Vp3VersionNo; BOOL MmxEnabled; BOOL XmmEnabled; BOOL WmtEnabled; int DecoderErrorCode; BOOL FramesHaveBeenSkipped; BOOL SkipYUVtoRGB; /* Skip conversion */ BOOL OutputRGB; /* Output To RGB */#if defined(POSTPROCESS) BOOL PostProcessEnabled;#endif UINT32 PostProcessingLevel; /* Perform post processing */ UINT32 ProcessorFrequency; /* CPU frequency */ UINT32 CPUFree; // Frame Info CODING_MODE CodingMode; UINT8 FrameType; UINT8 KeyFrameType; UINT32 QualitySetting; UINT32 FrameQIndex; /* Quality specified as a table index */ UINT32 ThisFrameQualityValue; /* Quality value for this frame */ UINT32 LastFrameQualityValue; /* Last Frame's Quality */ INT32 CodedBlockIndex; /* Number of Coded Blocks */ UINT32 CodedBlocksThisFrame; /* Index into coded blocks */ UINT32 FrameSize; /* The number of bytes in the frame. */ //**************************************************************************************** //**************************************************************************************** // Frame Size & Index Information CONFIG_TYPE Configuration; // frame configuration UINT32 YPlaneSize; UINT32 UVPlaneSize; UINT32 VFragments; UINT32 HFragments; UINT32 UnitFragments; UINT32 YPlaneFragments; UINT32 UVPlaneFragments; UINT32 ReconYPlaneSize; UINT32 ReconUVPlaneSize; UINT32 YDataOffset; UINT32 UDataOffset; UINT32 VDataOffset; UINT32 ReconYDataOffset; UINT32 ReconUDataOffset; UINT32 ReconVDataOffset; UINT32 YSuperBlocks; // Number of SuperBlocks in a Y frame UINT32 UVSuperBlocks; // Number of SuperBlocks in a U or V frame UINT32 SuperBlocks; // Total number of SuperBlocks in a Y,U,V frame UINT32 YSBRows; // Number of rows of SuperBlocks in a Y frame UINT32 YSBCols; // Number of cols of SuperBlocks in a Y frame UINT32 UVSBRows; // Number of rows of SuperBlocks in a U or V frame UINT32 UVSBCols; // Number of cols of SuperBlocks in a U or V frame UINT32 YMacroBlocks; // Number of Macro-Blocks in Y component UINT32 UVMacroBlocks; // Number of Macro-Blocks in U/V component UINT32 MacroBlocks; // Total number of Macro-Blocks //**************************************************************************************** //**************************************************************************************** // Frames YUV_BUFFER_ENTRY *ThisFrameRecon; YUV_BUFFER_ENTRY *GoldenFrame; YUV_BUFFER_ENTRY *LastFrameRecon; YUV_BUFFER_ENTRY *PostProcessBuffer; YUV_BUFFER_ENTRY *ScaleBuffer; /* new buffer for testing new loop filtering scheme */ UINT8 * bmp_dptr0; INT32 * BoundingValuePtr; //**************************************************************************************** //**************************************************************************************** // Fragment Information UINT32 *pixel_index_table; // start address of first pixel of fragment in source UINT32 *recon_pixel_index_table; // start address of first pixel in recon buffer UINT8 *display_fragments; // Fragment update map UINT8 *skipped_display_fragments; // whether fragment YUV Conversion and update is to be skipped INT32 *CodedBlockList; // A list of fragment indices for coded blocks. MOTION_VECTOR *FragMVect; // fragment motion vectors UINT32 *FragTokenCounts; // Number of tokens per fragment UINT32 (*TokenList)[128]; // Fragment Token Pointers#if defined(POSTPROCESS) INT32 *FragmentVariancesAlloc; INT32 *FragmentVariances; UINT32 *FragQIndex; // Fragment Quality, used in PostProcess UINT32 *FragQIndexAlloc; // Fragment Quality, used in PostProcess Q_LIST_ENTRY (*PPCoefBuffer)[64]; // PostProcess Buffer for coefficients data Q_LIST_ENTRY (*PPCoefBufferAlloc)[64]; // PostProcess Buffer for coefficients data#endif UINT8 *FragCoeffs; // # of coeffs decoded so far for fragment UINT8 *FragCoefEOB; // Position of last non 0 coef within QFragData Q_LIST_ENTRY (*QFragData)[64]; // Fragment Coefficients Array Pointers CODING_MODE *FragCodingMethod; // coding method for the fragment //**************************************************************************************** // pointers to addresses used for allocation and deallocation the others are rounded // up to the nearest 32 bytes YUV_BUFFER_ENTRY *ThisFrameReconAlloc; YUV_BUFFER_ENTRY *GoldenFrameAlloc; YUV_BUFFER_ENTRY *LastFrameReconAlloc; YUV_BUFFER_ENTRY *ScaleBufferAlloc; YUV_BUFFER_ENTRY *PostProcessBufferAlloc; UINT32 *pixel_index_tableAlloc; // start address of first pixel of fragment in source UINT32 *recon_pixel_index_tableAlloc; // start address of first pixel in recon buffer UINT8 *display_fragmentsAlloc; // Fragment update map UINT8 *skipped_display_fragmentsAlloc;// whether fragment YUV Conversion and update is to be skipped INT32 *CodedBlockListAlloc; // A list of fragment indices for coded blocks. MOTION_VECTOR *FragMVectAlloc; // fragment motion vectors UINT32 *FragTokenCountsAlloc; // Number of tokens per fragment UINT32 (*TokenListAlloc)[128]; // Fragment Token Pointers UINT8 *FragCoeffsAlloc; // # of coeffs decoded so far for fragment COEFFNODE *_Nodes; UINT32 *transIndex; // ptr to table of transposed indexes UINT8 *FragCoefEOBAlloc; // Position of last non 0 coef within QFragData Q_LIST_ENTRY (*QFragDataAlloc)[64]; // Fragment Coefficients Array Pointers CODING_MODE *FragCodingMethodAlloc; // coding method for the fragment //**************************************************************************************** //**************************************************************************************** INT32 bumpLast;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -