- int x2 = x, y = (int)(center_pixel - samples[0] * scale_y / 2);
- int y2 = CLIP(y,0,y_max);
-
- for(int i=1, x_max=x+w-1; x2<x_max; i++)
- {
- int x1 = x2, y1 = y2; ++x2;
- int j = (int)(i * asset_over_session);
- y = (int)(center_pixel - samples[j] * scale_y / 2);
- y2 = CLIP(y, 0, y_max);
-
+ int y1 = center_pixel - samples[0] * scale_y / 2;
+ int y2 = CLIP(y1, 0, y_max);
+
+ for( int x0=0; x0<w; ++x0 ) {
+ int x1 = x0 + x, x2 = x1 + 1;
+ int64_t pos_project = (pixmap_x - edit_x + x2) *
+ mwindow->edl->local_session->zoom_sample + edit->startsource;
+ int64_t pos_speed = speed_autos->automation_integral(0, pos_project, PLAY_FORWARD);
+ int j = (pos_speed - start_speed) * asset_over_session;
+ CLAMP(j, 0, total_source_samples);
+ int y0 = y2;
+ y1 = center_pixel - samples[j] * scale_y / 2;
+ y2 = CLIP(y1, 0, y_max);