X-Git-Url: https://cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Foverlayframe.h;h=4775e8df0004c9f5c2c529c37b779b3b31a7be0a;hb=b7f6f61e450ed50974930a07e0337f07c120f29d;hp=620f8e18e8f1ff18cb2160c07db42d4119b82893;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/overlayframe.h b/cinelerra-5.1/cinelerra/overlayframe.h index 620f8e18..4775e8df 100644 --- a/cinelerra-5.1/cinelerra/overlayframe.h +++ b/cinelerra-5.1/cinelerra/overlayframe.h @@ -32,6 +32,7 @@ #include #include #include +#include #define DIRECT_COPY 0 #define BILINEAR 1 @@ -237,7 +238,7 @@ static inline int64_t aclip(int64_t v, int mx) { return v < 0 ? 0 : v > mx ? mx : v; } static inline float aclip(float v, float mx) { - return v < 0 ? 0 : v > mx ? mx : v; + return v < -FLT_MAX+1 ? -FLT_MAX : v > FLT_MAX-1 ? FLT_MAX : v; } static inline float aclip(float v, int mx) { return v < 0 ? 0 : v > mx ? mx : v; @@ -334,7 +335,6 @@ ZTYP(float); ZTYP(double); ALPHA_STORE(out, ofs, mx); \ out[3] = aclip(a, mx) - #define BLEND_SWITCH(FN) \ switch( mode ) { \ case TRANSFER_NORMAL: FN(NORMAL); \ @@ -420,6 +420,23 @@ public: void process_package(LoadPackage *package); DirectEngine *engine; + + DirectPackage *pkg; + int ix, iy, ox, ow; + VFrame *output, *input; + int mode; + float fade; + + void rgb_float(); + void rgba_float(); + void rgb888(); + void yuv888(); + void rgba8888(); + void yuva8888(); + void rgb161616(); + void yuv161616(); + void rgba16161616(); + void yuva16161616(); }; class NNUnit : public LoadClient @@ -429,8 +446,25 @@ public: ~NNUnit(); void process_package(LoadPackage *package); - NNEngine *engine; + + NNPackage *pkg; + int ix, iy, ox, ow; + VFrame *output, *input; + int mode; + float fade; + int *ly; + + void rgb_float(); + void rgba_float(); + void rgb888(); + void yuv888(); + void rgba8888(); + void yuva8888(); + void rgb161616(); + void yuv161616(); + void rgba16161616(); + void yuva16161616(); }; class SampleUnit : public LoadClient @@ -440,8 +474,28 @@ public: ~SampleUnit(); void process_package(LoadPackage *package); - SampleEngine *engine; + + SamplePackage *pkg; + VFrame *voutput, *vinput; + int mode; + float fade; + + int i1i, i2i, o1i, o2i, oh, kd; + float i1f, i2f, o1f, o2f, *k; + int *lookup_sx0, *lookup_sx1, *lookup_sk; + float *lookup_wacc; + + void rgb_float(); + void rgba_float(); + void rgb888(); + void yuv888(); + void rgba8888(); + void yuva8888(); + void rgb161616(); + void yuv161616(); + void rgba16161616(); + void yuva16161616(); };