#include "bccmodels.h" #include "bcresources.h" #include "condition.h" #include "linklist.h" #include "mutex.h" #include "thread.h" #include "clip.h" static inline float clp(const int n, float v) { v *= ((float)(n*(1-1./0x1000000))); return v < 0 ? 0 : v >= n ? n-1 : v; } static inline float fclp(float v, const int n) { v /= ((float)(n*(1-1./0x1000000))); return v < 0 ? 0 : v > 1 ? 1 : v; } #include #define ZTYP(ty) typedef ty z_##ty __attribute__ ((__unused__)) ZTYP(int); ZTYP(float); #define xfer_flat_row_out(oty_t) \ for( unsigned i=y0; i, public Thread { public: Condition *init, *complete; Slicer(BC_Xfer *xp); ~Slicer(); void slice(BC_Xfer *xp, unsigned y0, unsigned y1); void run(); BC_Xfer *xp; int done, y0, y1; }; class SlicerList : public List, public Mutex { public: int count; Slicer *get_slicer(BC_Xfer *xp); void reset(); SlicerList(); ~SlicerList(); }; static SlicerList slicers; void init( uint8_t **output_rows, int out_colormodel, int out_x, int out_y, int out_w, int out_h, uint8_t *out_yp, uint8_t *out_up, uint8_t *out_vp, uint8_t *out_ap, int out_rowspan, uint8_t **input_rows, int in_colormodel, int in_x, int in_y, int in_w, int in_h, uint8_t *in_yp, uint8_t *in_up, uint8_t *in_vp, uint8_t *in_ap, int in_rowspan, int bg_color); // generated code concatentated here