huff.val_bits = get_bits(&ctx->gb, 5);
huff.max_bits = get_bits(&ctx->gb, 5);
huff.min_bits = get_bits(&ctx->gb, 5);
- huff.nodes = get_bits_long(&ctx->gb, 17);
+ huff.nodes = get_bits(&ctx->gb, 17);
huff.num = 0;
/* check for correct codes parameters */
clast = ctx->clast + bx * 4;
#define TM2_INIT_POINTERS_2() \
- int *Yo, *Uo, *Vo;\
+ unsigned *Yo, *Uo, *Vo;\
int oYstride, oUstride, oVstride;\
\
TM2_INIT_POINTERS();\
deltas[10] = GET_TOK(ctx, TM2_L_LO);
if (bx > 0)
- last[0] = (last[-1] - ctx->D[0] - ctx->D[1] - ctx->D[2] - ctx->D[3] + last[1]) >> 1;
+ last[0] = (int)((unsigned)last[-1] - ctx->D[0] - ctx->D[1] - ctx->D[2] - ctx->D[3] + last[1]) >> 1;
else
- last[0] = (last[1] - ctx->D[0] - ctx->D[1] - ctx->D[2] - ctx->D[3])>> 1;
- last[2] = (last[1] + last[3]) >> 1;
+ last[0] = (int)((unsigned)last[1] - ctx->D[0] - ctx->D[1] - ctx->D[2] - ctx->D[3])>> 1;
+ last[2] = (int)((unsigned)last[1] + last[3]) >> 1;
- t1 = ctx->D[0] + ctx->D[1];
+ t1 = ctx->D[0] + (unsigned)ctx->D[1];
ctx->D[0] = t1 >> 1;
ctx->D[1] = t1 - (t1 >> 1);
- t2 = ctx->D[2] + ctx->D[3];
+ t2 = ctx->D[2] + (unsigned)ctx->D[3];
ctx->D[2] = t2 >> 1;
ctx->D[3] = t2 - (t2 >> 1);
for (i = 0; i < 16; i++)
deltas[i] = 0;
- ct = ctx->D[0] + ctx->D[1] + ctx->D[2] + ctx->D[3];
+ ct = (unsigned)ctx->D[0] + ctx->D[1] + ctx->D[2] + ctx->D[3];
if (bx > 0)
left = last[-1] - (unsigned)ct;
/* update chroma */
for (j = 0; j < 2; j++) {
for (i = 0; i < 2; i++) {
- U[i] = Uo[i] + (unsigned)GET_TOK(ctx, TM2_UPD);
- V[i] = Vo[i] + (unsigned)GET_TOK(ctx, TM2_UPD);
+ U[i] = Uo[i] + GET_TOK(ctx, TM2_UPD);
+ V[i] = Vo[i] + GET_TOK(ctx, TM2_UPD);
}
U += Ustride;
V += Vstride;
TM2_RECALC_BLOCK(V, Vstride, (clast + 2), (ctx->CD + 2));
/* update deltas */
- ctx->D[0] = (unsigned)Yo[3] - last[3];
- ctx->D[1] = (unsigned)Yo[3 + oYstride] - Yo[3];
- ctx->D[2] = (unsigned)Yo[3 + oYstride * 2] - Yo[3 + oYstride];
- ctx->D[3] = (unsigned)Yo[3 + oYstride * 3] - Yo[3 + oYstride * 2];
+ ctx->D[0] = Yo[3] - last[3];
+ ctx->D[1] = Yo[3 + oYstride] - Yo[3];
+ ctx->D[2] = Yo[3 + oYstride * 2] - Yo[3 + oYstride];
+ ctx->D[3] = Yo[3 + oYstride * 3] - Yo[3 + oYstride * 2];
for (j = 0; j < 4; j++) {
d = last[3];
return AVERROR(ENOMEM);
}
- if ((ret = ff_reget_buffer(avctx, p)) < 0)
+ if ((ret = ff_reget_buffer(avctx, p, 0)) < 0)
return ret;
l->bdsp.bswap_buf((uint32_t *) l->buffer, (const uint32_t *) buf,