The compression level is roughly proportional to the amount of effort
the encoder expends to compress the file. A higher level usually
means more computation but higher compression. The default level is
suitable for most applications.
Currently the levels range from \c 0 (fastest, least compression) to
\c 8 (slowest, most compression). A value larger than \c 8 will be
treated as \c 8.
This function automatically calls the following other \c _set_
functions with appropriate values, so the client does not need to
unless it specifically wants to override them:
- FLAC__stream_encoder_set_do_mid_side_stereo()
- FLAC__stream_encoder_set_loose_mid_side_stereo()
- FLAC__stream_encoder_set_apodization()
- FLAC__stream_encoder_set_max_lpc_order()
- FLAC__stream_encoder_set_qlp_coeff_precision()
- FLAC__stream_encoder_set_do_qlp_coeff_prec_search()
- FLAC__stream_encoder_set_do_escape_coding()
- FLAC__stream_encoder_set_do_exhaustive_model_search()
- FLAC__stream_encoder_set_min_residual_partition_order()
- FLAC__stream_encoder_set_max_residual_partition_order()
- FLAC__stream_encoder_set_rice_parameter_search_dist()
\default \c 5
\param encoder An encoder instance to set.
\param value See above.
\assert
\code encoder != NULL \endcode
\retval FLAC__bool
\c false if the encoder is already initialized, else \c true.
Set the compression level
The compression level is roughly proportional to the amount of effort the encoder expends to compress the file. A higher level usually means more computation but higher compression. The default level is suitable for most applications.
Currently the levels range from \c 0 (fastest, least compression) to \c 8 (slowest, most compression). A value larger than \c 8 will be treated as \c 8.
This function automatically calls the following other \c _set_ functions with appropriate values, so the client does not need to unless it specifically wants to override them: - FLAC__stream_encoder_set_do_mid_side_stereo() - FLAC__stream_encoder_set_loose_mid_side_stereo() - FLAC__stream_encoder_set_apodization() - FLAC__stream_encoder_set_max_lpc_order() - FLAC__stream_encoder_set_qlp_coeff_precision() - FLAC__stream_encoder_set_do_qlp_coeff_prec_search() - FLAC__stream_encoder_set_do_escape_coding() - FLAC__stream_encoder_set_do_exhaustive_model_search() - FLAC__stream_encoder_set_min_residual_partition_order() - FLAC__stream_encoder_set_max_residual_partition_order() - FLAC__stream_encoder_set_rice_parameter_search_dist()
The actual values set for each level are: <table> <tr> <td><b>level</b><td> <td>do mid-side stereo<td> <td>loose mid-side stereo<td> <td>apodization<td> <td>max lpc order<td> <td>qlp coeff precision<td> <td>qlp coeff prec search<td> <td>escape coding<td> <td>exhaustive model search<td> <td>min residual partition order<td> <td>max residual partition order<td> <td>rice parameter search dist<td> </tr> <tr> <td><b>0</b><td> <td>false<td> <td>false<td> <td>tukey(0.5)<td> <td>0<td> <td>0<td> <td>false<td> <td>false<td> <td>false<td> <td>0<td> <td>3<td> <td>0<td> </tr> <tr> <td><b>1</b><td> <td>true<td> <td>true<td> <td>tukey(0.5)<td> <td>0<td> <td>0<td> <td>false<td> <td>false<td> <td>false<td> <td>0<td> <td>3<td> <td>0<td> </tr> <tr> <td><b>2</b><td> <td>true<td> <td>false<td> <td>tukey(0.5)<td> <td>0<td> <td>0<td> <td>false<td> <td>false<td> <td>false<td> <td>0<td> <td>3<td> <td>0<td> </tr> <tr> <td><b>3</b><td> <td>false<td> <td>false<td> <td>tukey(0.5)<td> <td>6<td> <td>0<td> <td>false<td> <td>false<td> <td>false<td> <td>0<td> <td>4<td> <td>0<td> </tr> <tr> <td><b>4</b><td> <td>true<td> <td>true<td> <td>tukey(0.5)<td> <td>8<td> <td>0<td> <td>false<td> <td>false<td> <td>false<td> <td>0<td> <td>4<td> <td>0<td> </tr> <tr> <td><b>5</b><td> <td>true<td> <td>false<td> <td>tukey(0.5)<td> <td>8<td> <td>0<td> <td>false<td> <td>false<td> <td>false<td> <td>0<td> <td>5<td> <td>0<td> </tr> <tr> <td><b>6</b><td> <td>true<td> <td>false<td> <td>tukey(0.5)<td> <td>8<td> <td>0<td> <td>false<td> <td>false<td> <td>false<td> <td>0<td> <td>6<td> <td>0<td> </tr> <tr> <td><b>7</b><td> <td>true<td> <td>false<td> <td>tukey(0.5)<td> <td>8<td> <td>0<td> <td>false<td> <td>false<td> <td>true<td> <td>0<td> <td>6<td> <td>0<td> </tr> <tr> <td><b>8</b><td> <td>true<td> <td>false<td> <td>tukey(0.5)<td> <td>12<td> <td>0<td> <td>false<td> <td>false<td> <td>true<td> <td>0<td> <td>6<td> <td>0<td> </tr> </table>
\default \c 5 \param encoder An encoder instance to set. \param value See above. \assert \code encoder != NULL \endcode \retval FLAC__bool \c false if the encoder is already initialized, else \c true.