]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/jpeg2000dwt: assert that mod == 0 for encoding
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 16 Jun 2015 19:22:40 +0000 (21:22 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 16 Jun 2015 22:44:27 +0000 (00:44 +0200)
We are missing the handling of some special cases for this.
These cases should be unused and there should be no reason
to ever use them unless some spec dictates their use

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/jpeg2000dwt.c

index dba8393e652717d9ba2d219a47f082a43d94f3fb..225b08f3ef531c6c23ee958bd8b372d6a8257522 100644 (file)
@@ -25,6 +25,7 @@
  * Discrete wavelet transform
  */
 
+#include "libavutil/avassert.h"
 #include "libavutil/common.h"
 #include "libavutil/mem.h"
 #include "jpeg2000dwt.h"
@@ -109,6 +110,7 @@ static void dwt_encode53(DWTContext *s, int *t)
             lp;
         int *l;
 
+        av_assert1(!mh && !mv);
         // HOR_SD
         l = line + mh;
         for (lp = 0; lp < lv; lp++){
@@ -179,6 +181,7 @@ static void dwt_encode97_float(DWTContext *s, float *t)
             lp;
         float *l;
 
+        av_assert1(!mh && !mv);
         // HOR_SD
         l = line + mh;
         for (lp = 0; lp < lv; lp++){
@@ -250,6 +253,8 @@ static void dwt_encode97_int(DWTContext *s, int *t)
             lp;
         int *l;
 
+        av_assert1(!mh && !mv);
+
         // HOR_SD
         l = line + mh;
         for (lp = 0; lp < lv; lp++){