Am 12.03.2010 01:14, schrieb Stefano Sabatini:
On date Thursday 2010-03-11 14:21:24 -0500, Ke Yu encoded:
Hi!
I've got avframes from two udp multicast video streams. I would like to
scale every avframe into half (only x coordinate, e.g.,
640x480->320x480) and stitch the two scaled avframes into one avframe with
original size (e.g., 640x480). After that, I'll encode the generated
avframes into one output video stream. My input video streams have the same
encoding context. The frame rate is 30 fps. So I have about 33ms to finish
the scaling and stitching. The performance is critical. I plan to use
sws_scale to scale the avframe but don't know how to stitch two scaled
avframes together. I prefer not to use a third party image lib.
Can anyone help me to figure that out?
Try with libavfilter+overlay, integration into main SVN pending.
Regards.
Hi,
You can allocate your AVFrame with the target resolution (640x480) and
then let sws_scale the sourceimages directly onto this frame.
You simply have to modify the data pointers and linepitches of yout
AVFrame before giving them to sws_scale. If you don't need any
transparency or some other fancy image stuff this should be the fastest way.
Best regards
Hendrik
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user