]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vc2enc.c
vc2enc: zero padding of the coefficient buffer
[ffmpeg] / libavcodec / vc2enc.c
index d0101e01e430912eb8630b657210b191e019945f..ba5a03e4ec7e5c8eb35112f4d3e8069f83c8ea83 100644 (file)
@@ -867,6 +867,7 @@ static int dwt_plane(AVCodecContext *avctx, void *arg)
             for (x = 0; x < p->width; x++) {
                 buf[x] = pix[x] - s->diff_offset;
             }
+            memset(&buf[x], 0, (p->coef_stride - p->width)*sizeof(dwtcoef));
             buf += p->coef_stride;
             pix += pix_stride;
         }
@@ -876,6 +877,7 @@ static int dwt_plane(AVCodecContext *avctx, void *arg)
             for (x = 0; x < p->width; x++) {
                 buf[x] = pix[x] - s->diff_offset;
             }
+            memset(&buf[x], 0, (p->coef_stride - p->width)*sizeof(dwtcoef));
             buf += p->coef_stride;
             pix += pix_stride;
         }