diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index a2c8a1ad916f6dedd592102b6570736d4f36736d..b4d3e978ad7f1d7baf5f6decda8298a88635d09c 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -144,6 +144,7 @@ static int decode_residual_block(AVSContext *h, GetBitContext *gb,
                ff_cavs_dequant_shift[qp], i))
         return -1;
     h->s.dsp.cavs_idct8_add(dst,block,stride);
+    h->s.dsp.clear_block(block);
     return 0;
 }
 
diff --git a/libavcodec/cavsdsp.c b/libavcodec/cavsdsp.c
index fd744cc808f8b1db9f0d002557072393b7c1f447..69d3bd23232cbac630461598a953b68a63e3b490 100644
--- a/libavcodec/cavsdsp.c
+++ b/libavcodec/cavsdsp.c
@@ -248,7 +248,6 @@ static void cavs_idct8_add_c(uint8_t *dst, DCTELEM *block, int stride) {
         dst[i + 6*stride] = cm[ dst[i + 6*stride] + ((b1 - b5) >> 7)];
         dst[i + 7*stride] = cm[ dst[i + 7*stride] + ((b0 - b4) >> 7)];
     }
-    memset(block,0,64*sizeof(DCTELEM));
 }
 
 /*****************************************************************************
diff --git a/libavcodec/x86/cavsdsp_mmx.c b/libavcodec/x86/cavsdsp_mmx.c
index 2000ba524a5b8ebd372160f60ee1ee97e9bbab79..012e6c6ba0fb28a31adf487094a6044e88b984f8 100644
--- a/libavcodec/x86/cavsdsp_mmx.c
+++ b/libavcodec/x86/cavsdsp_mmx.c
@@ -173,28 +173,6 @@ static void cavs_idct8_add_mmx(uint8_t *dst, int16_t *block, int stride)
     }
 
     add_pixels_clamped_mmx(b2, dst, stride);
-
-    /* clear block */
-    __asm__ volatile(
-            "pxor %%mm7, %%mm7   \n\t"
-            "movq %%mm7, (%0)    \n\t"
-            "movq %%mm7, 8(%0)   \n\t"
-            "movq %%mm7, 16(%0)  \n\t"
-            "movq %%mm7, 24(%0)  \n\t"
-            "movq %%mm7, 32(%0)  \n\t"
-            "movq %%mm7, 40(%0)  \n\t"
-            "movq %%mm7, 48(%0)  \n\t"
-            "movq %%mm7, 56(%0)  \n\t"
-            "movq %%mm7, 64(%0)  \n\t"
-            "movq %%mm7, 72(%0)  \n\t"
-            "movq %%mm7, 80(%0)  \n\t"
-            "movq %%mm7, 88(%0)  \n\t"
-            "movq %%mm7, 96(%0)  \n\t"
-            "movq %%mm7, 104(%0) \n\t"
-            "movq %%mm7, 112(%0) \n\t"
-            "movq %%mm7, 120(%0) \n\t"
-            :: "r" (block)
-    );
 }
 
 /*****************************************************************************