--- the verify functions
| 45 | |
| 46 | //--- the verify functions |
| 47 | static int verify_subimage( unsigned char *src, unsigned char *dst, size_t srcx, size_t srcy, |
| 48 | size_t dstx, size_t dsty, size_t subw, size_t subh, size_t pitch, size_t element_pitch ) |
| 49 | { |
| 50 | size_t i, j, k; |
| 51 | size_t srcj, dstj; |
| 52 | size_t srcLoc, dstLoc; |
| 53 | |
| 54 | for( j = 0; j < subh; j++ ){ |
| 55 | srcj = ( j + srcy ) * pitch * element_pitch; |
| 56 | dstj = ( j + dsty ) * pitch * element_pitch; |
| 57 | for( i = 0; i < subw; i++ ){ |
| 58 | srcLoc = srcj + ( i + srcx ) * element_pitch; |
| 59 | dstLoc = dstj + ( i + dstx ) * element_pitch; |
| 60 | for( k = 0; k < element_pitch; k++ ){ // test each channel |
| 61 | if( src[srcLoc+k] != dst[dstLoc+k] ){ |
| 62 | return -1; |
| 63 | } |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | return 0; |
| 69 | } |
| 70 | |
| 71 | |
| 72 | static int verify_copy_array( int *inptr, int *outptr, int n ) |
no outgoing calls
no test coverage detected