yotarok / flacenc-rs

FLAC encoder written in Rust
Apache License 2.0
20 stars 3 forks source link

Fuzz test "frame-encode" failed. #142

Closed yotarok closed 10 months ago

yotarok commented 10 months ago

Input:

        Input {
            channel_count: 2,
            block_size: 23556,
            sample_rate: 73216,
            bits_per_sample: 8,
            config: Encoder {
                block_sizes: [
                    23556,
                ],
                multithread: true,
                workers: None,
                stereo_coding: StereoCoding {
                    use_leftside: true,
                    use_rightside: true,
                    use_midside: true,
                },
                subframe_coding: SubFrameCoding {
                    use_constant: true,
                    use_fixed: true,
                    use_lpc: true,
                    fixed: Fixed {
                        max_order: 2,
                        use_entropy_estimator: true,
                    },
                    qlpc: Qlpc {
                        lpc_order: 12,
                        quant_precision: 13,
                        use_direct_mse: false,
                        mae_optimization_steps: 0,
                        window: Tukey {
                            alpha: 0.8588214,
                        },
                    },
                    prc: Prc {
                        max_parameter: 12,
                    },
                },
            },
            signals: [
                Clip {
                    inner: Sine {
                        period: 21893,
                        amplitude: 0.92941177,
                        initial_phase: 5.8396664,
                    },
                    min: -1.0,
                    max: 1.0,
                },
                Clip {
                    inner: Sine {
                        period: 21892,
                        amplitude: 0.92941177,
                        initial_phase: 5.8396664,
                    },
                    min: -1.0,
                    max: 1.0,
                },
            ],
        }

Panic message:

thread '<unnamed>' panicked at /usr/local/google/home/yotaro/proj/flacenc-rs/src/lpc.rs:548:13:
assertion failed: v.is_normal() || v == 0.0
yotarok commented 10 months ago

fix merged