fn write_film_grain_segment( params: &GrainTableSegment, output: &mut BufWriter<File>, ) -> Result<()>