UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor ippfcox
Visitor
207 Views
Registered: ‎03-04-2019

VCU encode failed for pitch align

Jump to solution

I'm using zcu106, on pg252-vcu page 148, AL_Encoder_Process(), it says "The Chroma pitch must be 32-bit aligned", when I pass NV12 720x480P YUV(720 bytes per line and new line followed ) to encoder, encoded frame is not correct, I tried to align a line to 736 bytes(this means 32 bytes aligned instead of 32 bit aligened) with filling zero bytes (using cpu memcpy), encoded frame will be correct.

When I tried to set v4l2_format's bytesperline to 736 bytes, but it doesn't work, the captured YUV is not aligned to 736 bytes.

Briefly, how can I capture 720x480P NV12 and encode it without cpu memcpy?

Is there any parameters that I didn't set correctly?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
Visitor ippfcox
Visitor
165 Views
Registered: ‎03-04-2019

回复: VCU encode failed for pitch align

Jump to solution

I don't know if there is anybody have the same problem with me, post the solution here.

For the reason that V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE is used to capture video, the parametersto be set should be

v4l2_fmt.fmt.pix_mp.plane_fmt[0].bytesperline

instead of

v4l2_fmt.fmt.pix.bytesperline

then the captured data will be 32 bytes aligned on every line.

2 Replies
Visitor ippfcox
Visitor
166 Views
Registered: ‎03-04-2019

回复: VCU encode failed for pitch align

Jump to solution

I don't know if there is anybody have the same problem with me, post the solution here.

For the reason that V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE is used to capture video, the parametersto be set should be

v4l2_fmt.fmt.pix_mp.plane_fmt[0].bytesperline

instead of

v4l2_fmt.fmt.pix.bytesperline

then the captured data will be 32 bytes aligned on every line.

Moderator
Moderator
137 Views
Registered: ‎11-09-2015

回复: VCU encode failed for pitch align

Jump to solution

Hi @ippfcox ,

Thank you for sharing your solution. Could you kindly mark it as accepetd solution to make sure other members having the same issue find their answer quickly?

Thanks,


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos