Hi,
I have a [pix_snap 0 0 2400 2400] 'under' a [gemframebuffer] of the same
size. I think it would make no difference if there wasn't the
[gemframebuffer] and the [gemwin] had the same size (namely 2400 by 2400).
I attach the patch I'm using, though a much simpler test patch could be
used to illustrate the question.
Now, I am observing the following:
- despite the large size of the framebuffer, even when pix_snap is
continuously receiving the gemlist, CPU consumption is low, not
significantly higher than the same patch with a smaller window size
- When I send one bang to pix_snap (by enabling the spigot above it
which immediately disables itself), so that it takes a snapshot, then
CPU consumption increases, and then it stays high forever!!!
I'm not surprised by the sudden CPU consumption increase: I'm surprised
by the fact that then it doesn't immediately go back to its previous
level: cpu consumption stays high, as if, starting from the moment the
firse snaphot is taken, pix_snapshot had to continuously process the
picture or something.
Is it normal???
I don't really understand why there should be a difference between the
cpu consumption before and after the moment the snapshot is taken. I
could understand a temporary increase _during_ the moment the snapshot
is taken.
If I disconnect the left inlet of pix_snapshot so it does not receive
the gemlist anymore, then CPU consumption drops again.
That wouldn't be that much surprising if it wasn't that after
disconnecting the inlet of pix_snap, the image is still displayed. So,
it means pix_snap does not need to "output" the image continuously (no
surprise here either), but then, what is it continuously doing when
receiving the gemlist and NOT capturing, that makes it consume CPU?? It
seems that, whatever it is, it is useless.
Is it a bug? Or is there an explanation? (well the two things are not
mutually exclusive)
--
Matteo Sisti Sette
matteosistisette@gmail.com
http://www.matteosistisette.com
#N canvas 9 18 1246 745 12;
#X obj 788 659 gemwin;
#X msg 740 558 dimen 800 600 , create , 1;
#X msg 796 608 destroy;
#X obj 100 194 gemframebuffer;
#X obj 166 114 loadbang;
#X obj 99 292 t a a a a;
#X obj 99 251 translateXYZ 0 0 -4;
#X obj 661 540 separator;
#X obj 596 680 pix_texture;
#X obj 596 716 square 4 4;
#X obj 351 458 separator;
#X obj 349 503 t a b;
#X obj 386 539 spigot;
#X obj 383 572 t b b;
#X obj 432 510 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X msg 472 547 0;
#X obj 344 693 pix_texture;
#X obj 408 391 s mainchain;
#X obj 140 366 separator;
#X obj 160 448 spigot;
#X obj 210 425 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X msg 250 462 0;
#X obj 126 548 t a b;
#X obj 126 621 t b a;
#X obj 45 491 loadbang;
#X msg 19 519 file aaa 95;
#X obj 42 18 gemhead 50;
#X obj 1092 507 gemhead 52;
#X obj 1101 667 pix_texture;
#X obj 1095 707 square 4 4;
#X obj 1044 137 r mainchain;
#X obj 1043 206 pix_video;
#X obj 1040 236 pix_info ----------;
#X obj 1079 293 -;
#X obj 1078 324 / 2;
#X obj 1038 359 pix_crop;
#X obj 1044 170 separator;
#X obj 1036 386 pix_texture;
#X obj 1121 423 s videotexture;
#X obj 378 13 r mainchain;
#X obj 381 66 separator;
#X obj 379 93 pix_texture;
#X obj 460 60 r videotexture;
#X obj 607 8 r mainchain;
#X obj 617 71 separator;
#X obj 618 101 pix_texture;
#X obj 699 68 r videotexture;
#X obj 354 193 r mainchain;
#X obj 354 252 separator;
#X obj 355 273 pix_texture;
#X obj 436 240 r videotexture;
#X obj 593 201 r mainchain;
#X obj 592 255 separator;
#X obj 594 281 pix_texture;
#X obj 675 248 r videotexture;
#X obj 337 350 square 2 2;
#X obj 361 140 translateXYZ -2 -2 0;
#X obj 600 148 translateXYZ 2 -2 0;
#X obj 337 320 translateXYZ -2 2 0;
#X obj 576 328 translateXYZ 2 2 0;
#X obj 360 167 square 2 2;
#X obj 601 177 square 2 2;
#X obj 576 356 square 2 2;
#X obj 349 43 spigot;
#X obj 326 5 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
;
#X obj 616 43 spigot;
#X obj 718 1 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
;
#X obj 358 224 spigot;
#X obj 460 188 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 608 232 spigot;
#X obj 710 196 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 161 487 t a b;
#X obj 41 45 t a a;
#X obj 101 91 spigot;
#X obj 13 172 spigot;
#X obj 153 15 r recmode;
#X obj 35 123 * -1;
#X obj 34 147 + 1;
#X obj 1090 588 spigot;
#X obj 1112 557 r recmode;
#X obj 970 435 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X obj 970 455 s recmode;
#X msg 166 143 dimen 2400 2400;
#X obj 126 589 pix_snap 0 0 2400 2400;
#X obj 128 649 pix_write 0 0 2400 2400;
#X obj 918 371 loadbang;
#X msg 920 404 1;
#X obj 346 663 pix_snap 0 0 2400 2400;
#X obj 544 420 r recmode;
#X obj 545 447 select 1 0;
#X msg 511 484 2400 2400;
#X msg 478 487 0 0;
#X msg 563 536 600 600;
#X msg 508 537 100 0;
#X text 944 558 <- 1)HERE;
#X text 742 -2 <- 2) any of these 4 , or all;
#X text 457 504 <- 3) TAKE THE PICTURE: observe cpu increase;
#X text 740 13 <- 4) (opt) turn them off if you want to see the snapshot
;
#X text 352 608 <- 5) if you disconnect this , CPU consumption drops
;
#X text 393 625 but the image is still displayed;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 6 0;
#X connect 3 1 28 1;
#X connect 4 0 82 0;
#X connect 5 0 18 0;
#X connect 5 1 10 0;
#X connect 5 2 17 0;
#X connect 5 3 7 0;
#X connect 6 0 5 0;
#X connect 7 0 8 0;
#X connect 8 0 9 0;
#X connect 10 0 11 0;
#X connect 11 0 87 0;
#X connect 11 1 12 0;
#X connect 12 0 13 0;
#X connect 13 0 87 0;
#X connect 13 1 15 0;
#X connect 14 0 12 1;
#X connect 15 0 14 0;
#X connect 16 1 8 1;
#X connect 18 0 19 0;
#X connect 19 0 71 0;
#X connect 20 0 19 1;
#X connect 21 0 20 0;
#X connect 22 0 83 0;
#X connect 22 1 83 0;
#X connect 23 0 84 0;
#X connect 23 1 84 0;
#X connect 24 0 25 0;
#X connect 25 0 84 0;
#X connect 26 0 72 0;
#X connect 27 0 78 0;
#X connect 28 0 29 0;
#X connect 30 0 36 0;
#X connect 31 0 32 0;
#X connect 32 0 35 0;
#X connect 32 1 33 0;
#X connect 32 2 33 1;
#X connect 32 2 35 1;
#X connect 32 2 35 2;
#X connect 33 0 34 0;
#X connect 34 0 35 3;
#X connect 35 0 37 0;
#X connect 36 0 31 0;
#X connect 37 1 38 0;
#X connect 39 0 63 0;
#X connect 40 0 41 0;
#X connect 41 0 56 0;
#X connect 42 0 41 1;
#X connect 43 0 65 0;
#X connect 44 0 45 0;
#X connect 45 0 57 0;
#X connect 46 0 45 1;
#X connect 47 0 67 0;
#X connect 48 0 49 0;
#X connect 49 0 58 0;
#X connect 50 0 49 1;
#X connect 51 0 69 0;
#X connect 52 0 53 0;
#X connect 53 0 59 0;
#X connect 54 0 53 1;
#X connect 56 0 60 0;
#X connect 57 0 61 0;
#X connect 58 0 55 0;
#X connect 59 0 62 0;
#X connect 63 0 40 0;
#X connect 64 0 63 1;
#X connect 65 0 44 0;
#X connect 66 0 65 1;
#X connect 67 0 48 0;
#X connect 68 0 67 1;
#X connect 69 0 52 0;
#X connect 70 0 69 1;
#X connect 71 0 22 0;
#X connect 71 1 21 0;
#X connect 72 0 74 0;
#X connect 72 1 73 0;
#X connect 73 0 3 0;
#X connect 74 0 5 0;
#X connect 75 0 73 1;
#X connect 75 0 76 0;
#X connect 76 0 77 0;
#X connect 77 0 74 1;
#X connect 78 0 28 0;
#X connect 79 0 78 1;
#X connect 80 0 81 0;
#X connect 82 0 3 0;
#X connect 83 0 23 0;
#X connect 85 0 86 0;
#X connect 86 0 80 0;
#X connect 87 0 16 0;
#X connect 88 0 89 0;
#X connect 89 0 90 0;
#X connect 89 0 91 0;
#X connect 89 1 92 0;
#X connect 89 1 93 0;
#X connect 90 0 87 2;
#X connect 91 0 87 1;
#X connect 92 0 87 2;
#X connect 93 0 87 1;