Барт Гопник
2014-Jun-18 14:54 UTC
[flac-dev] Please help me understand what values of FFMPEG's "compression_level" preset generate subset FLAC stream and what not-subset?
Please help me understand what values of FFMPEG's "compression_level" preset generate subset FLAC stream and what not-subset? Default value of compression_level for FFMPEG's FLAC encoder is 5. FLAC specific encoder parameters: Encoder flac [FLAC (Free Lossless Audio Codec)]: Threading capabilities: no Supported sample formats: s16 s32 FLAC encoder AVOptions: -lpc_coeff_precision <int> E...A... LPC coefficient precision (from 0 to 15) (default 15) -lpc_type <int> E...A... LPC algorithm (from -1 to 3) (default -1) none E...A... fixed E...A... levinson E...A... cholesky E...A... -lpc_passes <int> E...A... Number of passes to use for Cholesky factorization during LPC analysis (from 1 to INT_MAX) (default 2) -min_partition_order <int> E...A... (from -1 to 8) (default -1) -max_partition_order <int> E...A... (from -1 to 8) (default -1) -prediction_order_method <int> E...A... Search method for selecting prediction order (from -1 to 5) (default -1) estimation E...A... 2level E...A... 4level E...A... 8level E...A... search E...A... log E...A... -ch_mode <int> E...A... Stereo decorrelation mode (from -1 to 3) (default -1) auto E...A... indep E...A... left_side E...A... right_side E...A... mid_side E...A... Presets for each compression_level: [flac @ 000000000034ff60] compression: 0 [flac @ 000000000034ff60] lpc type: Fixed pre-defined coefficients [flac @ 000000000034ff60] prediction order: 2, 3 [flac @ 000000000034ff60] order method: estimate [flac @ 000000000034ff60] partition order: 2, 2 [flac @ 000000000034ff60] block size: 1152 [flac @ 000000000034ff60] lpc precision: 15 [flac @ 000000000034ff60] compression: 1 [flac @ 000000000034ff60] lpc type: Fixed pre-defined coefficients [flac @ 000000000034ff60] prediction order: 0, 4 [flac @ 000000000034ff60] order method: estimate [flac @ 000000000034ff60] partition order: 2, 2 [flac @ 000000000034ff60] block size: 1152 [flac @ 000000000034ff60] lpc precision: 15 [flac @ 0000000002c2ff60] compression: 2 [flac @ 0000000002c2ff60] lpc type: Fixed pre-defined coefficients [flac @ 0000000002c2ff60] prediction order: 0, 4 [flac @ 0000000002c2ff60] order method: estimate [flac @ 0000000002c2ff60] partition order: 0, 3 [flac @ 0000000002c2ff60] block size: 1152 [flac @ 0000000002c2ff60] lpc precision: 15 [flac @ 0000000002bfff60] compression: 3 [flac @ 0000000002bfff60] lpc type: Levinson-Durbin recursion with Welch window [flac @ 0000000002bfff60] prediction order: 1, 6 [flac @ 0000000002bfff60] order method: estimate [flac @ 0000000002bfff60] partition order: 0, 3 [flac @ 0000000002bfff60] block size: 4608 [flac @ 0000000002bfff60] lpc precision: 15 [flac @ 0000000002b2ff60] compression: 4 [flac @ 0000000002b2ff60] lpc type: Levinson-Durbin recursion with Welch window [flac @ 0000000002b2ff60] prediction order: 1, 8 [flac @ 0000000002b2ff60] order method: estimate [flac @ 0000000002b2ff60] partition order: 0, 3 [flac @ 0000000002b2ff60] block size: 4608 [flac @ 0000000002b2ff60] lpc precision: 15 [flac @ 0000000002b8ff60] compression: 5 [flac @ 0000000002b8ff60] lpc type: Levinson-Durbin recursion with Welch window [flac @ 0000000002b8ff60] prediction order: 1, 8 [flac @ 0000000002b8ff60] order method: estimate [flac @ 0000000002b8ff60] partition order: 0, 8 [flac @ 0000000002b8ff60] block size: 4608 [flac @ 0000000002b8ff60] lpc precision: 15 [flac @ 0000000002b2ff60] compression: 6 [flac @ 0000000002b2ff60] lpc type: Levinson-Durbin recursion with Welch window [flac @ 0000000002b2ff60] prediction order: 1, 8 [flac @ 0000000002b2ff60] order method: 4-level [flac @ 0000000002b2ff60] partition order: 0, 8 [flac @ 0000000002b2ff60] block size: 4608 [flac @ 0000000002b2ff60] lpc precision: 15 [flac @ 000000000034ff60] compression: 7 [flac @ 000000000034ff60] lpc type: Levinson-Durbin recursion with Welch window [flac @ 000000000034ff60] prediction order: 1, 8 [flac @ 000000000034ff60] order method: log search [flac @ 000000000034ff60] partition order: 0, 8 [flac @ 000000000034ff60] block size: 4608 [flac @ 000000000034ff60] lpc precision: 15 [flac @ 0000000002bcff60] compression: 8 [flac @ 0000000002bcff60] lpc type: Levinson-Durbin recursion with Welch window [flac @ 0000000002bcff60] prediction order: 1, 12 [flac @ 0000000002bcff60] order method: 4-level [flac @ 0000000002bcff60] partition order: 0, 8 [flac @ 0000000002bcff60] block size: 4608 [flac @ 0000000002bcff60] lpc precision: 15 [flac @ 0000000002b9ff60] compression: 9 [flac @ 0000000002b9ff60] lpc type: Levinson-Durbin recursion with Welch window [flac @ 0000000002b9ff60] prediction order: 1, 12 [flac @ 0000000002b9ff60] order method: log search [flac @ 0000000002b9ff60] partition order: 0, 8 [flac @ 0000000002b9ff60] block size: 4608 [flac @ 0000000002b9ff60] lpc precision: 15 [flac @ 0000000002b2ff60] compression: 10 [flac @ 0000000002b2ff60] lpc type: Levinson-Durbin recursion with Welch window [flac @ 0000000002b2ff60] prediction order: 1, 12 [flac @ 0000000002b2ff60] order method: full search [flac @ 0000000002b2ff60] partition order: 0, 8 [flac @ 0000000002b2ff60] block size: 4608 [flac @ 0000000002b2ff60] lpc precision: 15 [flac @ 0000000002bbff60] compression: 11 [flac @ 0000000002bbff60] lpc type: Levinson-Durbin recursion with Welch window [flac @ 0000000002bbff60] prediction order: 1, 32 [flac @ 0000000002bbff60] order method: log search [flac @ 0000000002bbff60] partition order: 0, 8 [flac @ 0000000002bbff60] block size: 4608 [flac @ 0000000002bbff60] lpc precision: 15 [flac @ 000000000035ff60] compression: 12 [flac @ 000000000035ff60] lpc type: Levinson-Durbin recursion with Welch window [flac @ 000000000035ff60] prediction order: 1, 32 [flac @ 000000000035ff60] order method: full search [flac @ 000000000035ff60] partition order: 0, 8 [flac @ 000000000035ff60] block size: 4608 [flac @ 000000000035ff60] lpc precision: 15 I know only the following subset restrictions: * The blocksize bits in the frame header must be 0001-1110. The blocksize must be <=16384; if the sample rate is <= 48000Hz, the blocksize must be <=4608. * The sample rate bits in the frame header must be 0001-1110. * The bits-per-sample bits in the frame header must be 001-111. * If the sample rate is <= 48000Hz, the filter order in LPC subframes must be less than or equal to 12, i.e. the subframe type bits in the subframe header may not be 101100-111111. * The Rice partition order in a Rice-coded residual section must be less than or equal to 8. * Only sample sizes of 8, 12, 16, 20, and 24 are Subset compatible. * There is no limitation with regard to Subset compatibility on the number of channels or the use of mid/side coding. * The only Subset limitation is that the sample rate must be specified in each frame, not just in the STREAMINFO. * The sample rate determines Subset compatibility constraints for blocksize and LPC order. * There are 4 subframe types: Constant, Verbatim, Fixed LPC, and Adaptive LPC. All subframe types are Subset compatible. * If the sample rate is <= 48kHz, the LPC order must be <= 12 in order for the stream to be Subset compatible. * There is no additional constraint on LPC coefficient precision with regard to Subset compatibility or compression level. * There is no constraint on the selection of the residual encoding method. * The Rice order must be <= 8 in order for the stream to be Subset compatible. All of these 12 presets use 4608 block size, that is subset. What about other parameters? How other parameters like "LPC algorithm" and "Search method for selecting prediction order" and "Number of passes to use for Cholesky factorization during LPC analysis" and "Search method for selecting prediction order" affect to subset compatibility? Thank you very much in advance for your help in understanding and explanation of each parameter!
Martijn van Beurden
2014-Jun-18 20:00 UTC
[flac-dev] Please help me understand what values of FFMPEG's "compression_level" preset generate subset FLAC stream and what not-subset?
op 18-06-14 16:54, ???? ?????? schreef:> Please help me understand what values of FFMPEG's "compression_level" > preset generate subset FLAC stream and what not-subset?Levels 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10 should generate subset-compatible streams, 11 and 12 should not. The difference is that 11 and 12 are allowed to use a much larger predictor (32) order which is not allowed in the subset. Other than that, there is no subset-incompatible behaviour.