Merging r50237 through r50240 from trunk into soc-2011-tomato
This commit is contained in:
@@ -208,8 +208,10 @@ void BKE_sequence_free(Scene *scene, Sequence *seq)
|
||||
/* free modifiers */
|
||||
BKE_sequence_modifier_clear(seq);
|
||||
|
||||
BKE_sequencer_cache_cleanup_sequence(seq);
|
||||
BKE_sequencer_preprocessed_cache_cleanup_sequence(seq);
|
||||
/* free cached data used by this strip,
|
||||
* also invalidate cache for all dependent sequences
|
||||
*/
|
||||
BKE_sequence_invalidate_cache(scene, seq);
|
||||
|
||||
MEM_freeN(seq);
|
||||
}
|
||||
@@ -2945,6 +2947,9 @@ static void free_anim_seq(Sequence *seq)
|
||||
/* check whether sequence cur depends on seq */
|
||||
int BKE_sequence_check_depend(Sequence *seq, Sequence *cur)
|
||||
{
|
||||
if (cur->seq1 == seq || cur->seq2 == seq || cur->seq3 == seq)
|
||||
return TRUE;
|
||||
|
||||
/* sequences are not intersecting in time, assume no dependency exists between them */
|
||||
if (cur->enddisp < seq->startdisp || cur->startdisp > seq->enddisp)
|
||||
return FALSE;
|
||||
|
||||
@@ -60,16 +60,14 @@ static void scope_put_pixel(unsigned char *table, unsigned char *pos)
|
||||
pos[3] = 255;
|
||||
}
|
||||
|
||||
static void scope_put_pixel_single(unsigned char *table, unsigned char *pos,
|
||||
int col)
|
||||
static void scope_put_pixel_single(unsigned char *table, unsigned char *pos, int col)
|
||||
{
|
||||
char newval = table[pos[col]];
|
||||
pos[col] = newval;
|
||||
pos[3] = 255;
|
||||
}
|
||||
|
||||
static void wform_put_line(int w,
|
||||
unsigned char *last_pos, unsigned char *new_pos)
|
||||
static void wform_put_line(int w, unsigned char *last_pos, unsigned char *new_pos)
|
||||
{
|
||||
if (last_pos > new_pos) {
|
||||
unsigned char *temp = new_pos;
|
||||
@@ -86,8 +84,7 @@ static void wform_put_line(int w,
|
||||
}
|
||||
}
|
||||
|
||||
static void wform_put_line_single(
|
||||
int w, unsigned char *last_pos, unsigned char *new_pos, int col)
|
||||
static void wform_put_line_single(int w, unsigned char *last_pos, unsigned char *new_pos, int col)
|
||||
{
|
||||
if (last_pos > new_pos) {
|
||||
unsigned char *temp = new_pos;
|
||||
@@ -161,8 +158,7 @@ static ImBuf *make_waveform_view_from_ibuf_byte(ImBuf *ibuf)
|
||||
wform_put_grid(tgt, w, h);
|
||||
|
||||
for (x = 0; x < 256; x++) {
|
||||
wtable[x] = (unsigned char) (pow(((float) x + 1) / 256,
|
||||
waveform_gamma) * 255);
|
||||
wtable[x] = (unsigned char) (pow(((float) x + 1) / 256, waveform_gamma) * 255);
|
||||
}
|
||||
|
||||
for (y = 0; y < ibuf->y; y++) {
|
||||
@@ -204,8 +200,7 @@ static ImBuf *make_waveform_view_from_ibuf_float(ImBuf *ibuf)
|
||||
wform_put_grid(tgt, w, h);
|
||||
|
||||
for (x = 0; x < 256; x++) {
|
||||
wtable[x] = (unsigned char) (pow(((float) x + 1) / 256,
|
||||
waveform_gamma) * 255);
|
||||
wtable[x] = (unsigned char) (pow(((float) x + 1) / 256, waveform_gamma) * 255);
|
||||
}
|
||||
|
||||
for (y = 0; y < ibuf->y; y++) {
|
||||
@@ -249,8 +244,7 @@ ImBuf *make_waveform_view_from_ibuf(ImBuf *ibuf)
|
||||
|
||||
static ImBuf *make_sep_waveform_view_from_ibuf_byte(ImBuf *ibuf)
|
||||
{
|
||||
ImBuf *rval = IMB_allocImBuf(
|
||||
ibuf->x + 3, 515, 32, IB_rect);
|
||||
ImBuf *rval = IMB_allocImBuf(ibuf->x + 3, 515, 32, IB_rect);
|
||||
int x, y;
|
||||
unsigned char *src = (unsigned char *) ibuf->rect;
|
||||
unsigned char *tgt = (unsigned char *) rval->rect;
|
||||
@@ -263,8 +257,7 @@ static ImBuf *make_sep_waveform_view_from_ibuf_byte(ImBuf *ibuf)
|
||||
wform_put_grid(tgt, w, h);
|
||||
|
||||
for (x = 0; x < 256; x++) {
|
||||
wtable[x] = (unsigned char) (pow(((float) x + 1) / 256,
|
||||
waveform_gamma) * 255);
|
||||
wtable[x] = (unsigned char) (pow(((float) x + 1) / 256, waveform_gamma) * 255);
|
||||
}
|
||||
|
||||
for (y = 0; y < ibuf->y; y++) {
|
||||
@@ -275,16 +268,14 @@ static ImBuf *make_sep_waveform_view_from_ibuf_byte(ImBuf *ibuf)
|
||||
unsigned char *rgb = src + 4 * (ibuf->x * y + x);
|
||||
for (c = 0; c < 3; c++) {
|
||||
unsigned char *p = tgt;
|
||||
p += 4 * (w * ((rgb[c] * (h - 3)) / 255 + 1) +
|
||||
c * sw + x / 3 + 1);
|
||||
p += 4 * (w * ((rgb[c] * (h - 3)) / 255 + 1) + c * sw + x / 3 + 1);
|
||||
|
||||
scope_put_pixel_single(wtable, p, c);
|
||||
p += 4 * w;
|
||||
scope_put_pixel_single(wtable, p, c);
|
||||
|
||||
if (last_p[c] != NULL) {
|
||||
wform_put_line_single(
|
||||
w, last_p[c], p, c);
|
||||
wform_put_line_single(w, last_p[c], p, c);
|
||||
}
|
||||
last_p[c] = p;
|
||||
}
|
||||
@@ -311,8 +302,7 @@ static ImBuf *make_sep_waveform_view_from_ibuf_float(ImBuf *ibuf)
|
||||
wform_put_grid(tgt, w, h);
|
||||
|
||||
for (x = 0; x < 256; x++) {
|
||||
wtable[x] = (unsigned char) (pow(((float) x + 1) / 256,
|
||||
waveform_gamma) * 255);
|
||||
wtable[x] = (unsigned char) (pow(((float) x + 1) / 256, waveform_gamma) * 255);
|
||||
}
|
||||
|
||||
for (y = 0; y < ibuf->y; y++) {
|
||||
@@ -327,16 +317,14 @@ static ImBuf *make_sep_waveform_view_from_ibuf_float(ImBuf *ibuf)
|
||||
|
||||
CLAMP(v, 0.0f, 1.0f);
|
||||
|
||||
p += 4 * (w * ((int) (v * (h - 3)) + 1) +
|
||||
c * sw + x / 3 + 1);
|
||||
p += 4 * (w * ((int) (v * (h - 3)) + 1) + c * sw + x / 3 + 1);
|
||||
|
||||
scope_put_pixel_single(wtable, p, c);
|
||||
p += 4 * w;
|
||||
scope_put_pixel_single(wtable, p, c);
|
||||
|
||||
if (last_p[c] != NULL) {
|
||||
wform_put_line_single(
|
||||
w, last_p[c], p, c);
|
||||
wform_put_line_single(w, last_p[c], p, c);
|
||||
}
|
||||
last_p[c] = p;
|
||||
}
|
||||
@@ -470,7 +458,7 @@ static ImBuf *make_histogram_view_from_ibuf_byte(ImBuf *ibuf)
|
||||
|
||||
unsigned int bins[3][256];
|
||||
|
||||
memset(bins, 0, 3 * 256 * sizeof(unsigned int));
|
||||
memset(bins, 0, sizeof(bins));
|
||||
|
||||
for (y = 0; y < ibuf->y; y++) {
|
||||
for (x = 0; x < ibuf->x; x++) {
|
||||
@@ -492,10 +480,8 @@ static ImBuf *make_histogram_view_from_ibuf_byte(ImBuf *ibuf)
|
||||
|
||||
for (c = 0; c < 3; c++) {
|
||||
for (x = 0; x < 256; x++) {
|
||||
draw_histogram_bar(rval, x * 2 + 1,
|
||||
((float) bins[c][x]) / n, c);
|
||||
draw_histogram_bar(rval, x * 2 + 2,
|
||||
((float) bins[c][x]) / n, c);
|
||||
draw_histogram_bar(rval, x * 2 + 1, ((float) bins[c][x]) / n, c);
|
||||
draw_histogram_bar(rval, x * 2 + 2, ((float) bins[c][x]) / n, c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -507,10 +493,10 @@ static ImBuf *make_histogram_view_from_ibuf_byte(ImBuf *ibuf)
|
||||
static int get_bin_float(float f)
|
||||
{
|
||||
if (f < -0.25f) {
|
||||
f = -0.25f;
|
||||
return 0;
|
||||
}
|
||||
else if (f > 1.25f) {
|
||||
f = 1.25f;
|
||||
else if (f >= 1.25f) {
|
||||
return 511;
|
||||
}
|
||||
|
||||
return (int) (((f + 0.25f) / 1.5f) * 512);
|
||||
@@ -524,7 +510,7 @@ static ImBuf *make_histogram_view_from_ibuf_float(ImBuf *ibuf)
|
||||
|
||||
unsigned int bins[3][512];
|
||||
|
||||
memset(bins, 0, 3 * 256 * sizeof(unsigned int));
|
||||
memset(bins, 0, sizeof(bins));
|
||||
|
||||
for (y = 0; y < ibuf->y; y++) {
|
||||
for (x = 0; x < ibuf->x; x++) {
|
||||
@@ -567,9 +553,7 @@ ImBuf *make_histogram_view_from_ibuf(ImBuf *ibuf)
|
||||
}
|
||||
}
|
||||
|
||||
static void vectorscope_put_cross(unsigned char r, unsigned char g,
|
||||
unsigned char b,
|
||||
char *tgt, int w, int h, int size)
|
||||
static void vectorscope_put_cross(unsigned char r, unsigned char g, unsigned char b, char *tgt, int w, int h, int size)
|
||||
{
|
||||
float rgb[3], yuv[3];
|
||||
char *p;
|
||||
@@ -609,8 +593,7 @@ static ImBuf *make_vectorscope_view_from_ibuf_byte(ImBuf *ibuf)
|
||||
unsigned char wtable[256];
|
||||
|
||||
for (x = 0; x < 256; x++) {
|
||||
wtable[x] = (unsigned char) (pow(((float) x + 1) / 256,
|
||||
scope_gamma) * 255);
|
||||
wtable[x] = (unsigned char) (pow(((float) x + 1) / 256, scope_gamma) * 255);
|
||||
}
|
||||
|
||||
for (x = 0; x <= 255; x++) {
|
||||
@@ -656,8 +639,7 @@ static ImBuf *make_vectorscope_view_from_ibuf_float(ImBuf *ibuf)
|
||||
unsigned char wtable[256];
|
||||
|
||||
for (x = 0; x < 256; x++) {
|
||||
wtable[x] = (unsigned char) (pow(((float) x + 1) / 256,
|
||||
scope_gamma) * 255);
|
||||
wtable[x] = (unsigned char) (pow(((float) x + 1) / 256, scope_gamma) * 255);
|
||||
}
|
||||
|
||||
for (x = 0; x <= 255; x++) {
|
||||
|
||||
Reference in New Issue
Block a user