changeset 3327:955096780e7c libavcodec

Snow: don't try to encode lossless with 9/7 wavelet, because it isn't lossless.
author lorenm
date Tue, 30 May 2006 19:45:12 +0000
parents fb245e797c5d
children 1eb35b97c056
files snow.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/snow.c	Tue May 30 19:40:28 2006 +0000
+++ b/snow.c	Tue May 30 19:45:12 2006 +0000
@@ -4041,6 +4041,13 @@
         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);