Commit ca89fa71 authored by stefano's avatar stefano

Fix alpha plane flipping for the yuva420p and similar pixel formats.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20771 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent bb66a3d0
......@@ -48,11 +48,11 @@ static AVFilterPicRef *get_video_buffer(AVFilterLink *link, int perms,
AVFilterPicRef *picref = avfilter_get_video_buffer(link->dst->outputs[0],
perms, w, h);
picref->data[0] += (h-1) * picref->linesize[0];
picref->linesize[0] = -picref->linesize[0];
for (i = 1; i < 4; i ++) {
for (i = 0; i < 4; i ++) {
int vsub = i == 1 || i == 2 ? flip->vsub : 0;
if (picref->data[i]) {
picref->data[i] += ((h >> flip->vsub)-1) * picref->linesize[i];
picref->data[i] += ((h >> vsub)-1) * picref->linesize[i];
picref->linesize[i] = -picref->linesize[i];
}
}
......@@ -66,11 +66,11 @@ static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
AVFilterPicRef *ref2 = avfilter_ref_pic(picref, ~0);
int i;
ref2->data[0] += (link->h-1) * ref2->linesize[0];
ref2->linesize[0] = -ref2->linesize[0];
for (i = 1; i < 4; i ++) {
for (i = 0; i < 4; i ++) {
int vsub = i == 1 || i == 2 ? flip->vsub : 0;
if (ref2->data[i]) {
ref2->data[i] += ((link->h >> flip->vsub)-1) * ref2->linesize[i];
ref2->data[i] += ((link->h >> vsub)-1) * ref2->linesize[i];
ref2->linesize[i] = -ref2->linesize[i];
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment