proresenc: use the edge emulation buffer

Prevents reading past the end of frame buffer.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
pull/28/head
Boris Maksalov 12 years ago committed by Luca Barbato
parent fb96c1c5fe
commit cee03436e6
  1. 12
      libavcodec/proresenc.c

@ -251,24 +251,24 @@ static void get_slice_data(ProresContext *ctx, const uint16_t *src,
ctx->dsp.fdct(esrc, elinesize, blocks);
blocks += 64;
if (blocks_per_mb > 2) {
ctx->dsp.fdct(src + 8, linesize, blocks);
ctx->dsp.fdct(esrc + 8, elinesize, blocks);
blocks += 64;
}
ctx->dsp.fdct(src + linesize * 4, linesize, blocks);
ctx->dsp.fdct(esrc + elinesize * 4, elinesize, blocks);
blocks += 64;
if (blocks_per_mb > 2) {
ctx->dsp.fdct(src + linesize * 4 + 8, linesize, blocks);
ctx->dsp.fdct(esrc + elinesize * 4 + 8, elinesize, blocks);
blocks += 64;
}
} else {
ctx->dsp.fdct(esrc, elinesize, blocks);
blocks += 64;
ctx->dsp.fdct(src + linesize * 4, linesize, blocks);
ctx->dsp.fdct(esrc + elinesize * 4, elinesize, blocks);
blocks += 64;
if (blocks_per_mb > 2) {
ctx->dsp.fdct(src + 8, linesize, blocks);
ctx->dsp.fdct(esrc + 8, elinesize, blocks);
blocks += 64;
ctx->dsp.fdct(src + linesize * 4 + 8, linesize, blocks);
ctx->dsp.fdct(esrc + elinesize * 4 + 8, elinesize, blocks);
blocks += 64;
}
}

Loading…
Cancel
Save