lavfi: use ceil right shift for chroma width/height.

This should fix several issues with odd dimensions inputs.

lut, vflip, pad and crop video filters also need to be checked for such
issues. It's possible sws is also affected.
This commit is contained in:
Clément Bœsch
2013-05-09 17:59:38 +02:00
parent d751a2526f
commit 50e66726a2
21 changed files with 50 additions and 44 deletions

View File

@@ -163,8 +163,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
int vsub = plane == 1 || plane == 2 ? trans->vsub : 0;
int pixstep = trans->pixsteps[plane];
int inh = in->height >> vsub;
int outw = out->width >> hsub;
int outh = out->height >> vsub;
int outw = FF_CEIL_RSHIFT(out->width, hsub);
int outh = FF_CEIL_RSHIFT(out->height, vsub);
uint8_t *dst, *src;
int dstlinesize, srclinesize;
int x, y;