Package: vorbis-tools
Version: 1.4.0-1
Severity: normal
Tags: patch

Hello there,

the following false negative is certainly unnecessary:

  $ oggenc -q10 cdda.wav
  WARNING: quality setting too high, setting to maximum quality.
  Öppnar med wav-modul: WAV file reader

The cause is an inexact floating point computation prior to
value comparison. Doing the latter first is equally valid
and removes the annoying message as a side effect. The patch
displays the simplest change for this.

Best regards,
  Mats E Andersson, DM
Description: Floating point comparison fails.
 In checking the quality setting, the program `oggenc'
 performs a floating point comparison after down scaling
 the given value to a tenth. This causes the inexact
 internal representation to complain unnecessarily.
 *
 It is better to compare first, and normalize later,
 since quality 10 is top notch!
Last-Update: 2011-07-10
Forwarded: no
Author: Mats Erik Andersson <[email protected]>

--- vorbis-tools-1.4.0/oggenc/oggenc.c.orig
+++ vorbis-tools-1.4.0/oggenc/oggenc.c
@@ -858,12 +858,12 @@
                     break;
                 }
                 opt->quality_set=1;
-                opt->quality *= 0.1;
-                if(opt->quality > 1.0f)
+                if(opt->quality > 10.0f)
                 {
-                    opt->quality = 1.0f;
+                    opt->quality = 10.0f;
                     fprintf(stderr, _("WARNING: quality setting too high, setting to maximum quality.\n"));
                 }
+                opt->quality *= 0.1;
                 break;
             case 'n':
                 if(opt->namefmt)

Attachment: signature.asc
Description: Digital signature

Reply via email to