Speedup track preview widget for byte images

This gives a huge speedup gain for cases when you've got
rather huge markers on a byte images.

Done by skipping IMB_float_from_rect()/IMB_rect_from_float()
for such cases. We can sample the buffers without color space
conversion.
This commit is contained in:
2014-04-10 21:14:36 +06:00
parent 5d63f162d5
commit df63e8fd93
6 changed files with 112 additions and 37 deletions

View File

@@ -1522,9 +1522,9 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wc
IMB_freeImBuf(scopes->track_preview);
tmpibuf = BKE_tracking_sample_pattern(scopes->frame_width, scopes->frame_height,
scopes->track_search, scopes->track,
&scopes->undist_marker, true, scopes->use_track_mask,
width, height, scopes->track_pos);
scopes->track_search, scopes->track,
&scopes->undist_marker, true, scopes->use_track_mask,
width, height, scopes->track_pos);
if (tmpibuf) {
if (tmpibuf->rect_float)