summaryrefslogtreecommitdiff
path: root/libavcodec/snow.c
diff options
context:
space:
mode:
authorLoren Merritt <lorenm@u.washington.edu>2006-05-30 19:45:12 +0000
committerLoren Merritt <lorenm@u.washington.edu>2006-05-30 19:45:12 +0000
commit7374794a899d5995341e51592babaf5098a0ed48 (patch)
tree9d77da7b4bb2ea8d8ce109098de4b53a0c166d47 /libavcodec/snow.c
parentd4b287ed369bc4024d206bbaf4a6c0ed7f9d338b (diff)
Snow: don't try to encode lossless with 9/7 wavelet, because it isn't lossless.
Originally committed as revision 5433 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/snow.c')
-rw-r--r--libavcodec/snow.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/snow.c b/libavcodec/snow.c
index 59e283948d..d20b9604ba 100644
--- a/libavcodec/snow.c
+++ b/libavcodec/snow.c
@@ -4041,6 +4041,13 @@ static int encode_init(AVCodecContext *avctx)
return -1;
}
+ if(avctx->prediction_method == DWT_97
+ && (avctx->flags & CODEC_FLAG_QSCALE)
+ && avctx->global_quality == 0){
+ av_log(avctx, AV_LOG_ERROR, "the 9/7 wavelet is incompatible with lossless mode\n");
+ return -1;
+ }
+
common_init(avctx);
alloc_blocks(s);