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

Function CopyFrom2Columns

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

Source from the content-addressed store, hash-verified

1281
1282
1283static void
1284CopyFrom2Columns( const uchar* _src, size_t src_step,
1285 uchar* _dst0, uchar* _dst1,
1286 int len, size_t elem_size )
1287{
1288 int i, t0, t1;
1289 const int* src = (const int*)_src;
1290 int* dst0 = (int*)_dst0;
1291 int* dst1 = (int*)_dst1;
1292 src_step /= sizeof(src[0]);
1293
1294 if( elem_size == sizeof(int) )
1295 {
1296 for( i = 0; i < len; i++, src += src_step )
1297 {
1298 t0 = src[0]; t1 = src[1];
1299 dst0[i] = t0; dst1[i] = t1;
1300 }
1301 }
1302 else if( elem_size == sizeof(int)*2 )
1303 {
1304 for( i = 0; i < len*2; i += 2, src += src_step )
1305 {
1306 t0 = src[0]; t1 = src[1];
1307 dst0[i] = t0; dst0[i+1] = t1;
1308 t0 = src[2]; t1 = src[3];
1309 dst1[i] = t0; dst1[i+1] = t1;
1310 }
1311 }
1312 else if( elem_size == sizeof(int)*4 )
1313 {
1314 for( i = 0; i < len*4; i += 4, src += src_step )
1315 {
1316 t0 = src[0]; t1 = src[1];
1317 dst0[i] = t0; dst0[i+1] = t1;
1318 t0 = src[2]; t1 = src[3];
1319 dst0[i+2] = t0; dst0[i+3] = t1;
1320 t0 = src[4]; t1 = src[5];
1321 dst1[i] = t0; dst1[i+1] = t1;
1322 t0 = src[6]; t1 = src[7];
1323 dst1[i+2] = t0; dst1[i+3] = t1;
1324 }
1325 }
1326}
1327
1328
1329static void

Callers 1

dftMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected