[FFmpeg-cvslog] proresenc: correct edge emulation
Phil Barrett
git at videolan.org
Thu Mar 1 03:20:18 CET 2012
ffmpeg | branch: master | Phil Barrett <philb at filmlight.ltd.uk> | Tue Feb 28 19:26:11 2012 +0100| [c7084182e85eaa437899df58fd1ae57426d3c7f7] | committer: Kostya Shishkov
proresenc: correct edge emulation
Signed-off-by: Kostya Shishkov <kostya.shishkov at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c7084182e85eaa437899df58fd1ae57426d3c7f7
---
libavcodec/proresenc.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/libavcodec/proresenc.c b/libavcodec/proresenc.c
index 552fa7c..c10f599 100644
--- a/libavcodec/proresenc.c
+++ b/libavcodec/proresenc.c
@@ -189,24 +189,24 @@ static void get_slice_data(ProresContext *ctx, const uint16_t *src,
elinesize = linesize;
} else {
int bw, bh, pix;
- const int estride = 16 / sizeof(*ctx->emu_buf);
esrc = ctx->emu_buf;
- elinesize = 16;
+ elinesize = 16 * sizeof(*ctx->emu_buf);
bw = FFMIN(w - x, mb_width);
bh = FFMIN(h - y, 16);
for (j = 0; j < bh; j++) {
- memcpy(ctx->emu_buf + j * estride, src + j * linesize,
+ memcpy(ctx->emu_buf + j * 16,
+ (const uint8_t*)src + j * linesize,
bw * sizeof(*src));
- pix = ctx->emu_buf[j * estride + bw - 1];
+ pix = ctx->emu_buf[j * 16 + bw - 1];
for (k = bw; k < mb_width; k++)
- ctx->emu_buf[j * estride + k] = pix;
+ ctx->emu_buf[j * 16 + k] = pix;
}
for (; j < 16; j++)
- memcpy(ctx->emu_buf + j * estride,
- ctx->emu_buf + (bh - 1) * estride,
+ memcpy(ctx->emu_buf + j * 16,
+ ctx->emu_buf + (bh - 1) * 16,
mb_width * sizeof(*ctx->emu_buf));
}
if (!is_chroma) {
More information about the ffmpeg-cvslog
mailing list