[FFmpeg-user] Flip in sws_scale

xiel88 xiel at cmbchina.com
Mon May 23 12:17:36 CEST 2011

hi, i encounter this problem too. i use this can solve the problem. You need
to reset src and linesize of source image, in my case is use sws_scale from
rgb24, 640x480 -> YUV420 176x144 the code goes: 

if (option & VIDEO_FLIP) {
   src[0] += linesize[0]*(height-1);
   linesize[0] = -linesize[0];

sws_scale(ctx, src, linesize, 0, height, dst, dst_linesize);

Maybe some help for you. 

View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Flip-in-sws-scale-tp939665p3543657.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.

More information about the ffmpeg-user mailing list