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

📄 emd_histogram_upper_envelope.c

📁 ZPAV (H265) PC(X86) demo ZPAV (H265) 是 音视频 压缩解压 协议
💻 C
字号:

/*
///////////////////////////////////////////////////////////////////////////////
//                                                                           //
//   Copyright (C) 2006-2008  Beijing,  pengzhen (pengzhenxp@yahoo.com.cn)   //
//                                                                           //
///////////////////////////////////////////////////////////////////////////////
*/

static inline void get_upper_histogram( HistogramContext* hist )
{

	UINT *hist_upper = (UINT*)hist->m_pUpper ; 
	UINT *hist_data  = (UINT*)hist->m_pHistogram  ; 
	UINT *hist_pos = (UINT*)hist->m_pHistogramPos  ;

	int i , n ; 

	UINT histogram_tm[HISTTOGRAM_COUNT] ; 
	UINT histogram_id[HISTTOGRAM_COUNT] ; 
	
	UINT *hist_tm = histogram_tm ; 
	UINT *hist_id = histogram_id ; 

	//memset( hist_upper, 0, HISTTOGRAM_COUNT*4 );
	memcpy( hist_upper, hist_data, HISTTOGRAM_COUNT*4 );

	n = 0 ; 
	i = 1 ;
	hist_data ++ ; 
	while( i<HISTTOGRAM_COUNT-1 )
	{
		if( (*hist_data >= *(hist_data-1)) & 
			(*hist_data >= *(hist_data+1)) )
		{
			*hist_tm = *hist_data ; hist_tm ++ ;  
			*hist_id =  i ;         hist_id ++ ;  n ++;

		}

		hist_data ++ ;  i++ ;
	}

	hist->m_UpperCount = n ; 

	hist_tm = histogram_tm ; 
	hist_id = histogram_id ; 

	cubic_interpolation( (INT*)hist_pos, (INT*)hist_upper, (INT*)histogram_id, (INT*)histogram_tm, n ) ; 

}




⌨️ 快捷键说明

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