Browse Source

vf_lut: optimize planar case

2500 -> 1900 cpu cycles

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.11
Michael Niedermayer 14 years ago
parent
commit
79a1d98676
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      libavfilter/vf_lut.c

+ 4
- 2
libavfilter/vf_lut.c View File

@@ -318,8 +318,10 @@ static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
outrow = outpic->data[plane] + (y>>vsub) * outpic->linesize[plane];

for (i = 0; i < h>>vsub; i ++) {
for (j = 0; j < inlink->w>>hsub; j++)
outrow[j] = lut->lut[plane][inrow[j]];
const uint8_t *tab = lut->lut[plane];
int w = inlink->w>>hsub;
for (j = 0; j < w; j++)
outrow[j] = tab[inrow[j]];
inrow += inpic ->linesize[plane];
outrow += outpic->linesize[plane];
}


Loading…
Cancel
Save