Hi,
Does NvVideoEncoder support NV12 colorformat?
I saw in the thread TX2 tegra_multimedia_api encode/decode issue, it is supported.
But I got “Only YUV420M, YUV444M and P010M are supported” message when using V4L2_PIX_FMT_NV12M.
Hi,
Does NvVideoEncoder support NV12 colorformat?
I saw in the thread TX2 tegra_multimedia_api encode/decode issue, it is supported.
But I got “Only YUV420M, YUV444M and P010M are supported” message when using V4L2_PIX_FMT_NV12M.
Have a check below doc. Looks like only jpeg not support NV12
Hi,
Please apply the patch and give it a try.
diff --git a/multimedia_api/ll_samples/samples/common/classes/NvVideoEncoder.cpp b/multimedia_api/ll_samples/samples/common/classes/NvVideoEncoder.cpp
index f2c3ba7..fda62b8 100644
--- a/multimedia_api/ll_samples/samples/common/classes/NvVideoEncoder.cpp
+++ b/multimedia_api/ll_samples/samples/common/classes/NvVideoEncoder.cpp
@@ -100,10 +100,10 @@ NvVideoEncoder::setOutputPlaneFormat(uint32_t pixfmt, uint32_t width,
uint32_t num_bufferplanes;
NvBuffer::NvBufferPlaneFormat planefmts[MAX_PLANES];
- if (pixfmt != V4L2_PIX_FMT_YUV420M && pixfmt != V4L2_PIX_FMT_YUV444M &&
- pixfmt != V4L2_PIX_FMT_P010M)
+ if (pixfmt != V4L2_PIX_FMT_YUV420M && pixfmt != V4L2_PIX_FMT_NV12M &&
+ pixfmt != V4L2_PIX_FMT_YUV444M && pixfmt != V4L2_PIX_FMT_P010M)
{
- COMP_ERROR_MSG("Only YUV420M, YUV444M and P010M are supported");
+ COMP_ERROR_MSG("Only YUV420M, NV12M, YUV444M and P010M are supported");
return -1;
}
Hi DaneLLL,
I applied this patch to NvVideoEncoder.cpp.
And I tried two cases:
Both results from the two cases have wrong color space values.
Am I using it right? Or is there anything else I should configure?
Hi,
You should need to modify read_video_frame() to read NV12 frames.
Thanks DaneLLL.