mirror of https://github.com/xiph/flac
Only fuzz apodizations on small inputs (#479)
This commit is contained in:
parent
09660e58dd
commit
f64f3782f0
|
@ -139,16 +139,22 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
|||
fuzzing::memory::memory_test(res);
|
||||
}
|
||||
|
||||
if ( size > 2 * 65535 ) {
|
||||
if ( size > 2 * 65535 * 4 ) {
|
||||
/* With large inputs and expensive options enabled, the fuzzer can get *really* slow.
|
||||
* Some combinations can make the fuzzer timeout (>60 seconds). However, while combining
|
||||
* options makes the fuzzer slower, most options do not expose new code when combined.
|
||||
* Therefore, combining slow options is disabled for large inputs. Any input containing
|
||||
* more than 65536 * 2 samples (max blocksize, stereo) is considered large
|
||||
* more than 65536 * 2 samples of 32 bits each (max blocksize, stereo) is considered large
|
||||
*/
|
||||
encoder.set_do_qlp_coeff_prec_search(false);
|
||||
encoder.set_do_exhaustive_model_search(false);
|
||||
}
|
||||
if ( size > 2 * 4096 * 4 + 250 ) {
|
||||
/* With subdivide_tukey in the mix testing apodizations can get really expensive. Therefore
|
||||
* this is disabled for inputs of more than one whole stereo block of 32-bit inputs plus a
|
||||
* bit of overhead */
|
||||
encoder.set_apodization("");
|
||||
}
|
||||
|
||||
{
|
||||
::FLAC__StreamEncoderInitStatus ret;
|
||||
|
|
Loading…
Reference in New Issue