[FFmpeg-devel] [PATCH] Add negate filter.
Alexander Strange
astrange
Mon Nov 29 17:06:40 CET 2010
On Nov 29, 2010, at 10:30 AM, Ronald S. Bultje wrote:
> Hi,
>
> On Mon, Nov 29, 2010 at 3:00 AM, Jason Garrett-Glaser <jason at x264.com> wrote:
>> Just a thought here -- there's a practically infinite number of simple
>> filters like this (i.e. filters for which every pixel is operated on
>> independently). Would it not be better to port something like
>> Avisynth's MT_LUT filter, which allows the user to specify a
>> mathematical operation to create a LUT from, which is then applied to
>> all pixels? This could serve as the basis for many simple filters,
>> reducing code duplication.
>
> A LUT filter can't be SIMD-optimized though, whereas a negate filter can...
>
> Ronald
It can on PPC. Not sure where else, though.
Some options:
1. generate a joint table for every two (or three) bytes
2. use multithreading
3. if there are multiple LUT filters in a row, combine them into one LUT
4. use OpenGL/OpenCL
5. write your own vector JIT
Anyway, I don't think most of the LUTable filters are useful enough to optimize by hand - if they are, they can probably be reduced to eq.
More information about the ffmpeg-devel
mailing list