codec_internal.h
来自「mediastreamer2是开源的网络传输媒体流的库」· C头文件 代码 · 共 845 行 · 第 1/3 页
H
845 行
unsigned char LoopFilterLimitValues[Q_TABLE_SIZE];} codec_setup_info;/** Decoder (Playback) instance -- installed in a theora_state */typedef struct PB_INSTANCE { oggpack_buffer *opb; theora_info info; /* how far do we shift the granulepos to seperate out P frame counts? */ int keyframe_granule_shift; /***********************************************************************/ /* Decoder and Frame Type Information */ int DecoderErrorCode; int FramesHaveBeenSkipped; int PostProcessEnabled; ogg_uint32_t PostProcessingLevel; /* Perform post processing */ /* Frame Info */ CODING_MODE CodingMode; unsigned char FrameType; unsigned char KeyFrameType; ogg_uint32_t QualitySetting; ogg_uint32_t FrameQIndex; /* Quality specified as a table index */ ogg_uint32_t ThisFrameQualityValue; /* Quality value for this frame */ ogg_uint32_t LastFrameQualityValue; /* Last Frame's Quality */ ogg_int32_t CodedBlockIndex; /* Number of Coded Blocks */ ogg_uint32_t CodedBlocksThisFrame; /* Index into coded blocks */ ogg_uint32_t FrameSize; /* The number of bytes in the frame. */ /**********************************************************************/ /* Frame Size & Index Information */ ogg_uint32_t YPlaneSize; ogg_uint32_t UVPlaneSize; ogg_uint32_t YStride; ogg_uint32_t UVStride; ogg_uint32_t VFragments; ogg_uint32_t HFragments; ogg_uint32_t UnitFragments; ogg_uint32_t YPlaneFragments; ogg_uint32_t UVPlaneFragments; ogg_uint32_t ReconYPlaneSize; ogg_uint32_t ReconUVPlaneSize; ogg_uint32_t YDataOffset; ogg_uint32_t UDataOffset; ogg_uint32_t VDataOffset; ogg_uint32_t ReconYDataOffset; ogg_uint32_t ReconUDataOffset; ogg_uint32_t ReconVDataOffset; ogg_uint32_t YSuperBlocks; /* Number of SuperBlocks in a Y frame */ ogg_uint32_t UVSuperBlocks; /* Number of SuperBlocks in a U or V frame */ ogg_uint32_t SuperBlocks; /* Total number of SuperBlocks in a Y,U,V frame */ ogg_uint32_t YSBRows; /* Number of rows of SuperBlocks in a Y frame */ ogg_uint32_t YSBCols; /* Number of cols of SuperBlocks in a Y frame */ ogg_uint32_t UVSBRows; /* Number of rows of SuperBlocks in a U or V frame */ ogg_uint32_t UVSBCols; /* Number of cols of SuperBlocks in a U or V frame */ ogg_uint32_t YMacroBlocks; /* Number of Macro-Blocks in Y component */ ogg_uint32_t UVMacroBlocks; /* Number of Macro-Blocks in U/V component */ ogg_uint32_t MacroBlocks; /* Total number of Macro-Blocks */ /**********************************************************************/ /* Frames */ YUV_BUFFER_ENTRY *ThisFrameRecon; YUV_BUFFER_ENTRY *GoldenFrame; YUV_BUFFER_ENTRY *LastFrameRecon; YUV_BUFFER_ENTRY *PostProcessBuffer; /**********************************************************************/ /* Fragment Information */ ogg_uint32_t *pixel_index_table; /* start address of first pixel of fragment in source */ ogg_uint32_t *recon_pixel_index_table; /* start address of first pixel in recon buffer */ unsigned char *display_fragments; /* Fragment update map */ unsigned char *skipped_display_fragments;/* whether fragment YUV Conversion and update is to be skipped */ ogg_int32_t *CodedBlockList; /* A list of fragment indices for coded blocks. */ MOTION_VECTOR *FragMVect; /* fragment motion vectors */ ogg_uint32_t *FragTokenCounts; /* Number of tokens per fragment */ ogg_uint32_t (*TokenList)[128]; /* Fragment Token Pointers */ ogg_int32_t *FragmentVariances; ogg_uint32_t *FragQIndex; /* Fragment Quality used in PostProcess */ Q_LIST_ENTRY (*PPCoefBuffer)[64]; /* PostProcess Buffer for coefficients data */ unsigned char *FragCoeffs; /* # of coeffs decoded so far for fragment */ unsigned char *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 */ COEFFNODE *_Nodes; ogg_uint32_t *transIndex; /* ptr to table of transposed indexes */ /***********************************************************************/ ogg_int32_t bumpLast; /* Macro Block and SuperBlock Information */ ogg_int32_t (*BlockMap)[4][4]; /* super block + sub macro block + sub frag -> FragIndex */ /* Coded flag arrays and counters for them */ unsigned char *SBCodedFlags; unsigned char *SBFullyFlags; unsigned char *MBCodedFlags; unsigned char *MBFullyFlags; /**********************************************************************/ ogg_uint32_t EOB_Run; COORDINATE *FragCoordinates; MOTION_VECTOR MVector; ogg_int32_t ReconPtr2Offset; /* Offset for second reconstruction in half pixel MC */ Q_LIST_ENTRY *quantized_list; ogg_int16_t *ReconDataBuffer; Q_LIST_ENTRY InvLastIntraDC; Q_LIST_ENTRY InvLastInterDC; Q_LIST_ENTRY LastIntraDC; Q_LIST_ENTRY LastInterDC; ogg_uint32_t BlocksToDecode; /* Blocks to be decoded this frame */ ogg_uint32_t DcHuffChoice; /* Huffman table selection variables */ unsigned char ACHuffChoice; ogg_uint32_t QuadMBListIndex; ogg_int32_t ByteCount; ogg_uint32_t bit_pattern; unsigned char bits_so_far; unsigned char NextBit; ogg_int32_t BitsLeft; ogg_int16_t *DequantBuffer; ogg_int32_t fp_quant_InterUV_coeffs[64]; ogg_int32_t fp_quant_InterUV_round[64]; ogg_int32_t fp_ZeroBinSize_InterUV[64]; ogg_int16_t *TmpReconBuffer; ogg_int16_t *TmpDataBuffer; /* Loop filter bounding values */ unsigned char LoopFilterLimits[Q_TABLE_SIZE]; ogg_int32_t FiltBoundingValue[512]; /* Dequantiser and rounding tables */ ogg_uint32_t QThreshTable[Q_TABLE_SIZE]; Q_LIST_ENTRY DcScaleFactorTable[Q_TABLE_SIZE]; Q_LIST_ENTRY Y_coeffs[64]; Q_LIST_ENTRY U_coeffs[64]; Q_LIST_ENTRY V_coeffs[64]; Q_LIST_ENTRY InterY_coeffs[64]; Q_LIST_ENTRY InterU_coeffs[64]; Q_LIST_ENTRY InterV_coeffs[64]; Q_LIST_ENTRY *dequant_Y_coeffs; Q_LIST_ENTRY *dequant_U_coeffs; Q_LIST_ENTRY *dequant_V_coeffs; Q_LIST_ENTRY *dequant_InterY_coeffs; Q_LIST_ENTRY *dequant_InterU_coeffs; Q_LIST_ENTRY *dequant_InterV_coeffs; Q_LIST_ENTRY *dequant_coeffs; /* currently active quantizer */ unsigned int zigzag_index[64]; ogg_int32_t quant_Y_coeffs[64]; ogg_int32_t quant_UV_coeffs[64]; ogg_int32_t fp_quant_Y_coeffs[64]; /* used in reiniting quantizers */ HUFF_ENTRY *HuffRoot_VP3x[NUM_HUFF_TABLES]; ogg_uint32_t *HuffCodeArray_VP3x[NUM_HUFF_TABLES]; unsigned char *HuffCodeLengthArray_VP3x[NUM_HUFF_TABLES]; const unsigned char *ExtraBitLengths_VP3x; /* Quantiser and rounding tables */ ogg_int32_t fp_quant_UV_coeffs[64]; ogg_int32_t fp_quant_Inter_coeffs[64]; ogg_int32_t fp_quant_Y_round[64]; ogg_int32_t fp_quant_UV_round[64]; ogg_int32_t fp_quant_Inter_round[64]; ogg_int32_t fp_ZeroBinSize_Y[64]; ogg_int32_t fp_ZeroBinSize_UV[64]; ogg_int32_t fp_ZeroBinSize_Inter[64]; ogg_int32_t *fquant_coeffs; ogg_int32_t *fquant_round; ogg_int32_t *fquant_ZbSize; /* Predictor used in choosing entropy table for decoding block patterns. */ unsigned char BlockPatternPredictor; short Modifier[4][512]; short *ModifierPointer[4]; unsigned char *DataOutputInPtr; DspFunctions dsp; /* Selected functions for this platform */} PB_INSTANCE;/* Encoder (Compressor) instance -- installed in a theora_state */typedef struct CP_INSTANCE { /* Compressor Configuration */ SCAN_CONFIG_DATA ScanConfig; CONFIG_TYPE2 Configuration; int GoldenFrameEnabled; int InterPrediction; int MotionCompensation; ogg_uint32_t LastKeyFrame ; ogg_int32_t DropCount ; ogg_int32_t MaxConsDroppedFrames ; ogg_int32_t DropFrameTriggerBytes; int DropFrameCandidate; /* Compressor Statistics */ double TotErrScore; ogg_int64_t KeyFrameCount; /* Count of key frames. */ ogg_int64_t TotKeyFrameBytes; ogg_uint32_t LastKeyFrameSize; ogg_uint32_t PriorKeyFrameSize[KEY_FRAME_CONTEXT]; ogg_uint32_t PriorKeyFrameDistance[KEY_FRAME_CONTEXT]; ogg_int32_t FrameQuality[6]; int DecoderErrorCode; /* Decoder error flag. */ ogg_int32_t ThreshMapThreshold; ogg_int32_t TotalMotionScore; ogg_int64_t TotalByteCount; ogg_int32_t FixedQ; /* Frame Statistics */ signed char InterCodeCount; ogg_int64_t CurrentFrame; ogg_int64_t CarryOver ; ogg_uint32_t LastFrameSize; ogg_uint32_t FrameBitCount; int ThisIsFirstFrame; int ThisIsKeyFrame; ogg_int32_t MotionScore; ogg_uint32_t RegulationBlocks; ogg_int32_t RecoveryMotionScore; int RecoveryBlocksAdded ; double ProportionRecBlocks; double MaxRecFactor ; /* Rate Targeting variables. */ ogg_uint32_t ThisFrameTargetBytes; double BpbCorrectionFactor; /* Up regulation variables */ ogg_uint32_t FinalPassLastPos; /* Used to regulate a final unrestricted high quality pass. */ ogg_uint32_t LastEndSB; /* Where we were in the loop last time. */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?