diff options
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_scopes.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_scopes.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_scopes.c b/source/blender/editors/space_sequencer/sequencer_scopes.c index 8c57089f7ab..00811d68251 100644 --- a/source/blender/editors/space_sequencer/sequencer_scopes.c +++ b/source/blender/editors/space_sequencer/sequencer_scopes.c @@ -160,7 +160,7 @@ static ImBuf *make_waveform_view_from_ibuf_byte(ImBuf *ibuf) wform_put_grid(tgt, w, h); wform_put_border(tgt, w, h); - + for (x = 0; x < 256; x++) { wtable[x] = (unsigned char) (pow(((float) x + 1) / 256, waveform_gamma) * 255); } @@ -229,7 +229,7 @@ static ImBuf *make_waveform_view_from_ibuf_float(ImBuf *ibuf) } wform_put_border(tgt, w, h); - + return rval; } @@ -285,7 +285,7 @@ static ImBuf *make_sep_waveform_view_from_ibuf_byte(ImBuf *ibuf) } wform_put_border(tgt, w, h); - + return rval; } @@ -334,7 +334,7 @@ static ImBuf *make_sep_waveform_view_from_ibuf_float(ImBuf *ibuf) } wform_put_border(tgt, w, h); - + return rval; } @@ -542,7 +542,7 @@ static ImBuf *make_histogram_view_from_ibuf_byte(ImBuf *ibuf) } wform_put_border((unsigned char *) rval->rect, rval->x, rval->y); - + return rval; } @@ -610,7 +610,7 @@ static ImBuf *make_histogram_view_from_ibuf_float(ImBuf *ibuf) if (bins[2][x] > nb) nb = bins[2][x]; } - + for (x = 0; x < HIS_STEPS; x++) { if (nr) { draw_histogram_bar(rval, x + 1, ((float) bins[0][x]) / nr, 0); @@ -622,11 +622,11 @@ static ImBuf *make_histogram_view_from_ibuf_float(ImBuf *ibuf) draw_histogram_bar(rval, x + 1, ((float) bins[2][x]) / nb, 2); } } - + draw_histogram_marker(rval, get_bin_float(0.0)); draw_histogram_marker(rval, get_bin_float(1.0)); wform_put_border((unsigned char *) rval->rect, rval->x, rval->y); - + return rval; } @@ -653,7 +653,7 @@ static void vectorscope_put_cross(unsigned char r, unsigned char g, unsigned ch rgb[1] = (float)g / 255.0f; rgb[2] = (float)b / 255.0f; rgb_to_yuv_normalized(rgb, yuv); - + p = tgt + 4 * (w * (int) ((yuv[2] * (h - 3) + 1)) + (int) ((yuv[1] * (w - 3) + 1))); @@ -698,12 +698,12 @@ static ImBuf *make_vectorscope_view_from_ibuf_byte(ImBuf *ibuf) for (x = 0; x < ibuf->x; x++) { const char *src1 = src + 4 * (ibuf->x * y + x); char *p; - + rgb[0] = (float)src1[0] / 255.0f; rgb[1] = (float)src1[1] / 255.0f; rgb[2] = (float)src1[2] / 255.0f; rgb_to_yuv_normalized(rgb, yuv); - + p = tgt + 4 * (w * (int) ((yuv[2] * (h - 3) + 1)) + (int) ((yuv[1] * (w - 3) + 1))); scope_put_pixel(wtable, (unsigned char *)p); @@ -744,7 +744,7 @@ static ImBuf *make_vectorscope_view_from_ibuf_float(ImBuf *ibuf) for (x = 0; x < ibuf->x; x++) { const float *src1 = src + 4 * (ibuf->x * y + x); const char *p; - + memcpy(rgb, src1, 3 * sizeof(float)); CLAMP(rgb[0], 0.0f, 1.0f); @@ -752,7 +752,7 @@ static ImBuf *make_vectorscope_view_from_ibuf_float(ImBuf *ibuf) CLAMP(rgb[2], 0.0f, 1.0f); rgb_to_yuv_normalized(rgb, yuv); - + p = tgt + 4 * (w * (int) ((yuv[2] * (h - 3) + 1)) + (int) ((yuv[1] * (w - 3) + 1))); scope_put_pixel(wtable, (unsigned char *)p); |