Advertisement
Guest User

Untitled

a guest
Sep 30th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. width = 1024 * 1024
  2. bytes = 32 * width;
  3. p = new BYTE[ bytes ];
  4.  
  5. ID = n * width * 8 + bit;
  6. p[ID] |= ( 1 << ( ID % 8 ) );
  7.  
  8. p[ID] &= ~( 1 << ( ID % 8 ) );
  9.  
  10. num_channels = 32;
  11. labels = new INT[ num_channels ];
  12. width = 1024 * 1024; /* один МБайт */
  13. p = new BYTE[ num_channels * width ];
  14. ...
  15. for( lbl = 0 ; lbl < num_labels ; ++lbl ){
  16. for( i = 0 ; i < num_channels ; ++i ){
  17. if( labels[i] == lbl ){
  18. set_label_array( lbl, p + i * width );
  19. }
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement