configure: Refactor setting of feature test macro _XOPEN_SOURCE

Some C libraries, eg glibc, uclibc, and musl, uses feature test macros
to expose definitions conforming to the standards ISO C, POSIX and
extensions. According to which feature test macros are defined by the
user or the compiler, a header file, eg <features.h>, used by these
libraries internally defines various other macros.

glibc and uclibc also defines release test macros, eg __GLIBC__ and
__UCLIBC__ in <features.h>. musl does not have (and does not want) a
macro __MUSL__. Therefore it is not possible to check for the musl
library.

However, building FFmpeg with musl needs the feature test macro
_XOPEN_SOURCE=600 to be defined.

Signed-off-by: Jörg Krause <jkrause@posteo.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avdevice/decklink: move general code of decklink encoder to common file

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avdevice: add decklink input support

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avdevice/version: bump minor for the decklink input

Found-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
rtpenc_h263_rfc2190: avoid misleading error output

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/img2: remove useless 'pix' duplicated entry.

The second entry will never be selected, so let's save some bytes in the
library.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/avidec: ensure that palette does not contain the BottomUp info.

Considering the palette is located at the end of extradata may be flawed
when the extradata contains the palette followed by the BottomUp field.
When the BottomUp field is present, exclude it from the palette.
Fixes part of ticket #1304

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Add missing entry for maintainer of rtpenc_hevc.*

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Revert "configure: Refactor setting of feature test macro _XOPEN_SOURCE"

This fixes build on netbsd and probably other bsd based Platforms

This reverts commit 56b8d106769c5c5f9174dcc426f1ee2f991428b1.
postprocess: prefetch* dont change anything, thus their arguments should be const

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
postproc/postprocess_template: mark unchanged function arguments const

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/snow: Make block argumrnt of ff_snow_pred_block() const

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/4xm: Make src of decode_p_block() const

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/adtsenc: buf isnt changed in adts_decode_extradata(), make it const

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/asfenc: Make asf_write_indexs index argument const

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/dvdsubdec: Add option forced_subs_only to only decode forced subtitle frames.

Signed-off-by: Nicholas Robbins <nickrobbins@yahoo.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
doc/decoders: adding documentation for lavc/dvdsubdec.c option "forced_subs_only"

Signed-off-by: Nicholas Robbins <nickrobbins@yahoo.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg: replace impossible dts/pts combinations by a reasonable guess instead of hard failing

Fixes stream copy from tserror270.ts

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
x86/vp9: add AVX and AVX2 MC

Roughly 25% faster MC than ssse3 for blocksizes 32 and 64.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
avcodec/asvenc: Fix integer overflow in level

Warn if the qscale is too low for the input data and clip levels to
minimize artifacts

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