X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fvframe.h;h=4b7d51a3052fa827201ced7ac2e0332553e53e1c;hb=66e8a774858a7bfefc565d77cde63bbc15769991;hp=da53bfdda22bdb315613238362c512b1061f2ec6;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/guicast/vframe.h b/cinelerra-5.1/guicast/vframe.h index da53bfdd..4b7d51a3 100644 --- a/cinelerra-5.1/guicast/vframe.h +++ b/cinelerra-5.1/guicast/vframe.h @@ -112,8 +112,11 @@ public: int data_size, int data_allocated); -// Write a PNG for debugging +// Write a PNG/PPM for debugging int write_png(const char *path); + static void write_ppm(VFrame *vfrm, const char *fmt, ...); + void write_ppm(const char *path) { write_ppm(this, "%s", path); } +//static int n = 0; write_ppm(vframe, "/tmp/data/f%05d", ++n); // if frame points to the same data as this return 1 int equals(VFrame *frame); @@ -180,14 +183,14 @@ public: long get_bytes_per_line(); int get_memory_type(); - - static int calculate_bytes_per_pixel(int colormodel); // Get size + 4 for assembly language static long calculate_data_size(int w, int h, int bytes_per_line = -1, int color_model = BC_RGB888); // Get size of uncompressed frame buffer without extra 4 bytes long get_data_size(); +// alloc/reset temp vframe to spec + static void get_temp(VFrame *&vfrm, int w, int h, int color_model); void rotate270(); void rotate90(); @@ -346,7 +349,7 @@ public: virtual int draw_pixel(int x, int y); int pixel_rgb, pixel_yuv, stipple; - void set_pixel_color(int rgb); + void set_pixel_color(int rgb, int a=0xff); void set_stiple(int mask); void draw_line(int x1, int y1, int x2, int y2); void draw_smooth(int x1, int y1, int x2, int y2, int x3, int y3);