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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user