cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
johlen
Visitor
Visitor
245 Views
Registered: ‎12-17-2020

VCU h264 encoder: How to crop image while encoding

We have a custom video format that is not aligned to 32-bytes.

We inserted a block to pad the image to the right width (32-bytes aligned) so that the VCU encoder would accept the format.

We now want to crop the image while encoding by specifying a width and stride/pitch for the video.

I understand from the documentation that the VCU can encode image formats aligned to 8-bytes.

So, we have an input video format of 1080x808 that is padded to 1088x808. The video encodes fine. We do, however, only want to encode/output 1080x808, as is the original size of the video. As I understand it, the VCU is capable of handling width + pitch/stride.

We are using gstreamer in the application.

How is this feature enabled?

I have tried some settings in gstreamer that did not work, as well as trying to set "crop:(l,t)/WxH" format property using v4l2 API:s. Unsuccessful.

How is this done?

 

Thanks,

/Johan

 

 

 

0 Kudos
1 Reply
aoifem
Moderator
Moderator
129 Views
Registered: ‎11-21-2018

Hi @johlen 

Just flagging that you've opened a case with me for this issue, so one of my colleagues does not pick this up. I will post the solution here when we find one. 

Aoife
Product Application Engineer - Xilinx Technical Support EMEA


**~ Got a minute? Answer our Vitis HLS survey here! ~**

**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos