Commit 5ce9165
committed
Added support for multi-plane rendering (YUV)
- kmscap_ctx_t: Added texture_uv (UV plane), nv12_effect (compiled shader), and yuv_color_space (BT.709 / BT.601 setting).
- kmscap_build_color_matrix(): New helper that computes the correct limited-range YUV→RGB 4×4 matrix for either BT.709 or BT.601 at runtime.
- kmscap_destroy_texture(): Now destroys texture_uv alongside the Y texture in a single obs_enter_graphics() block.
- kmscap_import_fb(): NV12/NV21 now take a separate code path — Y is imported as GS_R8 (full res) and UV as GS_R8G8 (half res), each as a single-plane DMA-BUF call.
- kmscap_video_render(): When texture_uv is set, dispatches through the nv12_effect shader instead of OBS_EFFECT_DEFAULT; then overlays the cursor with the default effect on top.
- kmscap_create/destroy: Loads/destroys the NV12 effect file via obs_module_file().
- kmscap_update/get_defaults/get_properties: Adds the YUV Color Space dropdown (BT.709 default, BT.601 option).1 parent 1e4c82e commit 5ce9165
4 files changed
Lines changed: 304 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
58 | 63 | | |
59 | 64 | | |
60 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
0 commit comments