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

📄 dct_decode.c

📁 魔兽2Linux版
💻 C
📖 第 1 页 / 共 5 页
字号:
				{					pbi->FilterHoriz(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) + 6 ], LineLength, BoundingValuePtr);				}								// Bottom done if next row set				if( !pbi->display_fragments[ i + LineFragments] )				{					pbi->FilterVert(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i + LineFragments) ], LineLength, BoundingValuePtr);				}											} // if( pbi->display_fragments[i])					} // for ( n = 1 ; n < FragsAcross - 1 ; n++, i++)				//******************************************************************		// Last Column		if( pbi->display_fragments[i])		{			// Filter Left edge always			pbi->FilterHoriz(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) - 2 ], LineLength, BoundingValuePtr);						// Bottom done if next row set			if( !pbi->display_fragments[ i + LineFragments] )			{				pbi->FilterVert(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i + LineFragments) ], LineLength, BoundingValuePtr);			}					} // if( pbi->display_fragments[i])				i++; // next i		//****************************************************************************************************************		// Middle Rows		//****************************************************************************************************************		for ( m = 1 ; m < FragsDown-1 ; m++)		{			//******************************************************************			// first column conditions						// only do 2 prediction if fragment coded and on non intra or if all fragments are intra 			if( pbi->display_fragments[i])			{				// TopRow is always done				pbi->FilterVert(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) ], LineLength, BoundingValuePtr);				// Filter right hand border only if the block to the right is not coded				if ( !pbi->display_fragments[ i + 1 ] )				{					pbi->FilterHoriz(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) + 6 ], LineLength, BoundingValuePtr);				}				// Bottom done if next row set				if( !pbi->display_fragments[ i + LineFragments] )				{					pbi->FilterVert(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i + LineFragments) ], LineLength, BoundingValuePtr);				}							} // if( pbi->display_fragments[i])			i++; // next i			//******************************************************************			// middle columns 			for ( n = 1 ; n < FragsAcross - 1 ; n++, i++)			{				if( pbi->display_fragments[i])				{					// Filter Left edge always					pbi->FilterHoriz(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) - 2 ], LineLength, BoundingValuePtr);					// TopRow is always done					pbi->FilterVert(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) ], LineLength, BoundingValuePtr);					// Filter right hand border only if the block to the right is not coded					if ( !pbi->display_fragments[ i + 1 ] )					{						pbi->FilterHoriz(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) + 6 ], LineLength, BoundingValuePtr);					}					// Bottom done if next row set					if( !pbi->display_fragments[ i + LineFragments] )					{						pbi->FilterVert(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i + LineFragments) ], LineLength, BoundingValuePtr);					}														} // if( pbi->display_fragments[i])			} // for ( n = 1 ; n < FragsAcross - 1 ; n++, i++)			//******************************************************************			// Last Column			if( pbi->display_fragments[i])			{				// Filter Left edge always				pbi->FilterHoriz(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) - 2 ], LineLength, BoundingValuePtr);								// TopRow is always done				pbi->FilterVert(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) ], LineLength, BoundingValuePtr);								// Bottom done if next row set				if( !pbi->display_fragments[ i + LineFragments] )				{					pbi->FilterVert(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i + LineFragments) ], LineLength, BoundingValuePtr);				}			} // if( pbi->display_fragments[i])			i++; // next i		} // for ( m = 0 ; m < FragsDown ; m++)	} // for ( j = 0; j < 3 ; j++)			//****************************************************************************************************************	// Last Row 	//****************************************************************************************************************		//******************************************************************	// first column conditions		// only do 2 prediction if fragment coded and on non intra or if all fragments are intra 	if( pbi->display_fragments[i])	{				// TopRow is always done		pbi->FilterVert(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) ], LineLength, BoundingValuePtr);				// Filter right hand border only if the block to the right is not coded		if ( !pbi->display_fragments[ i + 1 ] )		{			pbi->FilterHoriz(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) + 6 ], LineLength, BoundingValuePtr);		}			} // if( pbi->display_fragments[i])		i++; // next i		//******************************************************************	// middle columns 	for ( n = 1 ; n < FragsAcross - 1 ; n++, i++)	{		if( pbi->display_fragments[i])		{			// Filter Left edge always			pbi->FilterHoriz(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) - 2 ], LineLength, BoundingValuePtr);						// TopRow is always done			pbi->FilterVert(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) ], LineLength, BoundingValuePtr);						// Filter right hand border only if the block to the right is not coded			if ( !pbi->display_fragments[ i + 1 ] )			{				pbi->FilterHoriz(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) + 6 ], LineLength, BoundingValuePtr);			}					} // if( pbi->display_fragments[i])			} // for ( n = 1 ; n < FragsAcross - 1 ; n++, i++)		//******************************************************************	// Last Column	if( pbi->display_fragments[i])	{		// Filter Left edge always		pbi->FilterHoriz(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) - 2 ], LineLength, BoundingValuePtr);				// TopRow is always done		pbi->FilterVert(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) ], LineLength, BoundingValuePtr);			} // if( pbi->display_fragments[i])		i++; // next i	}/**************************************************************************** *  *  ROUTINE       :     LoopFilter * *  INPUTS        :     None *                                *  OUTPUTS       :     None * *  RETURNS       :     None * *  FUNCTION      :     Applies a loop filter to the edge pixels of coded blocks. * *  SPECIAL NOTES :      * * *  ERRORS        :     None. * ****************************************************************************/void LoopFilter(PB_INSTANCE *pbi){    INT32 i;    INT32 * BoundingValuePtr;    //UINT8 * LimitTable = &LimitVal_VP31[VAL_RANGE];	int FragsAcross=pbi->HFragments;		int FromFragment,ToFragment;	int FragsDown = pbi->VFragments;    INT32 LineFragments;    INT32 LineLength;    //UINT8 BlockHeight = (UINT8)pbi->Configuration.VFragPixels;    //UINT8 BlockWidth = (UINT8)pbi->Configuration.HFragPixels;    INT32 FLimit;     INT32 QIndex;	int j,m,n;	// Set the limit value for the loop filter based upon the current quantizer.    QIndex = Q_TABLE_SIZE - 1;    while ( QIndex >= 0 )    {        if ( (QIndex == 0) || ( pbi->QThreshTable[QIndex] >= pbi->ThisFrameQualityValue) )            break;        QIndex --;    }	// Encoder version specific clause	FLimit = LoopFilterLimitValuesV1[QIndex];    if ( FLimit == 0 )        return;            BoundingValuePtr = pbi->SetupBoundingValueArray(pbi, FLimit); 	for ( j = 0; j < 3 ; j++)	{		switch(j)		{		case 0: // y			FromFragment = 0;			ToFragment = pbi->YPlaneFragments;			FragsAcross = pbi->HFragments;			FragsDown = pbi->VFragments;			LineLength = pbi->Configuration.YStride;			LineFragments = pbi->HFragments;			break;		case 1: // u			FromFragment = pbi->YPlaneFragments;			ToFragment = pbi->YPlaneFragments + pbi->UVPlaneFragments ;			FragsAcross = pbi->HFragments >> 1;			FragsDown = pbi->VFragments >> 1;			LineLength = pbi->Configuration.UVStride;			LineFragments = pbi->HFragments / 2;			break;		case 2:	// v		default: // Johns: to avoid uninitialized warnings			FromFragment = pbi->YPlaneFragments + pbi->UVPlaneFragments;			ToFragment = pbi->YPlaneFragments + (2 * pbi->UVPlaneFragments) ;			FragsAcross = pbi->HFragments >> 1;			FragsDown = pbi->VFragments >> 1;			LineLength = pbi->Configuration.UVStride;			LineFragments = pbi->HFragments / 2;			break;		}		i=FromFragment;		//****************************************************************************************************************		// First Row 		//****************************************************************************************************************		//******************************************************************		// first column conditions				// only do 2 prediction if fragment coded and on non intra or if all fragments are intra 		if( pbi->display_fragments[i])		{						// Filter right hand border only if the block to the right is not coded			if ( !pbi->display_fragments[ i + 1 ] )			{				pbi->FilterHoriz(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) + 6 ], LineLength, BoundingValuePtr);			}						// Bottom done if next row set			if( !pbi->display_fragments[ i + LineFragments] )			{				pbi->FilterVert(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i + LineFragments) ], LineLength, BoundingValuePtr);			}					} // if( pbi->display_fragments[i])				i++; // next i				//******************************************************************		// middle columns 		for ( n = 1 ; n < FragsAcross - 1 ; n++, i++)		{			if( pbi->display_fragments[i])			{				// Filter Left edge always				pbi->FilterHoriz(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) - 2 ], LineLength, BoundingValuePtr);								// Filter right hand border only if the block to the right is not coded				if ( !pbi->display_fragments[ i + 1 ] )				{					pbi->FilterHoriz(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) + 6 ], LineLength, BoundingValuePtr);				}								// Bottom done if next row set				if( !pbi->display_fragments[ i + LineFragments] )				{					pbi->FilterVert(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i + LineFragments) ], LineLength, BoundingValuePtr);				}											} // if( pbi->display_fragments[i])					} // for ( n = 1 ; n < FragsAcross - 1 ; n++, i++)				//******************************************************************		// Last Column		if( pbi->display_fragments[i])		{			// Filter Left edge always			pbi->FilterHoriz(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) - 2 ], LineLength, BoundingValuePtr);						// Bottom done if next row set			if( !pbi->display_fragments[ i + LineFragments] )			{				pbi->FilterVert(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i + LineFragments) ], LineLength, BoundingValuePtr);			}					} // if( pbi->display_fragments[i])				i++; // next i		//****************************************************************************************************************		// Middle Rows		//****************************************************************************************************************		for ( m = 1 ; m < FragsDown-1 ; m++)		{			//******************************************************************			// first column conditions						// only do 2 prediction if fragment coded and on non intra or if all fragments are intra 			if( pbi->display_fragments[i])			{				// TopRow is always done				pbi->FilterVert(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) ], LineLength, BoundingValuePtr);				// Filter right hand border only if the block to the right is not coded				if ( !pbi->display_fragments[ i + 1 ] )				{					pbi->FilterHoriz(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) + 6 ], LineLength, BoundingValuePtr);				}				// Bottom done if next row set				if( !pbi->display_fragments[ i + LineFragments] )				{					pbi->FilterVert(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i + LineFragments) ], LineLength, BoundingValuePtr);				}							} // if( pbi->display_fragments[i])			i++; // next i			//******************************************************************			// middle columns 			for ( n = 1 ; n < FragsAcross - 1 ; n++, i++)			{				if( pbi->display_fragments[i])				{					// Filter Left edge always					pbi->FilterHoriz(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) - 2 ], LineLength, BoundingValuePtr);					// TopRow is always done					pbi->FilterVert(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) ], LineLength, BoundingValuePtr);					// Filter right hand border only if the block to the right is not coded					if ( !pbi->display_fragments[ i + 1 ] )					{						pbi->FilterHoriz(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i) + 6 ], LineLength, BoundingValuePtr);					}					// Bottom done if next row set					if( !pbi->display_fragments[ i + LineFragments] )					{						pbi->FilterVert(pbi, &pbi->LastFrameRecon[ ReconGetFragIndex(pbi->recon_pixel_index_table, i + LineFragments) ], LineLength, BoundingValuePtr);					}										

⌨️ 快捷键说明

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