dv: fix weight table for 2x4x8 transform

The coefficients must be in the appropriate zigzag scan order.
Also fix their values at the same time, as they were pretty wrong.

Fixes ticket #2970.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
dv: move inverse weight tables to decoder

The encoder has its own tables and does not access the idct_factor
member of the DVVideoContext structure.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec: Add support for Opus in MPEG-TS

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mpegts: Add support for Opus in MPEG-TS

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Move get_avc_nalsize() and find_start_code() to h264.h

This allows sharing them with the h264 parser

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/h264: simplify find_start_code()

this also uses avpriv_find_start_code(), though no speed change is expected as
the area searched is generally small

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/h264_parser: rewrite the parse_nal_units() loop logic based on h264.c

Fixes Ticket4011

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/hevc_ps: Check default display window bitstream and skip if invalid

Fixes Ticket4035

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavd/avfoundation: Fix compilation for non MAC OS devices by conditional compilation of screen capture capabilities.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
matroskaenc: write correct Display{Width, Height} in stereo encoding

should be the raw amount of pixels (for example 3840x1080 for full HD side by
side) and the DisplayWidth/Height in pixels should be the amount of pixels for
one plane (1920x1080 for that full HD stream)."

So, move the aspect ratio check in the mkv_write_stereo_mode() function
and always write the embl when stereo format and/or aspect ration is set.
Also add a few comments to that function.

CC: libav-stable@libav.org
Found-by: Asan Usipov <asan.usipov@gmail.com>
filmstripdec: avoid integer overflow

CC: libav-stable@libav.org
Bug-Id: CID 732246
bethsoftvid: check return value and clean memory

CC: libav-stable@libav.org
Bug-Id: CID 733777
mxfdec: reduce loop bound in mxf_read_pixel_layout()

Makes coverity less confused and code more readable.

Bug-Id: CID 732262
avcodec/sgidec: fix linesize for 16bit

Fixes: asan_heap-oob_22b30d4_39_038.sgi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/sgidec: fix count check

Fixes: asan_heap-oob_22b30d4_39_038.sgi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'a6674d2e7771dbf7a4a5556f5e126be83cadac96'

* commit 'a6674d2e7771dbf7a4a5556f5e126be83cadac96':
  xcbgrab: XCB-based screen capture

Conflicts:
	Changelog
	configure
	libavdevice/Makefile
	libavdevice/alldevices.c
	libavdevice/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '090c67d586e3916f9acc49e010b6389d07f97153'

* commit '090c67d586e3916f9acc49e010b6389d07f97153':
  matroskaenc: write correct Display{Width, Height} in stereo encoding

Conflicts:
	libavformat/matroskaenc.c

See: 6103faaa51d2f46d6ccecaad9a089b4b42ff66ee
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'b46b233baffc2076a1a17a264ba9553ae0d4878f'

* commit 'b46b233baffc2076a1a17a264ba9553ae0d4878f':
  filmstripdec: avoid integer overflow

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avformat/filmstripdec: Fix several integer overflows

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

* commit 'e6c66f1e4ea19a3aa6ed999c5cb92e1b682c7600':
  bethsoftvid: check return value and clean memory

Conflicts:
	libavformat/bethsoftvid.c

See: 3632f35c8e163f6aa6d63c317e3e1fca6a4a5fab
Merged-by: Michael Niedermayer <michaelni@gmx.at>