int diff = 0;
for (i = dx + h; i > dx; i--) {
- nsptr = sptr + (i * stride) + dy * 3;
- npfptr = pfptr + (i * stride) + dy * 3;
+ nsptr = sptr + i * stride + dy * 3;
+ npfptr = pfptr + i * stride + dy * 3;
for (j = 0; j < w * 3; j++) {
diff |= npfptr[j] ^ nsptr[j];
dptr[j] = nsptr[j];
s->avctx = avctx;
- if ((avctx->width > 4095) || (avctx->height > 4095)) {
+ if (avctx->width > 4095 || avctx->height > 4095) {
av_log(avctx, AV_LOG_ERROR, "Input dimensions too large, input must be max 4096x4096 !\n");
return AVERROR_INVALIDDATA;
}
// Needed if zlib unused or init aborted before deflateInit
- memset(&(s->zstream), 0, sizeof(z_stream));
+ memset(&s->zstream, 0, sizeof(z_stream));
s->last_key_frame = 0;
init_put_bits(&pb, buf, buf_size * 8);
- put_bits(&pb, 4, (block_width / 16) - 1);
+ put_bits(&pb, 4, block_width / 16 - 1);
put_bits(&pb, 12, s->image_width);
- put_bits(&pb, 4, (block_height / 16) - 1);
+ put_bits(&pb, 4, block_height / 16 - 1);
put_bits(&pb, 12, s->image_height);
flush_put_bits(&pb);
buf_pos = 4;
ret = compress2(ptr + 2, &zsize, s->tmpblock, 3 * ws * hs, 9);
- //ret = deflateReset(&(s->zstream));
+ //ret = deflateReset(&s->zstream);
if (ret != Z_OK)
av_log(s->avctx, AV_LOG_ERROR, "error while compressing block %dx%d\n", i, j);
}
if (p->linesize[0] < 0)
- pfptr = s->previous_frame - ((s->image_height - 1) * p->linesize[0]);
+ pfptr = s->previous_frame - (s->image_height - 1) * p->linesize[0];
else
pfptr = s->previous_frame;
{
FlashSVContext *s = avctx->priv_data;
- deflateEnd(&(s->zstream));
+ deflateEnd(&s->zstream);
av_free(s->encbuffer);
av_free(s->previous_frame);