Repository navigation
Commit d37a15e
committed
perf: decode through Direct3D 12 first in the media player on Windows
FFmpeg 8.1 has Direct3D 12 hwaccels for H.264 and VP9. The Windows build now
enables them (h264_d3d12va, vp9_d3d12va), and the player tries a Direct3D 12
device before the Direct3D 11 one it used. A machine without Windows 10 2004
or a driver that decodes through Direct3D 12 has no such device, and goes on
with Direct3D 11 as before. The pictures are the same: every test of the
hardware path compares them with software decoding.
Reading a picture back is what costs processor time on this path, and
Direct3D 12 does it for about half of what Direct3D 11 does. Process CPU per
frame in the player on an NVIDIA GeForce RTX 3080, median of four runs of
steady playback, one machine and synthetic media:
software Direct3D 11 Direct3D 12
1080p H.264 3.6 ms 4.2 ms 2.1 ms
4K H.264 6.6 ms 12.4 ms 5.4 ms
Direct3D 11 used more processor time than software at 4K, Direct3D 12 less.
The component list changed, so the next build rebuilds FFmpeg on Windows.1 parent 7ff8353 commit d37a15e
4 files changed
Lines changed: 20 additions & 7 deletions
File tree
- docs/guide/media
- webrtc-java-media/src/main
- cpp
- dependencies/ffmpeg
- src/media
- java/dev/onvoid/webrtc/media/player
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
| 225 | + | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
136 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| |||
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
149 | 161 | | |
150 | 162 | | |
151 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| |||
0 commit comments