title
Products            Buy            Support Forum            Professional            About            Codec Central
 

FLAC high/medium/low?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kleinfelter

    • Feb 2003
    • 28

    FLAC high/medium/low?

    The flac codec seems to know about high/medium/low compression. When I look at the doc for the flac reference implementation, it knows about compression levels 0 through 8, with the default being 5.

    Is it safe to assume that low=0, medium=5, and high=8?

    Is there any way to access any of the other options? (I suppose I could always go CLI and PowerPack.)

    TIA
  • Spoon
    Administrator
    • Apr 2002
    • 44574

    #2
    You asked for it here is exactly what it does:

    int Compression = 1; // 0 = low 1 = Med 2 = High

    if (Compression == 0)
    {
    do_exhaustive_model_search = false;
    do_escape_coding = false;
    do_mid_side = false;
    loose_mid_side = false;
    qlp_coeff_precision = 0;
    min_residual_partition_order = max_residual_partition_order = 2;
    rice_parameter_search_dist = 0;
    max_lpc_order = 0;
    } else if (Compression == 1) {
    do_exhaustive_model_search = false;
    do_escape_coding = false;
    do_mid_side = true;
    loose_mid_side = false;
    qlp_coeff_precision = 0;
    min_residual_partition_order = max_residual_partition_order = 3;
    rice_parameter_search_dist = 0;
    max_lpc_order = 8;
    } else {
    do_exhaustive_model_search = true;
    do_escape_coding = true;
    do_mid_side = true;
    loose_mid_side = false;
    do_qlp_coeff_prec_search = true;
    min_residual_partition_order = 8;
    max_residual_partition_order = 8;
    rice_parameter_search_dist = 0;
    max_lpc_order = 16;
    }
    Spoon
    www.dbpoweramp.com

    Comment

    • Unregistered

      #3
      Okay Spoon, I'll bite...

      I was looking for the answer to this and now I've read it I'm still non the wiser.

      Would it not be better to use the standard -0 to -8 scale of settings? I use -8 on all my rips but use DMC when having to edit or mangle other wav files to flac. I've used the High option so far, presuming it was -8 but looking at the settings you use they don't seem to match any of the 'standard' ones.

      I'm not a flac expert so don't really understand most of the options I'm just curious why you chose to stray from the path with this one, when ones like Lame have the defacto alt preset standard etc.

      A nice scroll bar, 0 to 8, would be cool!

      Thanks,
      Ailean.

      Comment

      • Spoon
        Administrator
        • Apr 2002
        • 44574

        #4
        More code this time what flac does with the numbers in the exe compressor:

        case '0':
        option_values.do_exhaustive_model_search = false;
        option_values.do_escape_coding = false;
        option_values.do_mid_side = false;
        option_values.loose_mid_side = false;
        option_values.qlp_coeff_precision = 0;
        option_values.min_residual_partition_order = option_values.max_residual_partition_order = 2;
        option_values.rice_parameter_search_dist = 0;
        option_values.max_lpc_order = 0;
        break;
        case '1':
        option_values.do_exhaustive_model_search = false;
        option_values.do_escape_coding = false;
        option_values.do_mid_side = true;
        option_values.loose_mid_side = true;
        option_values.qlp_coeff_precision = 0;
        option_values.min_residual_partition_order = option_values.max_residual_partition_order = 2;
        option_values.rice_parameter_search_dist = 0;
        option_values.max_lpc_order = 0;
        break;
        case '2':
        option_values.do_exhaustive_model_search = false;
        option_values.do_escape_coding = false;
        option_values.do_mid_side = true;
        option_values.loose_mid_side = false;
        option_values.qlp_coeff_precision = 0;
        option_values.min_residual_partition_order = 0;
        option_values.max_residual_partition_order = 3;
        option_values.rice_parameter_search_dist = 0;
        option_values.max_lpc_order = 0;
        break;
        case '3':
        option_values.do_exhaustive_model_search = false;
        option_values.do_escape_coding = false;
        option_values.do_mid_side = false;
        option_values.loose_mid_side = false;
        option_values.qlp_coeff_precision = 0;
        option_values.min_residual_partition_order = option_values.max_residual_partition_order = 3;
        option_values.rice_parameter_search_dist = 0;
        option_values.max_lpc_order = 6;
        break;
        case '4':
        option_values.do_exhaustive_model_search = false;
        option_values.do_escape_coding = false;
        option_values.do_mid_side = true;
        option_values.loose_mid_side = true;
        option_values.qlp_coeff_precision = 0;
        option_values.min_residual_partition_order = option_values.max_residual_partition_order = 3;
        option_values.rice_parameter_search_dist = 0;
        option_values.max_lpc_order = 8;
        break;
        case '5':
        option_values.do_exhaustive_model_search = false;
        option_values.do_escape_coding = false;
        option_values.do_mid_side = true;
        option_values.loose_mid_side = false;
        option_values.qlp_coeff_precision = 0;
        option_values.min_residual_partition_order = option_values.max_residual_partition_order = 3;
        option_values.rice_parameter_search_dist = 0;
        option_values.max_lpc_order = 8;
        break;
        case '6':
        option_values.do_exhaustive_model_search = false;
        option_values.do_escape_coding = false;
        option_values.do_mid_side = true;
        option_values.loose_mid_side = false;
        option_values.qlp_coeff_precision = 0;
        option_values.min_residual_partition_order = 0;
        option_values.max_residual_partition_order = 4;
        option_values.rice_parameter_search_dist = 0;
        option_values.max_lpc_order = 8;
        break;
        case '7':
        option_values.do_exhaustive_model_search = true;
        option_values.do_escape_coding = false;
        option_values.do_mid_side = true;
        option_values.loose_mid_side = false;
        option_values.qlp_coeff_precision = 0;
        option_values.min_residual_partition_order = 0;
        option_values.max_residual_partition_order = 6;
        option_values.rice_parameter_search_dist = 0;
        option_values.max_lpc_order = 8;
        break;
        case '8':
        option_values.do_exhaustive_model_search = true;
        option_values.do_escape_coding = false;
        option_values.do_mid_side = true;
        option_values.loose_mid_side = false;
        option_values.qlp_coeff_precision = 0;
        option_values.min_residual_partition_order = 0;
        option_values.max_residual_partition_order = 6;
        option_values.rice_parameter_search_dist = 0;
        option_values.max_lpc_order = 12;
        break;
        Spoon
        www.dbpoweramp.com

        Comment

        • Unregistered

          #5
          Re: FLAC high/medium/low?

          Ok Spoon.

          I too want to know the answer to kleinfelter's question. I'll reword it in the hope of a straight answer:

          If low = 0 & medium = 1 & high = 2 THEN
          (WTF {does this mean} in regards to the default FLAC settings of 0 - 8?;
          do.give_us_an_answer_we_can_understand;
          please;
          )
          ELSE
          (GOTO Square 1)
          break;

          Comment

          • xoas
            dBpoweramp Guru

            • Apr 2002
            • 2662

            #6
            Re: FLAC high/medium/low?

            Spoon is on vacation. If you compare the sttings in Spoon's first posting with the flac setting values in his second posting, then the answer to Kleinfelter's question,
            "Is it safe to assume that low=0, medium=5, and high=8?"
            appears to be "yes".
            If some techie who understands all this better then me comes up with a different answer, I'd be happy to hear it.
            As to why Spoon might respond to Kleinfelter's question and the followup in the apparently inscrutable manner that he chose, you will need to ask him when he gets back. :komisch12
            Bill Mikkelsen
            Last edited by xoas; June 20, 2004, 04:30 PM.

            Comment

            • Spoon
              Administrator
              • Apr 2002
              • 44574

              #7
              Re: FLAC high/medium/low?

              Just programming waffle
              Spoon
              www.dbpoweramp.com

              Comment

              Working...

              ]]>