Home | History | Annotate | Download | only in test
      1 #ifndef IMAGE_AND_KERNEL_RSH
      2 #define IMAGE_AND_KERNEL_RSH
      3 
      4 // Image size
      5 typedef struct ImageSize {
      6   // width-by-height is the dimension of a padded image with a margin.
      7   int width;
      8   int height;
      9   // The dimension of the original unpadded image is
     10   // (width-2*margin)-by-(height-2*margin).
     11   int margin;
     12 } ImageSize_t;
     13 
     14 static void SetImageSize(int w, int h, int m, ImageSize_t *image_size) {
     15   image_size->width = w;
     16   image_size->height = h;
     17   image_size->margin = m;
     18 }
     19 
     20 // Auxiliary information that is needed to extract a kernel matrix from a buffer
     21 // of a stack of kernel matrices.
     22 typedef struct KernelInfo {
     23   // The starting position of a kernel matrix in a buffer of a stack of kernel
     24   // matrices.
     25   int offset;
     26 
     27   // The matrix is of size (2*radius_y+1)-by-(2*radius_x+1).
     28   int radius_x;
     29   int radius_y;
     30 } KernelInfo_t;
     31 
     32 #endif
     33