Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU) GPU
• DeepStream Version 5.0.1
• JetPack Version (valid for Jetson only)
• TensorRT Version 7.2.2
• NVIDIA GPU Driver Version (valid for GPU only) 440.87
• Issue Type( questions, new requirements, bugs) question
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
I’m creating original convert which convert from NV12 to UYVU.
And the convert logic is as follows.
global void
d_nv12_uyvy(unsigned char *d_src_Y, unsigned char d_src_UV, unsigned char d_dest, int image_width, int image_height)
{
unsigned int tx = blockIdx.xblockDim.x + threadIdx.x;
unsigned int ty = blockIdx.yblockDim.y + threadIdx.y;
d_dest[(ty * image_width * 2) + (tx * 2)] = d_src_UV[(((ty - (ty & 0x1)) * image_width)/2) + tx];
d_dest[(ty * image_width * 2) + ((tx * 2) + 1)] = d_src_Y[(ty * image_width) + tx];
}
#define D_CUDA_BLOCKDIM_X 32
#define D_CUDA_BLOCKDIM_Y 8
extern “C”
double nv12_uyvy_cuda(unsigned char *d_src, unsigned char *d_dest, int image_width, int image_height)
{
int blockX = D_CUDA_BLOCKDIM_X;
int blockY = D_CUDA_BLOCKDIM_Y;
dim3 blockDim (D_CUDA_BLOCKDIM_X , D_CUDA_BLOCKDIM_Y);
dim3 gridDim ((image_width ) / blockX, (image_height) / blockY);
unsigned char *d_src_Y = d_src;
unsigned char *d_src_UV = d_src + image_width * image_height;
{
d_nv12_uyvy<<< gridDim, blockDim >>>(d_src_Y, d_src_UV, d_dest, (image_width), (image_height));
}
return 1;
}
However, I cannot convert the NV12 data, which is outputted from nvv4l2decoder, correctly.
For example, the ball image is converted to wide spreading ball image as attached image.
Now, I find that there are some NV12 format in GStreamer.
https://gstreamer.freedesktop.org/documentation/video/video-format.html?gi-language=c
So I want to confirm which format is outputted from nvv4l2decoder.
GST_VIDEO_FORMAT_NV12 (23) – planar 4:2:0 YUV with interleaved UV plane
GST_VIDEO_FORMAT_NV12_64Z32 (53) – NV12 with 64x32 tiling in zigzag pattern (Since: 1.4)
GST_VIDEO_FORMAT_NV12_4L4 (97) – NV12 with 4x4 tiles in linear order.
GST_VIDEO_FORMAT_NV12_32L32 (98) – NV12 with 32x32 tiles in linear order.
Regards,
hiro