configure: enable lto for icl compiler.
swresample/resample_template: flip order of operations in swri_resample_linear() for 32bit

Fixes integer overflow

Found-by: BBB
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'cehoyos/master'

* cehoyos/master:
  configure: enable lto for icl compiler.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
swresample/resample_template: move division out of loop for float/double swri_resample_linear()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/rtsp: use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/hdsenc: Use av_mallocz_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pgssubdec: handle more complex PGS scenarios

Add ability to handle multiple palettes and objects simultaneously.
Each simultaneous object is given its own AVSubtitleRect.
Note that there can be up to 64 currently valid objects, but only
2 at any one time can be "presented".

Signed-off-by: Anton Khirnov <anton@khirnov.net>
doc: remove trailing ':' at the end of sections

Also lowercase "options" in "Advanced Video Options" for consistency.
avcodec/pgssubdec: rename PICTURE_SEGMENT

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/pgssubdec: do not fail when part of the packet is faulty unless AV_EF_EXPLODE is set

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
mjpeg: Split off bits shared by MJPEG and LJPEG encoders

This obviates a dependency of the LJPEG encoder on mpegvideo.
dsputil: Split off IDCT bits into their own context
avcodec/pgssubdec: split out flush_cache()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/pgssubdec: Pass AVSubtitleRect to decode_rle()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/pgssubdec: better error codes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/pgssubdec: Bail out of decode_rle() if error and AV_EF_EXPLODE is set

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/pgssubdec: fix end display time

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '253d0be6a1ecc343d29ff8e1df0ddf961ab9c772'

* commit '253d0be6a1ecc343d29ff8e1df0ddf961ab9c772':
  pgssubdec: handle more complex PGS scenarios

Conflicts:
	libavcodec/pgssubdec.c

Some of this has been split out and commited in cleanly split patches immedeately
before this merge

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/pgssubdec: Check input buffer size in parse_presentation_segment()

Might fix overread, no testcase known though.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/pgssubdec: remove unused variables

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