Lines Matching refs:runlength
33 void _DEMOComputeRunlengths(u32 cols, DEMOColor *pixelrow, s32 *runlength);
39 void _DEMOComputeRunlengths(u32 cols, DEMOColor *pixelrow, s32 *runlength) in _DEMOComputeRunlengths() argument
45 runlength[col] = 0; in _DEMOComputeRunlengths()
58 runlength[start] = col - start; in _DEMOComputeRunlengths()
64 if (runlength[col] == 1) in _DEMOComputeRunlengths()
69 (runlength[col] == 1) ) in _DEMOComputeRunlengths()
71 runlength[col] = 0; in _DEMOComputeRunlengths()
74 runlength[start] = - ( col - start ); in _DEMOComputeRunlengths()
76 col += runlength[col]; in _DEMOComputeRunlengths()
184 s32* runlength; in _DEMOEncodeTGA() local
219 runlength = DEMOAlloc(sizeof(s32)*cols); in _DEMOEncodeTGA()
220 DEMOAssert(runlength && "DEMOAlloc failed"); in _DEMOEncodeTGA()
226 _DEMOComputeRunlengths( cols, &buffer[realrow * pitch], runlength ); in _DEMOEncodeTGA()
228 if( runlength[col] > 0 ){ in _DEMOEncodeTGA()
230 pbuffer[byte] = (u8)(0x80 + runlength[col] - 1); byte++; in _DEMOEncodeTGA()
237 col += runlength[col]; in _DEMOEncodeTGA()
238 }else if( runlength[col] < 0 ){ in _DEMOEncodeTGA()
240 pbuffer[byte] = (u8)(- runlength[col] - 1); byte++; in _DEMOEncodeTGA()
243 for ( i = 0; i < - runlength[col]; ++i ) in _DEMOEncodeTGA()
250 col += -runlength[col]; in _DEMOEncodeTGA()
256 DEMOFree(runlength); in _DEMOEncodeTGA()