diff options
author | Jiri Hnidek <jiri.hnidek@tul.cz> | 2006-05-04 15:55:29 +0400 |
---|---|---|
committer | Jiri Hnidek <jiri.hnidek@tul.cz> | 2006-05-04 15:55:29 +0400 |
commit | 4646ee2aaa52205f85c30778046080f29642a6a4 (patch) | |
tree | daffd8d4f2b354d6134b5f6d181f1ccd227f3034 /source/blender/src/seqscopes.c | |
parent | cb67cba19a85b6a43faba2cd700973bb3f061b37 (diff) |
Bugfix for sequencer:
When you wanted to display "Chroma VectorScope" or "Luma WaveForm" for
image/window with small width/height, then Blender crashed, because
Blender has used fixed limits of ibuf->rect size. Statistics informations
should be created corectly now too.
Diffstat (limited to 'source/blender/src/seqscopes.c')
-rw-r--r-- | source/blender/src/seqscopes.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/src/seqscopes.c b/source/blender/src/seqscopes.c index a44a5261782..1fa01a6145e 100644 --- a/source/blender/src/seqscopes.c +++ b/source/blender/src/seqscopes.c @@ -87,10 +87,10 @@ static struct ImBuf *make_waveform_view_from_ibuf_byte(struct ImBuf * ibuf) waveform_gamma)*255); } - for (y = 0; y < h; y++) { + for (y = 0; y < ibuf->y; y++) { unsigned char * last_p = 0; - for (x = 0; x < w; x++) { + for (x = 0; x < ibuf->x; x++) { unsigned char * rgb = src + 4 * (ibuf->x * y + x); float v = 1.0 * ( 0.299*rgb[0] @@ -147,10 +147,10 @@ static struct ImBuf *make_waveform_view_from_ibuf_float(struct ImBuf * ibuf) waveform_gamma)*255); } - for (y = 0; y < h; y++) { + for (y = 0; y < ibuf->y; y++) { unsigned char * last_p = 0; - for (x = 0; x < w; x++) { + for (x = 0; x < ibuf->x; x++) { float * rgb = src + 4 * (ibuf->x * y + x); float v = 1.0 * ( 0.299*rgb[0] @@ -259,8 +259,8 @@ static struct ImBuf *make_vectorscope_view_from_ibuf_byte(struct ImBuf * ibuf) vectorscope_put_cross(x, 0, 255, tgt, w, h, 1); } - for (y = 0; y < h; y++) { - for (x = 0; x < w; x++) { + for (y = 0; y < ibuf->y; y++) { + for (x = 0; x < ibuf->x; x++) { char * src1 = src + 4 * (ibuf->x * y + x); char * p; @@ -271,7 +271,7 @@ static struct ImBuf *make_vectorscope_view_from_ibuf_byte(struct ImBuf * ibuf) p = tgt + 4 * (w * (int) ((yuv[2] * (h - 3) + 1)) + (int) ((yuv[1] * (w - 3) + 1))); - scope_put_pixel(wtable, p); + scope_put_pixel(wtable, (unsigned char*)p); } } @@ -306,8 +306,8 @@ static struct ImBuf *make_vectorscope_view_from_ibuf_float(struct ImBuf * ibuf) vectorscope_put_cross(x, 0, 255, tgt, w, h, 1); } - for (y = 0; y < h; y++) { - for (x = 0; x < w; x++) { + for (y = 0; y < ibuf->y; y++) { + for (x = 0; x < ibuf->x; x++) { float * src1 = src + 4 * (ibuf->x * y + x); char * p; @@ -321,7 +321,7 @@ static struct ImBuf *make_vectorscope_view_from_ibuf_float(struct ImBuf * ibuf) p = tgt + 4 * (w * (int) ((yuv[2] * (h - 3) + 1)) + (int) ((yuv[1] * (w - 3) + 1))); - scope_put_pixel(wtable, p); + scope_put_pixel(wtable, (unsigned char*)p); } } |