| 531 | |
| 532 | |
| 533 | int 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 | |
| 557 | void rgbBench(char *filename) |