Hi all,

My libav-using app captures select frames from a video source and packages
them in a propriatary format.

When the source video is interlaced, I have to deinterlace the video by
throwing away lines from the field I don't want, thus resulting in an image
one half of the vertical resolution. Whether I need the odd or the even
field varies. Currently, I implement this at the very last stage by
performing memcpy operation on the rgb colorspace frame data, after
sws_scale has converted from yuv422 -> rgb.

I now have a need to have the facility to crop, hflip and vflip frames.
Initially, libavfilter seems like a great tool to facilitate this. However,
it's hard to establish programatically which field of the picture i'd need
to keep after a chain of filters has worked on the frame.

The obvious solution to this problem is to implement a new filter which
deinterlaces in the way I want (ie by throwing away one field). This filter
could then be added at the front of the chain, and other filters added as
necessary.

However, having looked more at the nuts-and-bolts of the filter system, it
seems that the filters want to run on data in the same pix_fmt as the video
stream, which is yuv422. But, because of the chroma subsampling, this kind
of deinterlace is hard to do in this colorspace.

Does anyone have any ideas or pointers on how i might solve this problem?

Thanks

slip
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to