[FFmpeg-cvslog] diracdec: do not memset the entire coefficient buffer for HQ pictures

Rostislav Pehlivanov git at videolan.org
Tue Jul 12 00:45:37 CEST 2016


ffmpeg | branch: master | Rostislav Pehlivanov <rpehlivanov at ob-encoder.com> | Thu Jun 23 18:07:04 2016 +0100| [209456292309e28139732ec914b970cea71094c3] | committer: Rostislav Pehlivanov

diracdec: do not memset the entire coefficient buffer for HQ pictures

This is now handled by the slice decoding function.

Signed-off-by: Rostislav Pehlivanov <rpehlivanov at obe.tv>

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

 libavcodec/diracdec.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c
index ef0274a..c6a207b 100644
--- a/libavcodec/diracdec.c
+++ b/libavcodec/diracdec.c
@@ -1816,9 +1816,11 @@ static int dirac_decode_frame_internal(DiracContext *s)
 
     if (s->low_delay) {
         /* [DIRAC_STD] 13.5.1 low_delay_transform_data() */
-        for (comp = 0; comp < 3; comp++) {
-            Plane *p = &s->plane[comp];
-            memset(p->idwt.buf, 0, p->idwt.stride * p->idwt.height);
+        if (!s->hq_picture) {
+            for (comp = 0; comp < 3; comp++) {
+                Plane *p = &s->plane[comp];
+                memset(p->idwt.buf, 0, p->idwt.stride * p->idwt.height);
+            }
         }
         if (!s->zero_res) {
             if ((ret = decode_lowdelay(s)) < 0)



More information about the ffmpeg-cvslog mailing list