You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
2.1KB

  1. /*
  2. * Copyright (c) 2017 Paul B Mahol
  3. *
  4. * This file is part of FFmpeg.
  5. *
  6. * FFmpeg is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * FFmpeg is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with FFmpeg; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. #ifndef AVFILTER_AFIR_H
  21. #define AVFILTER_AFIR_H
  22. #include "libavutil/audio_fifo.h"
  23. #include "libavutil/common.h"
  24. #include "libavutil/float_dsp.h"
  25. #include "libavutil/opt.h"
  26. #include "libavcodec/avfft.h"
  27. #include "audio.h"
  28. #include "avfilter.h"
  29. #include "formats.h"
  30. #include "internal.h"
  31. typedef struct AudioFIRContext {
  32. const AVClass *class;
  33. float wet_gain;
  34. float dry_gain;
  35. float length;
  36. int gtype;
  37. float ir_gain;
  38. int ir_format;
  39. float max_ir_len;
  40. int response;
  41. int w, h;
  42. AVRational frame_rate;
  43. int ir_channel;
  44. int minp;
  45. int maxp;
  46. float gain;
  47. int eof_coeffs;
  48. int have_coeffs;
  49. int nb_coeffs;
  50. int nb_taps;
  51. int part_size;
  52. int part_index;
  53. int coeff_size;
  54. int block_size;
  55. int nb_partitions;
  56. int nb_channels;
  57. int ir_length;
  58. int fft_length;
  59. int nb_coef_channels;
  60. int one2many;
  61. int nb_samples;
  62. RDFTContext **rdft, **irdft;
  63. float **sum;
  64. float **block;
  65. FFTComplex **coeff;
  66. AVAudioFifo *fifo;
  67. AVFrame *in[2];
  68. AVFrame *buffer;
  69. AVFrame *video;
  70. int64_t pts;
  71. int index;
  72. AVFloatDSPContext *fdsp;
  73. void (*fcmul_add)(float *sum, const float *t, const float *c,
  74. ptrdiff_t len);
  75. } AudioFIRContext;
  76. void ff_afir_init_x86(AudioFIRContext *s);
  77. #endif /* AVFILTER_AFIR_H */