vconv: The problem of byte alignment in YUV conversion
Closed this issue · 4 comments
I enabled h264_omx in the config file. It cannot work
avcodec_h264enc h264_omx
PI 4 uses 64-byte alignment for YUV420 The simplest solution is to bump the alignment requirement for the luma bytesperline to 64 bytes, therefore the chroma planes will always be 32 byte aligned.
How can I modify it function yuyv422_To_Yuv420p in the file vconv. c.
Thanks.
// There are similar issues here
raspberrypi/rpicam-apps#42
I think this bug should be reported to the Baresip project.
Are you sure the problem is in vidconv?
I think vidconv has no requirement for alignment, and is processing byte-by-byte.
Perhaps the issue is related to ffmpeg.
Thank you for your reply.
I have tried to save the video stream before and after processing, and they look normal. The relevant information I searched for roughly states that byte alignment is required for Yuyv422 to Yuv420p. I'm not sure why.
The H264_OMX encoder requires that the input yuv data must be 4-byte aligned, while the yuv image data converted by the vconv module is 1-byte aligned
I tried using the ffmpeg command line add H264_OMX parameter, but there was an error after running it and it hasn't been resolved yet.
Using avcodec_h264enc v4l2m2m parameter is working ok.
Can you please create a new issue for baresip, and include config, logs etc ?