summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-16 21:22:40 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-17 00:44:27 +0200
commit1125c71fd761c6677d6d6f6615f963cc485b31a2 (patch)
tree2a62098a87b8e9b7c69f0f41f85316506196e34f
parent28efeb6502df37c99ccf18575d2552381d83a877 (diff)
downloadffmpeg-streaming-1125c71fd761c6677d6d6f6615f963cc485b31a2.zip
ffmpeg-streaming-1125c71fd761c6677d6d6f6615f963cc485b31a2.tar.gz
avcodec/jpeg2000dwt: assert that mod == 0 for encoding
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>
-rw-r--r--libavcodec/jpeg2000dwt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/jpeg2000dwt.c b/libavcodec/jpeg2000dwt.c
index dba8393..225b08f 100644
--- a/libavcodec/jpeg2000dwt.c
+++ b/libavcodec/jpeg2000dwt.c
@@ -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++){
OpenPOWER on IntegriCloud