MCPcopy Create free account
hub / github.com/VirtualGL/virtualgl / cmpFrame

Function cmpFrame

common/frameut.cpp:533–554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

531
532
533int cmpFrame(unsigned char *buf, int width, int height, Frame &dst)
534{
535 int _i; int pitch = width * 3;
536 bool dstbu = (dst.flags & FRAME_BOTTOMUP);
537 for(int i = 0; i < height; i++)
538 {
539 _i = dstbu ? i : height - i - 1;
540 for(int j = 0; j < height; j++)
541 {
542 int r, g, b;
543 dst.pf->getRGB(&dst.bits[dst.pitch * i + j * dst.pf->size], &r, &g, &b);
544 if(dst.pf->bpc == 10)
545 {
546 r >>= 2; g >>= 2; b >>= 2;
547 }
548 if(r != buf[pitch * _i + j * 3] || g != buf[pitch * _i + j * 3 + 1]
549 || b != buf[pitch * _i + j * 3 + 2])
550 return 1;
551 }
552 }
553 return 0;
554}
555
556
557void rgbBench(char *filename)

Callers 1

rgbBenchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected