Skip to content

Instantly share code, notes, and snippets.

@moskewcz
Created August 26, 2015 22:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moskewcz/d83454b619bc9f26da48 to your computer and use it in GitHub Desktop.
Save moskewcz/d83454b619bc9f26da48 to your computer and use it in GitHub Desktop.
piggyHOG iface
// private
struct pyra_t {
// impl. note: can be c++
uint32_t get_num_levels( void ) { ... }
img_t get_level( uint32_t l ) { return levs[l]; }
};
pyra_t * new_pyra_t( uint32_t const max_w, uint32_t const max_h, ... other params ) { return new pyra_t(...); }
void del_pyra_t( pyra_t *p ) { delete p; }
void pyra_calc( pyra_t *p, img_t i ) { p->do_calc(i); }
uint32_t pyra_get_num_levels( pyra_t * ) { return p->get_num_levels(); }
img_t pyra_get_level( pyra_t *p, uint32_t l ) { return p->get_level( l ); }
// public
struct pyra_t;
pyra_t * new_pyra_t( uint32_t const max_w, uint32_t const max_h, ... other params );
void del_pyra_t( pyra_t * );
struct img_t { char * pels; uint32_t w; uint32_t h; };
void pyra_calc( pyra_t *, img_t );
uint32_t pyra_get_num_levels( pyra_t * );
img_t pyra_get_level( pyra_t *, uint32_t );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment