Update ISRC link.
[platform/upstream/libvorbis.git] / vq / make_residue_books.pl
index b811fe2..b37d0dc 100755 (executable)
@@ -114,8 +114,8 @@ while($line=<F>){
                $plusminus=$val;
            }
        }
-       die "Couldn't open temp file temp$$.vql: $!" unless
-           open(G,">temp$$.vql");
+       die "Couldn't open temp file $globalname$name.vql: $!" unless
+           open(G,">$globalname$name.vql");
        print G "$count $dim 0 ";
        if($seqp=~/non/){
            print G "0\n$list\n";
@@ -124,16 +124,11 @@ while($line=<F>){
        }
        close(G);
 
-       my $command="latticebuild temp$$.vql > $globalname$name.vqh";
+       my $command="latticebuild $globalname$name.vql > $globalname$name.vqh";
        print ">>> $command\n";
        die "Couldn't build latticebook.\n\tcommand:$command\n" 
            if syst($command);
 
-       my $command="latticehint $globalname$name.vqh $thlist > temp$$.vqh";
-       print ">>> $command\n";
-       die "Couldn't pre-hint latticebook.\n\tcommand:$command\n" 
-           if syst($command);
-
        if(-e $datafile){
        
            if($interleave=~/non/){
@@ -143,32 +138,27 @@ while($line=<F>){
            }
            
            if($seqp=~/cull/){
-               my $command="$restune temp$$.vqh $datafile 1 > $globalname$name.vqh";
+               my $command="$restune $globalname$name.vqh $datafile 1 > temp$$.vqh";
                print ">>> $command\n";
                die "Couldn't tune latticebook.\n\tcommand:$command\n" 
                    if syst($command);
            }else{
-               my $command="$restune temp$$.vqh $datafile > $globalname$name.vqh";
+               my $command="$restune $globalname$name.vqh $datafile > temp$$.vqh";
                print ">>> $command\n";
                die "Couldn't tune latticebook.\n\tcommand:$command\n" 
                    if syst($command);
            }
 
-           my $command="latticehint $globalname$name.vqh $thlist > temp$$.vqh";
+           my $command="mv temp$$.vqh $globalname$name.vqh";
            print ">>> $command\n";
-           die "Couldn't post-hint latticebook.\n\tcommand:$command\n" 
+           die "Couldn't rename latticebook.\n\tcommand:$command\n" 
                if syst($command);
 
        }else{
            print "No matching training file; leaving this codebook untrained.\n";
        }
 
-       my $command="mv temp$$.vqh $globalname$name.vqh";
-       print ">>> $command\n";
-       die "Couldn't rename latticebook.\n\tcommand:$command\n" 
-           if syst($command);
-
-       my $command="rm temp$$.vql";
+       my $command="rm $globalname$name.vql";
        print ">>> $command\n";
        die "Couldn't remove temp files.\n\tcommand:$command\n" 
            if syst($command);