1. 07 Sep, 2017 2 commits
  2. 02 Sep, 2017 1 commit
  3. 01 Sep, 2017 2 commits
  4. 02 Jun, 2017 1 commit
    • Ganapathy Kasi's avatar
      avcodec/nvenc: fix hw accelerated transcode with bframes · 43c417ac
      Ganapathy Kasi authored
      hw accelerated transcode (h264_cuvid -> h264_nvenc with -hwaccel cuvid) was
      broken after the filtergraph initialization was changed to intialize decoder
      first followed by encoder (commit af1761f7).
      During initialzing encoder with bframes, local buffers are allocated
      internally in encoder which fails since no cuda context is available. Now
      pushing the correct cuda context before encoder initialization fixes the issue.
      Also adding push/pop cuda ctx during create/destroy/map/unmap resources and
      destroy encoder session.
      Signed-off-by: 's avatarTimo Rothenpieler <timo@rothenpieler.org>
      43c417ac
  5. 01 Jun, 2017 1 commit
  6. 23 May, 2017 1 commit
  7. 10 May, 2017 2 commits
  8. 09 May, 2017 2 commits
  9. 07 May, 2017 2 commits
  10. 26 Apr, 2017 1 commit
    • Ben Chang's avatar
      avcodec/nvenc: surface allocation reduction · 8de3458a
      Ben Chang authored
      This patch aims to reduce the number of input/output surfaces
      NVENC allocates per session. Previous default sets allocated surfaces to 32
      (unless there is user specified param or lookahead involved). Having large
      number of surfaces consumes extra video memory (esp for higher resolution
      encoding). The patch changes the surfaces calculation for default, B-frames,
      lookahead scenario respectively.
      
      The other change involves surface selection. Previously, if a session
      allocates x surfaces, only x-1 surfaces are used (due to combination
      of output delay and lock toggle logic). To prevent unused surfaces,
      changing surface rotation to using predefined fifo.
      Signed-off-by: 's avatarTimo Rothenpieler <timo@rothenpieler.org>
      8de3458a
  11. 23 Mar, 2017 2 commits
  12. 20 Mar, 2017 1 commit
  13. 17 Mar, 2017 1 commit
  14. 01 Mar, 2017 2 commits
  15. 14 Feb, 2017 1 commit
  16. 13 Feb, 2017 1 commit
  17. 20 Jan, 2017 2 commits
  18. 17 Jan, 2017 1 commit
  19. 01 Jan, 2017 3 commits
  20. 26 Dec, 2016 1 commit
  21. 21 Dec, 2016 1 commit
  22. 30 Nov, 2016 3 commits
  23. 25 Nov, 2016 1 commit
  24. 22 Nov, 2016 2 commits
    • Miroslav Slugeň's avatar
      avcodec/nvenc: better surface allocation alghoritm, fix rc_lookahead · de2faec2
      Miroslav Slugeň authored
      User selectable surfaces are not working correctly, if you set number of
      surfaces on cmdline, it will always use minimum 32 or 48 depends on
      selected resolution, but in nvenc it is not necessary to use so many
      surfaces.
      
      So from now you can define as low as 1 surface and nvenc will still
      work, it will ofcourse lower GPU memory usage by 95% and async_delay to zero
      
      That was the easy part, now littlebit more...
      
      Next part of this patch is to always prefer rc_lookahead to be more
      important for number of surfaces, than user defined surfaces value.
      Maximum rc_lookahead from nvidia documentation is 32, but could increase
      in future generations so there is no limit for this yet. Value
      async_depth is still accepted and prefered over rc_lookahead.
      
      There were also bug when you request more than rc_lookahead > 31, it
      will always set maximum 31, because surface numbers recalculation was
      after setting lookahead, which is now fixed.
      
      Results:
      If you set -rc_lookahead 32 and -bf 3 it will now use only 40 surfaces
      and lower GPU memory usage by 20%, also it will now increase PSNR by 0.012dB
      
      Two more comments:
      
      1. from my internal test, i don't understand addition of 4 more surfaces
      when lookahead is calculated, i didn't used this and everything works as
      with those 4 more extra surfaces, does anybody know what is going on
      there? I looks like it was used for B frames which are calculated
      separately, because B frames maximum is 4.
      
      2. rc_lookahead is defined default to -1, but in test condition if
      (ctx->rc_lookahead) which sets lookahead it will be always true, i don't
      know if this is intended behavior, so in default behavior is lookahead
      always on!
      
      This is default condition when rc_lokkahead is -1 (not defined on
      cmdline), whis is maybe something that is not intended:
      ctx->encode_config.rcParams.enableLookahead = 1;
      ctx->encode_config.rcParams.lookaheadDepth  = 0;
      ctx->encode_config.rcParams.disableIadapt   = 0;
      ctx->encode_config.rcParams.disableBadapt   = 0;
      Signed-off-by: 's avatarTimo Rothenpieler <timo@rothenpieler.org>
      de2faec2
    • Timo Rothenpieler's avatar
      a66835bc
  25. 05 Nov, 2016 1 commit
  26. 19 Oct, 2016 1 commit
  27. 12 Oct, 2016 1 commit