1. 02 Aug, 2019 1 commit
    • Lynne's avatar
      lavu/tx: add support for double precision FFT and MDCT · 42e2319b
      Lynne authored
      Simply moves and templates the actual transforms to support an
      additional data type.
      Unlike the float version, which is equal or better than libfftw3f,
      double precision output is bit identical with libfftw3.
      42e2319b
  2. 15 May, 2019 1 commit
    • Lynne's avatar
      libavutil: add an FFT & MDCT implementation · b79b29dd
      Lynne authored
      This commit adds a new API to libavutil to allow for arbitrary transformations
      on various types of data.
      This is a partly new implementation, with the power of two transforms taken
      from libavcodec/fft_template, the 5 and 15-point FFT taken from mdct15, while
      the 3-point FFT was written from scratch.
      The (i)mdct folding code is taken from mdct15 as well, as the mdct_template
      code was somewhat old, messy and not easy to separate.
      
      A notable feature of this implementation is that it allows for 3xM and 5xM
      based transforms, where M is a power of two, e.g. 384, 640, 768, 1280, etc.
      AC-4 uses 3xM transforms while Siren uses 5xM transforms, so the code will
      allow for decoding of such streams.
      A non-exaustive list of supported sizes:
      4, 8, 12, 16, 20, 24, 32, 40, 48, 60, 64, 80, 96, 120, 128, 160, 192, 240,
      256, 320, 384, 480, 512, 640, 768, 960, 1024, 1280, 1536, 1920, 2048, 2560...
      
      The API was designed such that it allows for not only 1D transforms but also
      2D transforms of certain block sizes. This was partly on accident as the stride
      argument is required for Opus MDCTs, but can be used in the context of a 2D
      transform as well.
      Also, various data types would be implemented eventually as well, such as
      "double" and "int32_t".
      
      Some performance comparisons with libfftw3f (SIMD disabled for both):
      120:
        22353 decicycles in     fftwf_execute,     1024 runs,      0 skips
        21836 decicycles in compound_fft_15x8,     1024 runs,      0 skips
      
      128:
        22003 decicycles in       fftwf_execute,   1024 runs,      0 skips
        23132 decicycles in monolithic_fft_ptwo,   1024 runs,      0 skips
      
      384:
        75939 decicycles in      fftwf_execute,    1024 runs,      0 skips
        73973 decicycles in compound_fft_3x128,    1024 runs,      0 skips
      
      640:
       104354 decicycles in       fftwf_execute,   1024 runs,      0 skips
       149518 decicycles in compound_fft_5x128,    1024 runs,      0 skips
      
      768:
       109323 decicycles in      fftwf_execute,    1024 runs,      0 skips
       164096 decicycles in compound_fft_3x256,    1024 runs,      0 skips
      
      960:
       186210 decicycles in      fftwf_execute,    1024 runs,      0 skips
       215256 decicycles in compound_fft_15x64,    1024 runs,      0 skips
      
      1024:
       163464 decicycles in       fftwf_execute,   1024 runs,      0 skips
       199686 decicycles in monolithic_fft_ptwo,   1024 runs,      0 skips
      
      With SIMD we should be faster than fftw for 15xM transforms as our fft15 SIMD
      is around 2x faster than theirs, even if our ptwo SIMD is slightly slower.
      
      The goal is to remove the libavcodec/mdct15 code and deprecate the
      libavcodec/avfft interface once aarch64 and x86 SIMD code has been ported.
      New code throughout the project should use this API.
      
      The implementation passes fate when used in Opus, AAC and Vorbis, and the output
      is identical with ATRAC9 as well.
      b79b29dd
  3. 14 Feb, 2019 1 commit
  4. 21 Dec, 2018 1 commit
  5. 16 Nov, 2018 1 commit
  6. 15 Nov, 2018 1 commit
    • Philip Langdale's avatar
      avutil/hwcontext_cuda: Define and use common CHECK_CU() · 19d3d0c0
      Philip Langdale authored
      We have a pattern of wrapping CUDA calls to print errors and
      normalise return values that is used in a couple of places. To
      avoid duplication and increase consistency, let's put the wrapper
      implementation in a shared place and use it everywhere.
      
      Affects:
      
      * avcodec/cuviddec
      * avcodec/nvdec
      * avcodec/nvenc
      * avfilter/vf_scale_cuda
      * avfilter/vf_scale_npp
      * avfilter/vf_thumbnail_cuda
      * avfilter/vf_transpose_npp
      * avfilter/vf_yadif_cuda
      19d3d0c0
  7. 27 Jun, 2018 1 commit
  8. 21 May, 2018 1 commit
  9. 15 May, 2018 1 commit
  10. 24 Mar, 2018 1 commit
  11. 21 Mar, 2018 1 commit
  12. 05 Jan, 2018 1 commit
  13. 15 Dec, 2017 1 commit
  14. 22 Nov, 2017 2 commits
    • Mark Thompson's avatar
      lavu,lavfi,ffmpeg: Remove experimental OpenCL API · 3650cb2d
      Mark Thompson authored
      This was added in early 2013 and abandoned several months later; as far as
      I can tell, there are no external users.  Future OpenCL use will be via
      hwcontext, which requires neither special OpenCL-only API nor global state
      in libavutil.
      
      All internal users are also deleted - this is just the unsharp filter
      (replaced by unsharp_opencl, which is more flexible) and the deshake filter
      (no replacement).
      3650cb2d
    • Mark Thompson's avatar
      lavu: OpenCL hwcontext implementation · b25d8ef0
      Mark Thompson authored
      b25d8ef0
  15. 13 Sep, 2017 1 commit
  16. 19 Jul, 2017 1 commit
  17. 18 Jul, 2017 1 commit
  18. 27 Jun, 2017 1 commit
    • wm4's avatar
      lavu: add new D3D11 pixfmt and hwcontext · 3303511f
      wm4 authored
      To be used with the new d3d11 hwaccel decode API.
      
      With the new hwaccel API, we don't want surfaces to depend on the
      decoder (other than the required dimension and format). The old D3D11VA
      pixfmt uses ID3D11VideoDecoderOutputView pointers, which include the
      decoder configuration, and thus is incompatible with the new hwaccel
      API. This patch introduces AV_PIX_FMT_D3D11, which uses ID3D11Texture2D
      and an index. It's simpler and compatible with the new hwaccel API.
      
      The introduced hwcontext supports only the new pixfmt.
      
      Frame upload code untested.
      
      Significantly based on work by Steve Lhomme <robux4@gmail.com>, but with
      heavy changes/rewrites.
      
      Merges Libav commit fff90422.
      Signed-off-by: 's avatarDiego Biurrun <diego@biurrun.de>
      3303511f
  19. 14 Jun, 2017 1 commit
  20. 08 Jun, 2017 1 commit
    • wm4's avatar
      lavu: add new D3D11 pixfmt and hwcontext · fff90422
      wm4 authored
      To be used with the new d3d11 hwaccel decode API.
      
      With the new hwaccel API, we don't want surfaces to depend on the
      decoder (other than the required dimension and format). The old D3D11VA
      pixfmt uses ID3D11VideoDecoderOutputView pointers, which include the
      decoder configuration, and thus is incompatible with the new hwaccel
      API. This patch introduces AV_PIX_FMT_D3D11, which uses ID3D11Texture2D
      and an index. It's simpler and compatible with the new hwaccel API.
      
      The introduced hwcontext supports only the new pixfmt.
      
      Frame upload code untested.
      
      Significantly based on work by Steve Lhomme <robux4@gmail.com>, but with
      heavy changes/rewrites.
      Signed-off-by: 's avatarDiego Biurrun <diego@biurrun.de>
      fff90422
  21. 15 May, 2017 1 commit
    • wm4's avatar
      videotoolbox: add hwcontext support · 532b23f0
      wm4 authored
      This adds tons of code for no other benefit than making VideoToolbox
      support conform with the new hwaccel API (using hw_device_ctx and
      hw_frames_ctx).
      
      Since VideoToolbox decoding does not actually require the user to
      allocate frames, the new code does mostly nothing.
      
      One benefit is that ffmpeg_videotoolbox.c can be dropped once generic
      hwaccel support for ffmpeg.c is merged from Libav.
      
      Does not consider VDA or VideoToolbox encoding.
      
      Fun fact: the frame transfer functions are copied from vaapi, as the
      mapping makes copying generic boilerplate. Mapping itself is not
      exported by the VT code, because I don't know how to test.
      532b23f0
  22. 02 Jan, 2017 1 commit
  23. 22 Dec, 2016 1 commit
  24. 21 Dec, 2016 1 commit
  25. 10 Dec, 2016 2 commits
  26. 08 Dec, 2016 1 commit
    • Wan-Teh Chang's avatar
      avutil: fix data race in av_get_cpu_flags() · 2170017a
      Wan-Teh Chang authored
      Make the one-time initialization in av_get_cpu_flags() thread-safe. The
      static variables |flags|, |cpuflags_mask|, and |checked| in
      libavutil/cpu.c are read and written using normal load and store
      operations. These are considered as data races. The fix is to use atomic
      load and store operations.
      
      Remove the |checked| variable because the invalid value of -1 for
      |flags| can be used to indicate the same condition. Rename |flags| to
      |cpu_flags| and move it to file scope.
      
      The fix can be verified by running the libavutil/tests/cpu_init.c test
      program under ThreadSanitizer:
          ./configure --toolchain=clang-tsan
          make libavutil/tests/cpu_init
          libavutil/tests/cpu_init
      
      There should be no warnings from ThreadSanitizer.
      
      Co-author: Dmitry Vyukov of Google, who suggested the data race fix.
      Signed-off-by: 's avatarWan-Teh Chang <wtc@google.com>
      2170017a
  27. 07 Dec, 2016 2 commits
  28. 24 Nov, 2016 1 commit
  29. 23 Nov, 2016 1 commit
  30. 02 Oct, 2016 1 commit
  31. 28 Sep, 2016 1 commit
  32. 21 Jun, 2016 1 commit
  33. 17 May, 2016 1 commit
  34. 07 Apr, 2016 1 commit
    • Diego Biurrun's avatar
      build: miscellaneous cosmetics · 01621202
      Diego Biurrun authored
      Restore alphabetical order in lists, break overly long lines, do some
      prettyprinting, add some explanatory section comments, group parts
      together that belong together logically.
      01621202
  35. 22 Mar, 2016 1 commit
  36. 19 Mar, 2016 1 commit
  37. 09 Mar, 2016 1 commit