lavfi/lut3d: restore original interpolation speed.

Call NEXT() only once since it got slower due to the overflow condition
introduced in 91b46145.

interp_trilinear:   1462 → 1280 decicycles
interp_tetrahedral: 1188 → 1097 decicycles

Tested on a Core2, GCC 4.8.
lavfi/lut3d: faster tetrahedral interpolation.

Increase performance by fetching only the necessary points.

1097 → 917 decicyles.
j2kdec: move avctx init to decode_frame

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
j2kdec: merge jpeg2000_init_static_data() from jpeg2000

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
j2k/jpeg2000: merge cosmetics and whitespace

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/j2kdec: drop disabled debug code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
j2kdec: cosmetics from jpeg2000

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
j2kdec: profile code from jpeg2000

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
j2kdec: merge copyright header with jpeg2000

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
j2kdec: cosmetics from jpeg2000

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
j2kdec: add AVClass

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
j2k: cosmetics from jpeg2000

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
j2k: add #includes from jpeg2000

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
jpeg2000: cosmetics & restructuring from jpeg2000

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
j2k: ff_j2k_tag_tree_init: check for integer overflow in alloc

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
j2k/jpeg2000: check cblk size

This is based on j2k FCD which is ambigous thus the limit
might be tighter.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>