diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-06-20 20:13:43 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-06-20 20:13:43 +0200 |
commit | a46f8915bed9959827692fa198b36ed9dd254cfa (patch) | |
tree | 1e75814f0691441b32bef3a250c6f32a2a020eaa /libavfilter/vf_lut.c | |
parent | 827667eca7c72a14b632c790ebfdf9a4276cf54e (diff) | |
download | ffmpeg-a46f8915bed9959827692fa198b36ed9dd254cfa.tar.gz |
vf_lut: fix handling of odd dimensions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_lut.c')
-rw-r--r-- | libavfilter/vf_lut.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c index fd6cd68cd3..1155578838 100644 --- a/libavfilter/vf_lut.c +++ b/libavfilter/vf_lut.c @@ -327,9 +327,9 @@ static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) inrow = inpic ->data[plane] + (y>>vsub) * inpic ->linesize[plane]; outrow = outpic->data[plane] + (y>>vsub) * outpic->linesize[plane]; - for (i = 0; i < h>>vsub; i ++) { + for (i = 0; i < (h + (1<<vsub) - 1)>>vsub; i ++) { const uint8_t *tab = lut->lut[plane]; - int w = inlink->w>>hsub; + int w = (inlink->w + (1<<hsub) - 1)>>hsub; for (j = 0; j < w; j++) outrow[j] = tab[inrow[j]]; inrow += inpic ->linesize[plane]; |