Esempio n. 1
0
void IMB_rectblend_threaded(ImBuf *dbuf, ImBuf *obuf, ImBuf *sbuf,
                            unsigned short *dmask, unsigned short *curvemask,
                            unsigned short *texmask, float mask_max,
                            int destx, int desty, int origx, int origy,
                            int srcx, int srcy, int width, int height,
                            IMB_BlendMode mode, bool accumulate)
{
	if (((size_t)width) * height < 64 * 64) {
		IMB_rectblend(dbuf, obuf, sbuf, dmask, curvemask, texmask,
		              mask_max, destx,  desty, origx, origy,
		              srcx, srcy, width, height, mode, accumulate);
	}
	else {
		RectBlendThreadData data;
		data.dbuf = dbuf;
		data.obuf = obuf;
		data.sbuf = sbuf;
		data.dmask = dmask;
		data.curvemask = curvemask;
		data.texmask = texmask;
		data.mask_max = mask_max;
		data.destx = destx;
		data.desty = desty;
		data.origx = origx;
		data.origy = origy;
		data.srcx = srcx;
		data.srcy = srcy;
		data.width = width;
		data.mode = mode;
		data.accumulate = accumulate;
		IMB_processor_apply_threaded_scanlines(
		    height, rectblend_thread_do, &data);
	}
}
Esempio n. 2
0
void IMB_buffer_float_from_float_threaded(float *rect_to,
                                          const float *rect_from,
                                          int channels_from,
                                          int profile_to,
                                          int profile_from,
                                          bool predivide,
                                          int width,
                                          int height,
                                          int stride_to,
                                          int stride_from)
{
  if (((size_t)width) * height < 64 * 64) {
    IMB_buffer_float_from_float(rect_to,
                                rect_from,
                                channels_from,
                                profile_to,
                                profile_from,
                                predivide,
                                width,
                                height,
                                stride_to,
                                stride_from);
  }
  else {
    FloatToFloatThreadData data;
    data.rect_to = rect_to;
    data.rect_from = rect_from;
    data.channels_from = channels_from;
    data.profile_to = profile_to;
    data.profile_from = profile_from;
    data.predivide = predivide;
    data.width = width;
    data.stride_to = stride_to;
    data.stride_from = stride_from;
    IMB_processor_apply_threaded_scanlines(height, imb_buffer_float_from_float_thread_do, &data);
  }
}