[Libav-user] use sws_scale to flip frame?

Andrey Utkin andrey.krieger.utkin at gmail.com
Thu Apr 26 11:06:47 CEST 2012


2012/4/25 "Matthias Bühlmann" <genesys at gmx.ch>:
> Now, as I need to run the frame anyway through sws_scale() to convert it from RGB24 to YUV420P it'd be great if I could also flip it here, so I'd save the overhead of additionally flipping it prior to encoding.
>
> Is this possible?

I'd advice to use libavfilter for that, you can create pipeline of
pixfmt conversion, flipping, and bunch of other effects and
transformations, adding them as easy as extending the filtergraph's
configuration string.
http://ffmpeg.org/libavfilter.html#hflip
http://ffmpeg.org/libavfilter.html#vflip
http://ffmpeg.org/libavfilter.html#format - for pixfmt conversion
See doc/examples/filtering_video.c

-- 
Andrey Utkin


More information about the Libav-user mailing list