[FFmpeg-cvslog] proresenc: use the edge emulation buffer

Boris Maksalov git at videolan.org
Tue Aug 14 15:39:43 CEST 2012


ffmpeg | branch: master | Boris Maksalov <boris.maksalov at yandex.ru> | Fri Aug 10 09:50:35 2012 +0100| [cee03436e6f1e3d4893841698e73caa92f2a53c9] | committer: Luca Barbato

proresenc: use the edge emulation buffer

Prevents reading past the end of frame buffer.

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cee03436e6f1e3d4893841698e73caa92f2a53c9
---

 libavcodec/proresenc.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavcodec/proresenc.c b/libavcodec/proresenc.c
index 374ff45..40644bb 100644
--- a/libavcodec/proresenc.c
+++ b/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;
             }
         }



More information about the ffmpeg-cvslog mailing list