1. 06 3月, 2020 1 次提交
    • J
      libobs: Only manipulate input source ref counts · 6d5bb8b2
      jpark37 提交于
      Filters can be hidden without being shown, which can unbalance the ref
      count and destroys them prematurely. We really only care about input
      sources having a chance to clean up from the render thread from the hide
      handler, Windows 10 window capture specifically.
      6d5bb8b2
  2. 01 3月, 2020 1 次提交
  3. 23 2月, 2020 1 次提交
  4. 31 1月, 2020 1 次提交
  5. 28 12月, 2019 1 次提交
    • J
      libobs: Add manual transition "torque" support · 2d35f863
      jp9000 提交于
      Allows the ability for manual transitioning to smoothly flow
      (interpolate) to the intended transition point over a short period of
      time rather than simply setting a hard transition point number.  Doing
      this allows manual transitioning to occur more smoothly, and in a more
      visually pleasant way.
      2d35f863
  6. 11 12月, 2019 1 次提交
  7. 25 11月, 2019 1 次提交
  8. 07 11月, 2019 1 次提交
  9. 16 10月, 2019 1 次提交
  10. 20 9月, 2019 2 次提交
  11. 18 9月, 2019 1 次提交
    • J
      libobs: Check to swap BGRX/BGRA in async filters · abaed696
      jp9000 提交于
      If for whatever reason the format is swapped between BGRA/BGRX in an
      async filter, swap the texture to compensate for that.  This allows
      plugins to change the format if necessary.
      abaed696
  12. 31 8月, 2019 2 次提交
    • J
      libobs: Remove redundant function param and for loop · 23111c31
      jp9000 提交于
      Originally when the audio_submix function was created, it used all mixer
      tracks, but at a certain point that was removed because it can only use
      the first track, so some older code was unintentionally left over,
      causing the same code to be executed 6 times mistakenly.  This cleans
      that up by removing the unnecessary function parameter and for loop.
      23111c31
    • J
      libobs: Fix video warnings · 42bf026a
      jpark37 提交于
      42bf026a
  13. 26 8月, 2019 3 次提交
  14. 22 8月, 2019 1 次提交
    • J
      libobs: Add audio lines · 73704f20
      jp9000 提交于
      Adds the "audio_line" internal source type as a bare source type for the
      sole purpose of outputting audio, and the obs_source_info::audio_mix
      callback which allows mixing of those audio lines, which is then treated
      as normal audio for the source.  Audio line objects should be added as
      sub-sources when multiple audio lines from a single source are needed,
      then mixed together with the audio_mix callback.
      
      The difference between the new obs_source_info::audio_mix callback and
      obs_source_info::audio_render is that obs_source_info::audio_mix (along
      with the audio_line source) are only one track, and it outputs audio to
      the source automatically via obs_source_output_audio() when the call
      completes.  This allows the mixed audio to be treated like a normal
      source's audio, in that you can filter it, change its volume, or monitor
      it.
      
      This change was necessary because the CEF (used with the browser source)
      outputs multiple audio streams at once to a single browser source, so
      it's the program's responsibility to mix those streams together itself.
      73704f20
  15. 14 8月, 2019 1 次提交
  16. 12 8月, 2019 1 次提交
  17. 10 8月, 2019 1 次提交
    • J
      libobs: Separate textures for YUV input · bdd8d640
      jpark37 提交于
      The shaders to unpack YUV information from the same texture were rather
      complicated. Breaking them up into separate textures makes the shaders
      much simpler, and we can remove the PRECISION_OFFSET hack.
      
      Performance also gets a nice boost on Intel for planar textures.
      
      Intel GPA, SetStablePowerState, Intel HD Graphics 530, 1920x1080
      
      UYVY: 473 us -> 457 us
      YUY2: 492 us -> 422 us
      YVYU: 491 us -> 441 us
      I420: 1637 us -> 505 us
      I422: 1644 us -> 482 us
      I444: 1653 us -> 504 us
      NV12: 1656 us -> 369 us
      Y800 (limited): 270 us -> 277 us
      Y800 (full): 263 us -> 289 us
      RGB (limited): 341 us -> 411 us
      BGR3 (limited): 512 us -> 509 us
      BGR3 (full): 527 us -> 534 us
      bdd8d640
  18. 07 8月, 2019 1 次提交
    • J
      libobs: Fix stale format in async frame cache · b0e7c5d0
      jpark37 提交于
      The video format is not updated if switching between cache-compatible
      formats, e.g. YUY2 and YVYU, resulting in the wrong conversion technique
      being used. This change ensures the format is always up-to-date.
      b0e7c5d0
  19. 26 7月, 2019 1 次提交
  20. 13 7月, 2019 1 次提交
    • M
      libobs: Call both get_defaults and get_defaults2 · 3f6bbe2d
      Michael Fabian 'Xaymar' Dirks 提交于
      Unlike get_properties, there is not reason to not call get_defaults if it is
      given in addition to get_defaults2. Additonally this fixes the bug with
      'init_encoder' which would only ever call get_defaults, resulting in broken
      encoders if those used get_defaults2.
      3f6bbe2d
  21. 06 7月, 2019 1 次提交
    • J
      libobs: Buffer-smoothing enhancements · da87f08d
      James Park 提交于
      If an audio source does not provide enough data at a steady pace, the
      timestamp update does not happen, and buffering increases until it
      maxes out. To counteract this, update the timestamp anyway.
      
      Another issue for decoupled audio sources is that timing is not
      adjusted for divergence from system time. Making this adjustment is
      better for timing stability.
      
      5+ hours of stable audio without any buffering on my GV-USB2 where it
      used to add 21ms every 5 mintues or so.
      
      Fixes https://obsproject.com/mantis/view.php?id=1269
      da87f08d
  22. 27 6月, 2019 1 次提交
    • J
      libobs: Fix format selection · 2ef25ceb
      jpark37 提交于
      Fix ternary test to use BGRX render targets for YUV to RGB
      conversions. The previous behavior may have been fine though since
      the shaders fill the alpha channel with 1.0 anyway.
      2ef25ceb
  23. 24 6月, 2019 1 次提交
    • J
      clang-format: Apply formatting · f53df7da
      jp9000 提交于
      Code submissions have continually suffered from formatting
      inconsistencies that constantly have to be addressed.  Using
      clang-format simplifies this by making code formatting more consistent,
      and allows automation of the code formatting so that maintainers can
      focus more on the code itself instead of code formatting.
      f53df7da
  24. 19 6月, 2019 1 次提交
    • J
      libobs: Full-screen triangle format conversions · aa22b61e
      James Park 提交于
      The cache coherency of rasterization for full-screen passes is better
      using an oversized triangle that is clipped rather than two triangles.
      Traversal order of rasterization is GPU-specific, but will almost
      certainly be better using an undivided primitive.
      
      A smaller benefit is that quads along the diagonal are not evaluated
      multiple times, but that's minor in comparison.
      
      Redo format shaders to bypass vertex buffer, and input layout. Add
      global shader bool "obs_glsl_compile" to make API-specific decisions,
      i.e. handle upside-down UVs. gl_ortho is not needed for format
      conversion because the vertex shader does not use ViewProj anymore.
      
      This can be applied to more situations, but start small first.
      
      Testbed full screen passes, Intel HD Graphics 530:
      RGBA -> UYVX: 467 -> 439 us, ~6% savings
      UYVX -> uv: 295 -> 239 us, ~19% savings
      aa22b61e
  25. 13 6月, 2019 1 次提交
  26. 30 5月, 2019 1 次提交
  27. 20 5月, 2019 1 次提交
    • J
      libobs: Remove unreachable YUV decode paths · ab8e895b
      James Park 提交于
      A previous refactoring to make DrawMatrix unnecessary has left behind
      unreachable YUV conversions. Even if this code was somehow reachable,
      DrawMatrix for YUV -> RGB doesn't exist anymore, so they would render
      incorrectly anyway.
      ab8e895b
  28. 13 5月, 2019 1 次提交
    • V
      libobs: Add transition and showing counter functions · 52235ba8
      VodBox 提交于
      This commit adds a function to forcefully stop a transition, and to
      increment/decrement the showing counter for a source with the MAIN_VIEW
      type.
      
      These functions are needed for the transition previews to work as
      intended.
      52235ba8
  29. 10 5月, 2019 1 次提交
  30. 26 4月, 2019 2 次提交
    • J
      libobs: Support limited color range for RGB/Y800 sources · a86710ec
      James Park 提交于
      libobs: Add support for limited to full color range conversions when
      using RGB or Y800 formats, and move RGB converison for Y800 formats to
      the GPU.
      
      decklink: Stop hiding color space/range properties for RGB formats, and
      remove "YUV" from "YUV Color Space" and "YUV Color Range".
      
      win-dshow: Remove "YUV" from "YUV Color Space" and "YUV Color Range".
      
      UI: Remove "YUV" from "YUV Color Space" and "YUV Color Range".
      a86710ec
    • J
      libobs: Add better default source color range handling · 8d125dc0
      jp9000 提交于
      Fixes handling of the `obs_source_frame::full_range` member variable,
      which is often set to false by default by many plugins even when using
      RGB, which would cause RGB to be marked as "partial range".  This change
      is crucial for when partial range RBG support is implemented.
      
      Adds `obs_source_frame2` structure that replaces the `full_range` member
      variable with a `range` variable, which uses the `video_range_type` enum
      to allow handling default range values.  This member variable treats
      VIDEO_RANGE_DEFAULT as full range if the format is RGB, and partial
      range if the format is YUV.
      
      Also adds `obs_source_output_video2` and `obs_source_preload_video2`
      functions which use the `obs_source_frame2` structure instead of the
      `obs_source_frame` structure.
      
      When using the original `obs_source_frame`, `obs_source_output_video`,
      and `obs_source_preload_video` functions, RGB will always be full range
      by default for backward compatibility purposes.
      8d125dc0
  31. 25 4月, 2019 1 次提交
  32. 12 4月, 2019 1 次提交
    • J
      libobs: Simplify YUV conversion · 69c21534
      James Park 提交于
      Currently several shaders need "DrawMatrix" techniques to support the
      possibility that the input texture is a "YUV" format. Also, "DrawMatrix"
      is overloaded for translation in both directions when it is written for
      RGB to "YUV" only.
      
      A cleaner solution is to handle "YUV" to RGB up-front as part of format
      conversion, and ensure only RGB inputs reach the other shaders. This is
      necessary to someday perform correct scale filtering without the cost of
      redundant "YUV" conversions per texture tap.
      
      A necessary prerequisite for this is to add conversion support for
      VIDEO_FORMAT_I444, and that is now in place. There was already a hack in
      place to cover VIDEO_FORMAT_Y800. All other "YUV" formats already have
      conversion functions.
      
      "DrawMatrix" has been removed from shaders that only supported "YUV" to
      RGB conversions. It still exists in shaders that perform RGB to "YUV"
      conversions, and the implementations have been sanitized accordingly.
      69c21534
  33. 08 4月, 2019 2 次提交
    • J
      libobs: UI: Use graphics debug markers · 21f4dd63
      James Park 提交于
      Add D3D/GL debug markers to make RenderDoc captures easier to tranverse.
      
      Also add obs_source_get_name_no_null() to avoid boilerplate for safe
      string formatting.
      
      Closes obsproject/obs-studio#1799
      21f4dd63
    • J
      libobs: libobs-d3d11: obs-filters: No excess alpha · d91bd327
      James Park 提交于
      Currently SrcBlendAlpha and DestBlendAlpha are both ONE, and can
      combine together to form two. This is not a noticeable problem for
      UNORM targets because the channels are clamped, but it will likely
      become a problem if FLOAT targets are more widely used.
      
      This change switches DestBlendAlpha to INVSRCALPHA, and starts
      backgrounds as opaque black instead of transparent black. The blending
      behavior of stacked transparents is preserved without overflowing the
      alpha channel.
      d91bd327
  34. 04 12月, 2018 1 次提交
    • J
      libobs: Fix starting timestamp for preloaded frames · 4fa30c61
      jp9000 提交于
      If audio monitoring is enabled and set to output only, the
      obs_source_show_preloaded_video function would still incorrectly set the
      current source audio output timestamp to the current system time, which
      would cause audio to use an incorrect starting point from long ago for
      the first starting audio segment if audio monitoring is then turned off
      some time after having started the source.
      
      Instead, the starting timestamp should be set to 0 if audio monitoring
      is enabled with no output to stream, so that if/when audio monitoring is
      disabled, it recalculates the starting timestamp of the first audio
      packet on the spot again.
      
      Closes obsproject/obs-studio#1522
      4fa30c61