11 Mar
2016
11 Mar
'16
8:29 a.m.
If the planes in the image are unequal size (e.g. YUV420) you need to adapt the height. There may be better ways to do it, but this works for me: void FlipFrameJ420(AVFrame* pFrame) { for (int i = 0; i < 4; i++) { if (i) { pFrame->data[i] += pFrame->linesize[i] * ((pFrame->height >> 1)-1); } else { pFrame->data[i] += pFrame->linesize[i] * (pFrame->height-1); } pFrame->linesize[i] = -pFrame->linesize[i]; } } -- View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Flip-in-sws-scale-tp939665p4675092.... Sent from the FFmpeg-users mailing list archive at Nabble.com.