[FFmpeg-user] Flip in sws_scale

Ph0t0n lclemens at gmail.com
Tue Feb 14 00:19:55 CET 2012


void FlipFrame(AVFrame* pFrame) {
	for (int i = 0; i < 4; i++) {
		pFrame->data[i] += pFrame->linesize[i] * (pFrame->height-1);
		pFrame->linesize[i] = -pFrame->linesize[i];
	}
}

void UnflipFrame(AVFrame* pFrame) {
	for (int i = 0; i < 4; i++) {
		pFrame->linesize[i] = -pFrame->linesize[i];
		pFrame->data[i] -= pFrame->linesize[i] * (pFrame->height-1);
	}
}

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


More information about the ffmpeg-user mailing list