remove casts to short when allocating new imbufs.

This commit is contained in:
Campbell Barton
2012-06-07 18:33:36 +00:00
parent bdf9e02346
commit 186f542b79
3 changed files with 11 additions and 12 deletions

View File

@@ -119,8 +119,8 @@ static void de_interlace_ng(struct ImBuf *ibuf) /* neogeo fields */
if (ibuf->rect) {
/* make copies */
tbuf1 = IMB_allocImBuf(ibuf->x, (short)(ibuf->y >> 1), (unsigned char)32, (int)IB_rect);
tbuf2 = IMB_allocImBuf(ibuf->x, (short)(ibuf->y >> 1), (unsigned char)32, (int)IB_rect);
tbuf1 = IMB_allocImBuf(ibuf->x, (ibuf->y >> 1), (unsigned char)32, (int)IB_rect);
tbuf2 = IMB_allocImBuf(ibuf->x, (ibuf->y >> 1), (unsigned char)32, (int)IB_rect);
ibuf->x *= 2;
@@ -147,8 +147,8 @@ static void de_interlace_st(struct ImBuf *ibuf) /* standard fields */
if (ibuf->rect) {
/* make copies */
tbuf1 = IMB_allocImBuf(ibuf->x, (short)(ibuf->y >> 1), (unsigned char)32, IB_rect);
tbuf2 = IMB_allocImBuf(ibuf->x, (short)(ibuf->y >> 1), (unsigned char)32, IB_rect);
tbuf1 = IMB_allocImBuf(ibuf->x, (ibuf->y >> 1), (unsigned char)32, IB_rect);
tbuf2 = IMB_allocImBuf(ibuf->x, (ibuf->y >> 1), (unsigned char)32, IB_rect);
ibuf->x *= 2;

View File

@@ -77,7 +77,7 @@ static ImBuf *prepare_effect_imbufs(
if (!ibuf1 && !ibuf2 && !ibuf3) {
/* hmmm, global float option ? */
out = IMB_allocImBuf((short)x, (short)y, 32, IB_rect);
out = IMB_allocImBuf(x, y, 32, IB_rect);
}
else if ((ibuf1 && ibuf1->rect_float) ||
(ibuf2 && ibuf2->rect_float) ||
@@ -85,10 +85,10 @@ static ImBuf *prepare_effect_imbufs(
{
/* if any inputs are rectfloat, output is float too */
out = IMB_allocImBuf((short)x, (short)y, 32, IB_rectfloat);
out = IMB_allocImBuf(x, y, 32, IB_rectfloat);
}
else {
out = IMB_allocImBuf((short)x, (short)y, 32, IB_rect);
out = IMB_allocImBuf(x, y, 32, IB_rect);
}
if (ibuf1 && !ibuf1->rect_float && out->rect_float) {

View File

@@ -1919,8 +1919,7 @@ static ImBuf *seq_render_effect_strip_impl(
input[0] = seq->seq1; input[1] = seq->seq2; input[2] = seq->seq3;
if (!sh.execute) { /* effect not supported in this version... */
out = IMB_allocImBuf((short)context.rectx,
(short)context.recty, 32, IB_rect);
out = IMB_allocImBuf(context.rectx, context.recty, 32, IB_rect);
return out;
}
@@ -1997,7 +1996,7 @@ static ImBuf *seq_render_effect_strip_impl(
}
if (out == NULL) {
out = IMB_allocImBuf((short)context.rectx, (short)context.recty, 32, IB_rect);
out = IMB_allocImBuf(context.rectx, context.recty, 32, IB_rect);
}
return out;
@@ -2450,7 +2449,7 @@ static ImBuf *seq_render_strip(SeqRenderData context, Sequence *seq, float cfra)
}
if (ibuf == NULL)
ibuf = IMB_allocImBuf((short)context.rectx, (short)context.recty, 32, IB_rect);
ibuf = IMB_allocImBuf(context.rectx, context.recty, 32, IB_rect);
if (ibuf->x != context.rectx || ibuf->y != context.recty)
use_preprocess = TRUE;
@@ -2565,7 +2564,7 @@ static ImBuf *seq_render_strip_stack(
break;
case EARLY_USE_INPUT_1:
if (i == 0) {
out = IMB_allocImBuf((short)context.rectx, (short)context.recty, 32, IB_rect);
out = IMB_allocImBuf(context.rectx, context.recty, 32, IB_rect);
}
break;
case EARLY_DO_EFFECT: