Commit 01ec75e
fix(deps): add GbmUsage::Separated for per-plane R8 VA-API export
On Mesa iris (Tiger Lake), gbm_bo_create rejects the NV12 fourcc with
every usage flag (HW_VIDEO_ENCODER, HW_VIDEO_DECODER, LINEAR).
Add a GbmUsage::Separated variant that bypasses native NV12 allocation
entirely: each plane is allocated as a separate R8 buffer with LINEAR,
then exported to VA-API via a multi-object VADRMPRIMESurfaceDescriptor
(one DMA-BUF FD per plane).
Changes to the vendored cros-codecs:
- GbmUsage::Separated enum variant
- new_frame(): when usage is Separated, take the per-plane R8 path
even for formats that are normally contiguous (NV12)
- GbmExternalBufferDescriptor: store Vec<File> + object_indices instead
of a single File, so multi-BO frames can be exported
- to_native_handle(): handle both single-BO and multi-BO frames,
creating the correct num_objects / object_index mapping
Changes to the encoder/decoder nodes:
- Four-level GBM probe: Encode → Decode → Linear → Separated
- Decoder alloc callbacks: Decode → Linear → Separated fallback
Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>1 parent fb7fa52 commit 01ec75e
File tree
3 files changed
+95
-31
lines changed- crates/nodes/src/video
- vendor/cros-codecs/src/video_frame
3 files changed
+95
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
580 | 580 | | |
581 | 581 | | |
582 | 582 | | |
583 | | - | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
584 | 597 | | |
585 | 598 | | |
586 | 599 | | |
| |||
946 | 959 | | |
947 | 960 | | |
948 | 961 | | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
949 | 968 | | |
950 | 969 | | |
951 | 970 | | |
952 | | - | |
| 971 | + | |
953 | 972 | | |
954 | 973 | | |
955 | 974 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
313 | 326 | | |
314 | 327 | | |
315 | 328 | | |
| |||
670 | 683 | | |
671 | 684 | | |
672 | 685 | | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
673 | 692 | | |
674 | 693 | | |
675 | 694 | | |
676 | | - | |
| 695 | + | |
677 | 696 | | |
678 | 697 | | |
679 | 698 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
| 266 | + | |
267 | 267 | | |
268 | | - | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
269 | 275 | | |
270 | 276 | | |
271 | 277 | | |
| |||
274 | 280 | | |
275 | 281 | | |
276 | 282 | | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
281 | 290 | | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
287 | 298 | | |
288 | 299 | | |
289 | 300 | | |
290 | 301 | | |
291 | 302 | | |
292 | | - | |
| 303 | + | |
293 | 304 | | |
294 | 305 | | |
295 | 306 | | |
| |||
314 | 325 | | |
315 | 326 | | |
316 | 327 | | |
317 | | - | |
| 328 | + | |
318 | 329 | | |
319 | 330 | | |
320 | 331 | | |
321 | | - | |
| 332 | + | |
322 | 333 | | |
323 | 334 | | |
324 | 335 | | |
325 | | - | |
326 | | - | |
| 336 | + | |
327 | 337 | | |
328 | 338 | | |
329 | 339 | | |
| |||
398 | 408 | | |
399 | 409 | | |
400 | 410 | | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | 411 | | |
408 | 412 | | |
409 | 413 | | |
410 | 414 | | |
411 | 415 | | |
412 | 416 | | |
413 | 417 | | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
414 | 435 | | |
415 | 436 | | |
416 | 437 | | |
417 | 438 | | |
418 | 439 | | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
423 | 443 | | |
424 | 444 | | |
425 | 445 | | |
| |||
461 | 481 | | |
462 | 482 | | |
463 | 483 | | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
464 | 489 | | |
465 | 490 | | |
466 | 491 | | |
| |||
526 | 551 | | |
527 | 552 | | |
528 | 553 | | |
529 | | - | |
| 554 | + | |
530 | 555 | | |
531 | 556 | | |
532 | 557 | | |
| |||
541 | 566 | | |
542 | 567 | | |
543 | 568 | | |
| 569 | + | |
544 | 570 | | |
545 | 571 | | |
546 | 572 | | |
| |||
0 commit comments