Questions about TX2 YUV444 and YUV420 10bit encoding

Hi guys,

I’m using these commands to generate YUV444 and YUV420 10bit raw data:

gst-launch-1.0 videotestsrc num-buffers=30 ! video/x-raw,width=1280,height=720,format=Y444 ! filesink location=raw_yuv444.yuv
gst-launch-1.0 videotestsrc num-buffers=30 ! video/x-raw,width=1280,height=720,format=P010_10LE ! filesink location=raw_10bit_p010.yuv

and I’m using 01_video_encode sample to encode them.

In this sample, YUV444 could only be encoded in H264 lossless mode, which is V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE profile, and YUV420 10bit could only be encoded in H265 V4L2_MPEG_VIDEO_H265_PROFILE_MAIN10 profile.

My first question is, is YUV444 only available in H264? is it available in H265?

My second question is, is YUV420 10bit only available in H265? is it available in H264?

And beyond these two questions, I find out that when encoding in V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE profile, no matter whether I call setConstantQp or not, or with any different parameter, or set different bitrate, the output bitrate (file size) can’t be changed, and for the test data I used, the output file size is close to the output of V4L2_MPEG_VIDEO_H264_PROFILE_HIGH profile and bitrate of 9000kbps.

My third question is, is it possible to control the output bitrate when using V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE profile?

Thanks a lot!

1 Like

hi,

It is available in H264 only.

It is available in H265 only.

No. It is lossless so the encoded bitstream can be decoded to be identical to raw_yuv444.yuv. The main purpose is lossless and bitrate is not controllable.

Crystal! Thank you!

Hi @DaneLLL , I have a follow up question:

I checked the tegra api doc here: Jetson Linux API Reference: C:/Jenkins/workspace/doxy_l4t_32_mmapi/git/vendor/nvidia/tegra/core/include/v4l2/linux/v4l2-controls.h File Reference | NVIDIA Docs

there are many H.264 profiles:

V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE
V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE
V4L2_MPEG_VIDEO_H264_PROFILE_MAIN
V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA
V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA
V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE
V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH
V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA
V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH
V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH

Are all of them supported in TX2?

I tested V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10, the result is still yuv420p, not sure if it’s my program bug or because TX2 doesn’t support it.

Hi,
All profiles are listed and we support

V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE
V4L2_MPEG_VIDEO_H264_PROFILE_MAIN
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH

okay, thanks, but I think you forget another profile: V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE , right?