Embedded/common/src/b_BitFeatureEm/LocalScanner.c
/** downscales work image by factor 2 */
downscales work image by factor 2
downscales work image by factor 2
void bbf_LocalScanner_downscale1( struct bbs_Context* cpA, struct bbf_LocalScanner* ptrA )
{
	int32 w0L = ptrA->workWidthE;
	int32 h0L = ptrA->workHeightE;
	int32 w1L = w0L >> 1;
	int32 h1L = h0L >> 1;
    uint8* arrL = ptrA->workImageBufferE.arrPtrE;
	int32 iL, jL;
	int32 kL = 0;
	for( jL = 0; jL < h1L; jL++ )
	{
		for( iL = 0; iL < w1L; iL++ )
		{
			int32 idxL = jL * 2 * w0L + iL * 2;
			arrL[ kL++ ] = ( ( uint32 )arrL[ idxL ] + 
									   arrL[ idxL + 1 ] + 
									   arrL[ idxL + w0L ] + 
									   arrL[ idxL + w0L + 1 ] + 2 ) >> 2;
		}
	}
	ptrA->workWidthE = w1L;
	ptrA->workHeightE = h1L;
}
void bbf_LocalScanner_downscale1 ( struct bbs_Context * cpA , struct bbf_LocalScanner * ptrA ) { int32 w0L = ptrA -> workWidthE ; int32 h0L = ptrA -> workHeightE ; int32 w1L = w0L >> 1 ; int32 h1L = h0L >> 1 ; uint8 * arrL = ptrA -> workImageBufferE . arrPtrE ; int32 iL , jL ; int32 kL = 0 ; for ( jL = 0 ; jL < h1L ; jL ++ ) { for ( iL = 0 ; iL < w1L ; iL ++ ) { int32 idxL = jL * 2 * w0L + iL * 2 ; arrL [ kL ++ ] = ( ( uint32 ) arrL [ idxL ] + arrL [ idxL + 1 ] + arrL [ idxL + w0L ] + arrL [ idxL + w0L + 1 ] + 2 ) >> 2 ; } } ptrA -> workWidthE = w1L ; ptrA -> workHeightE = h1L ; }
downscales work image by factor 2
downscales work image by factor 2