Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson)
• DeepStream 6.2
• JetPack Version (Version: 5.1.1-b56)
• Issue Type( questions,)
• Requirement details( This is for new requirement)
Problem Description:
I’m developing a custom GStreamer plugin for DeepStream that needs to save processed JPEG images from video frames. Currently using an inefficient CPU-based approach (which works fine) and seeking to implement a fully GPU-accelerated pipeline to eliminate all GPU↔CPU transfer bottlenecks.
Current Approach:
NvBufSurface (GPU) → CPU Memory → cv::Mat → OpenCV Operations → cv::imwrite → JPEG File
↑____________ GPU→CPU Transfer Bottleneck ____________↑
New Approach: NPP +NvJPEG Encoder Integration :
NvBufSurface (GPU) → NPP Operations (GPU) → NvJpegEncoder (GPU) → JPEG File
↑___________ All GPU, Zero CPU Transfers ___________↑
I’m planning to replace OpenCV operations with NPP (NVIDIA Performance Primitives) to perform all image processing operations (drawing, resizing, color space conversions, etc.) directly on NvBufSurface GPU data, then use NvJPEGEncoder to save the processed results to JPEG files.
Reference:
Following 05_jpeg_encode sample documentation for JPEG encoding implementation.
Progress So Far:
✅ Successfully saved some JPEG images for few frames from NvBufSurface using NvJPEGEncoder
❌ Application crashes after saving a few images.
🎯 Yet to resolve the crash and integrate NPP operations before JPEG encoding.
Specific Questions:
-
Is NPP + NvJPEGEncoder integration viable and recommended for DeepStream plugins?
-
Performance vs Memory: Would this provide significant memory utilization improvements? (Current application works fine, just want to optimize memory usage)
-
Memory Management: Are there specific considerations when chaining NPP operations with NvJPEGEncoder in GStreamer plugin context?
-
Stability: Will there be crashes when chaining NPP operations with NvJPEGEncoder? Any known pitfalls?
Alternative Approaches:
If this approach isn’t optimal, what other GPU-only methods would minimize CPU↔GPU transfers for image processing + JPEG encoding in DeepStream?
Any guidance on NvBufSurface-NPP-NvJPEGEncoder workflows or alternative GPU-only approaches would be appreciated.