hi everyone,when i run the jetson nano samples 02_video_dec_cuda,i found that if my dec h264 file is bt709 ,the 02_video_dec_cuda will report that error ,
libv4l2_nvvidconv (0):(1688) (ERROR) : NvDdkVicConfigure Failed
libv4l2_nvvidconv (0):(1710) (ERROR) : NVVIDCONV ERROR 2
my test run command is sudo ./video_dec_cuda 1080P.h264 H264 -o tt.yuv --input-nalu --disable-rendering
if the dec h264 file is bt601,that will dec ok,so i want to know whether the nano 02_video_dec_cuda can not dec bt709 h264 stream
thanks for your help!!!
Hi,
Please use NvBufferTransform(). We encourage users to use NvBuffer APIs. NvVideoConverter is kept for backward compatibility and no longer upgraded.
@DaneLLL,hi ,thanks for your help,if i want to convert the dec yuv to bgr ,so i just can found that samples 07_video_convert can fix this,but that sample alsa use the NvVideoConverter ,so how can i do
@DaneLLL,you mean we can modify that follow source coder about that input_params.colorFormat to NvBufferColorFormat_ABGR32,then wo can use the NvBufferTransform to convert yuv to bgr?
Hi,
Yes, please look at definition in nvbuf_utils.h:
/**
* Transforms one DMA buffer to another DMA buffer.
* This function can support transforms for copying, scaling, fliping, rotating, and cropping.
* @param[in] src_dmabuf_fd DMABUF FD of source buffer
* @param[in] dst_dmabuf_fd DMABUF FD of destination buffer
* @param[in] transform_params transform parameters
*
* @return 0 for sucess, -1 for failure.
*/
int NvBufferTransform (int src_dmabuf_fd, int dst_dmabuf_fd, NvBufferTransformParams *transform_params);
Source buffer is from decoder and you need to allocate destination buffer in NvBufferColorFormat_ABGR32. After calling NvBufferTransform(), you will get RGBA buffer.
@DaneLLL, ok,thanks for your help,last question is that i want to know whether other samples for example the video dec ,jpeg dec ,It’s better not to use the NvVideoConverter::createVideoConverter to create convert,and use the NVBUF_TRANSFORM_API to fix it
@DaneLLL,hi i want to know whether the NvBufferTransform() can conversion the yuv to ABGR32 or XRGB32,if i do not want the alpha,just bgr 24bit data,so that NvBufferTransform can fix it