OMAP4 NV12 cropping

125 views
Skip to first unread message

Buru

unread,
Sep 29, 2011, 3:48:31 PM9/29/11
to pandaboard
Hello Folks,

I am new to OMAP4, OMX, and Gstreamer in general and was hoping
someone could help me.

I am trying to setup a pipeline so that 640x480 frame captured from
omx_camera can be cropped into 4 sub frames before sending them to
omx_h264enc as follows:


| ---------> videocrop ----------
> omx_h264enc --------> file
|
|---------> videocrop ---------->
omx_h264enc ---------> file
OMX_Camera ---> |
|---------> videocrop ---------->
omx_h264enc ---------> file
|
|---------> videocrop ---------->
omx_h264enc ---------> file

videocrop does not support NV12 format, and I believe, NV12 is only
format that is supported with omx_camera (ducati) ? Is this true?


should I convert NV12 to I420 ( i think from reading that they are
basically same except U and V array in byte stream are switched in
position. If that is true then can I easily modify videocrop to
support NV12, if yes can you provide me tips on how to do this, since
I am new to gstreamer?


Can someone please suggest how I go about doing this?

Thank you and Best Regards

Buru

Rob Clark

unread,
Sep 30, 2011, 8:29:33 PM9/30/11
to panda...@googlegroups.com
NV12 and I420 are similar.. the difference is NV12 has U+V interleaved
(Y plane + UV plane) whereas I420 has them as 3 separate planes..

You could look at stridetransform element.. it even has some neon code
for doing the conversion.

In theory you could do a bit of hacking and make it work zero-copy
style by creating a special sort of tee element that sends the
appropriate crop events to each of the encoders.

BR,
-R

Buru

unread,
Oct 1, 2011, 3:46:49 PM10/1/11
to pandaboard
Rob.

Thank you.
I will take a look at it and see how to do it.

Regards
Biru

Buru

unread,
Oct 3, 2011, 4:13:44 PM10/3/11
to pandaboard
Hi Rob,

Looked liked gststridetransform has some code
(gst_stride_transform_event) to perform cropping.

Can I use this to crop NV12? If so do you have a example on the
usage?

I was trying to add NV12 cropping in videocrop element, but that is
not going to well (probably due to my lack of knowledge about
gstreamer).

Thank you
Buru
> > > Buru- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages