YuyvToBgraOp
🚧 Documentation is under development
The Holoscan SDK guide is currently under active development. Some sections may be incomplete or change without notice.
Questions? Contact RidgeRun or email to support@ridgerun.com.
-
Overview
-
Build, Run, and Validate
-
Core Concepts
-
Operators and Graphs
-
Tensor Data and Memory
-
Interprocess Communication
-
-
Application and Operator Development
- Building an HSDK Application
- Writing a Minimal Operator
- Typed Parameters and Configuration
- Reading, Writing, and Forwarding Data
- Writing Tensor Operators
- Complete Operator Patterns
- Authoring Runtime Behavior
- Runtime Parameter Updates
- Lifecycle Callbacks and Restart Control
- Performance and Debugging
- SDK Source Map
-
Operator Reference
-
Core Operators
-
Holoscan Camera
-
Holoscan RidgeRun
- Overview
- Build and Installation
- ArgusCameraOp
- V4L2SourceOp
- V4L2UserPtrSourceOp
- BgraToPlanarTensorOp
- RawBayerToBgraOp
- RawBayerToYoloTensorOp
- YuyvToBgraOp
- TensorRtInferenceOp
- DrmDisplayOp
- DrmBgraDisplayOp
- X11DisplayOp
- CudaCompositorOp
- DepthColorizerOp
- FakesinkOp
- FrameSkipperOp
- InterprocessSrcOp
- TestPatternOp
-
-
Migration from Holoscan 4.x
-
Examples
-
Core
-
Holoscan Camera
-
Holoscan RidgeRun
-
-
Benchmark and Use Cases
-
Holoscan vs GStreamer
- Overview
-
Capture and Display
-
Capture and Inference
- Compare the workloads
- Implemented Applications
- Framework Selection
- Interprocess
-
YuyvToBgraOp
YuyvToBgraOp converts a packed YUYV CUDA tensor into a contiguous CUDA BGRA tensor. It is the format-conversion stage used by the RidgeRun V4L2 display path before an X11 or DRM BGRA sink.
Input arguments
The constructor takes positive width and height values. Width must be even because packed YUYV represents two pixels per four-byte group.
Ports and data contract
| Port | Memory | Queue | Trigger | Contract |
|---|---|---|---|---|
input
|
CUDA device, contiguous | SDK default | OnEach
|
U8 tensor with shape [height, width, 2]; the last dimension contains packed YUYV bytes.
|
output
|
CUDA device, runtime pool | N/A | Same activation | New U8 tensor with shape [height, width, 4] in BGRA order.
|
The operator uses the execution-context CUDA stream and forwards the input sample metadata to the output.
V4L2 capture -> YuyvToBgraOp -> X11DisplayOp V4L2 capture -> YuyvToBgraOp -> DrmBgraDisplayOp
Build
Follow Holoscan RidgeRun Build and Installation for the module build and installation. The operator-specific include, target, and runtime requirements are listed below.
Include yuyv_to_bgra/yuyv_to_bgra.hpp and link holoscan::yuyv_to_bgra.
Example
The kernel processes one YUYV pair at a time. It interprets Y0 U Y1 V using limited-range BT.601 coefficients, clamps the resulting RGB values to [0,255] and writes two opaque BGRA pixels. The conversion is a resize-free format change; width and height remain unchanged. The output is a runtime-pool Tensor and the input metadata is forwarded.
Construction rejects non-positive dimensions, odd widths and image-size overflow. Compute additionally validates the exact byte span, shape, dtype, CUDA placement and contiguity, and returns an error when the graph has no CUDA stream or the output allocation/kernel launch fails.
auto convert = graph.op<YuyvToBgraOp>("convert", width, height);
graph.add_flow(camera->frame, convert->input);
graph.add_flow(convert->output, x11_display->input);