feat(MediaSystem): 增加运动模糊与修复录制色彩发灰#5
Open
RolinShmily wants to merge 1 commit into
Open
Conversation
RolinShmily
force-pushed
the
motion-blur
branch
5 times, most recently
from
July 6, 2026 15:37
772050e to
577b491
Compare
1. 录制运动模糊 (Motion Blur)
- 基于高频帧累积实现录制运动模糊,平滑录制画面的拖影过渡。
- 全时采样曝光:开启后不舍弃多余的高频帧,在时间槽内全部累积后取均值。
- MotionBlurProcessor 独立模块:将帧累积、计算着色器调度、色彩空间转换从 VCD3D11Manager
中抽取为独立的 MotionBlurProcessor 类,通过组合方式使用,解决上帝类问题。
- 轻量 CSBindingGuard 替代 D3D11StateSaver:每次调度只备份/恢复实际修改的 4 个 CS 绑定
(1 Shader + 1 SRV + 1 UAV + 1 CB),减少 90%+ 的 D3D11 API 调用,降低 GPU 开销。
- 线性空间累积:sRGB → Linear 累加 → 均值后转回 sRGB,避免拖影发暗。
2. 画面色彩修复 (Color Range Mismatch)
- 修复录制视频在播放器中对比度不足、发灰的问题。
- 将视频流的 color_range 标记改为 AVCOL_RANGE_MPEG (Limited Range),匹配硬件 RGB->YUV
转换的实际输出范围,使播放器正确映射对比度。
3. 关键解耦与UI调整
- 移除 MediaSystem 中所有 CS2 引擎依赖(TimeController、host_framerate 指令下发等)。
- 移除 TwoPassDirector 模块,相关双程音画分离功能将移至 CS2 专属模块中实现。
- Rename '简易运动模糊' to '运动模糊' in UI.
- Add '模糊强度 (快门角度)' slider to adjust the shutter parameter.
- Update RecordParams to support the new shutter setting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.