MCPcopy Create free account
hub / github.com/creatale/node-dv / CopyTo2Columns

Function CopyTo2Columns

deps/opencv/modules/core/src/dxt.cpp:1329–1372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1327
1328
1329static void
1330CopyTo2Columns( const uchar* _src0, const uchar* _src1,
1331 uchar* _dst, size_t dst_step,
1332 int len, size_t elem_size )
1333{
1334 int i, t0, t1;
1335 const int* src0 = (const int*)_src0;
1336 const int* src1 = (const int*)_src1;
1337 int* dst = (int*)_dst;
1338 dst_step /= sizeof(dst[0]);
1339
1340 if( elem_size == sizeof(int) )
1341 {
1342 for( i = 0; i < len; i++, dst += dst_step )
1343 {
1344 t0 = src0[i]; t1 = src1[i];
1345 dst[0] = t0; dst[1] = t1;
1346 }
1347 }
1348 else if( elem_size == sizeof(int)*2 )
1349 {
1350 for( i = 0; i < len*2; i += 2, dst += dst_step )
1351 {
1352 t0 = src0[i]; t1 = src0[i+1];
1353 dst[0] = t0; dst[1] = t1;
1354 t0 = src1[i]; t1 = src1[i+1];
1355 dst[2] = t0; dst[3] = t1;
1356 }
1357 }
1358 else if( elem_size == sizeof(int)*4 )
1359 {
1360 for( i = 0; i < len*4; i += 4, dst += dst_step )
1361 {
1362 t0 = src0[i]; t1 = src0[i+1];
1363 dst[0] = t0; dst[1] = t1;
1364 t0 = src0[i+2]; t1 = src0[i+3];
1365 dst[2] = t0; dst[3] = t1;
1366 t0 = src1[i]; t1 = src1[i+1];
1367 dst[4] = t0; dst[5] = t1;
1368 t0 = src1[i+2]; t1 = src1[i+3];
1369 dst[6] = t0; dst[7] = t1;
1370 }
1371 }
1372}
1373
1374
1375static void

Callers 1

dftMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected