public
Description: A collection of audio handling programs which work from the command line.
Homepage: http://audiotools.sourceforge.net
Clone URL: git://github.com/tuffy/python-audio-tools.git
Search Repo:
Added an explanation and example for choosing the best FIXED subframe 
predictor order as part of the FLAC encoder documentation.
tuffy (author)
Fri May 09 18:54:09 -0700 2008
commit  51efce5f561cf4cdf5fcff3367849d7a8c6fd50d
tree    f824d11f230bf8143e2de2a31fbd3b8d09de0543
parent  4ae5feba76b065715bf17cb179186398c01a539d
...
608
609
610
611
 
 
612
613
614
...
662
663
664
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
608
609
610
 
611
612
613
614
615
...
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
0
@@ -608,7 +608,8 @@
0
 But for odd-sized frames - which often occur at the end of the stream -
0
 that value is stored as an 8 or 16 bit integer following UTF-8 encoded
0
 frame number.
0
-Less commonly, odd sample rate values are stored as 8 bit (in kHz),
0
+.PP
0
+In addition, odd sample rate values are stored as 8 bit (in kHz),
0
 16 bit (in Hz) or 16 bit (in 10s of Hz) prior to the CRC-8,
0
 should a predefined value not be available.
0
 .PP
0
@@ -662,4 +663,50 @@
0
 with no compression whatsoever.
0
 It is a `fallback' encoding method for when no other subframe makes one's
0
 data any smaller.
0
+.SUBSUBSECTION "the FIXED subframe"
0
+.PP
0
+This subframe consists of `predictor order' number of unencoded
0
+warm-up samples followed by a residual.
0
+Determing which predictor order to use on a given set of input samples
0
+depends on their minimum delta sum.
0
+This process is best explained by example:
0
+.TS
0
+tab(:);
0
+| c | c | c | c | c | c | c |
0
+| c | r | r | r | r | r | r |.
0
+_
0
+index:sample:@{\[*D] sup 0}@:@{\[*D] sup 1}@:@{\[*D] sup 2}@:@{\[*D] sup 3}@:@{\[*D] sup 4}@
0
+=
0
+0:-40:
0
+1:-41:\fI-41\fR
0
+2:-40:\fI-40\fR:\fI-1\fR
0
+3:-39:\fI-39\fR:\fI-1\fR:\fI0\fR
0
+4:-38:-38:\fI-1\fR:\fI0\fR:\fI0\fR
0
+5:-38:-38:0:-1:1:-1
0
+6:-35:-35:-3:3:-4:5
0
+7:-35:-35:0:-3:6:-10
0
+8:-39:-39:4:-4:1:5
0
+9:-40:-40:1:3:-7:8
0
+10:-40:-40:0:1:2:-9
0
+11:-39:-39:-1:1:0:2
0
+12:-38:-38:-1:0:1:-1
0
+13:-37:-37:-1:0:0:1
0
+14:-33:-33:-4:3:-3:3
0
+15:-36:-36:3:-7:10:-13
0
+16:-35:-35:-1:4:-11:21
0
+17:-31:-31:-4:3:1:-12
0
+18:-32:-32:1:-5:8:-7
0
+19:-33:-33:1:0:-5:13
0
+_
0
+@|~{roman "sum"}~|@::579:26:38:60:111
0
+_
0
+.TE
0
+.LP
0
+Note that the numbers in italics play a part in the delta
0
+calculation to their right, but do \fBnot\fR figure into the
0
+delta's absolute value sum, below.
0
+.PP
0
+In this example, @\[*D] sup 1@'s value of 26 is the smallest.
0
+Therefore, when compressing this set of samples in a FIXED subframe,
0
+it is best to use a predictor order of 1.

Comments

    No one has commented yet.