lavc: Move start code finding to utils.c

This allows dropping the mpegvideo dependency from a number of
components.

This also fixes standalone building of the h264 parser, which
was broken in 64e438697.

Signed-off-by: Martin Storsjö <martin@martin.st>
lavc: Rename avpriv_mpv_find_start_code after moving out from mpegvideo

Also move the declaration to internal.h, and add restrict qualifiers
to the declaration (as in the implementation).

Signed-off-by: Martin Storsjö <martin@martin.st>
h264: Make it possible to compile without error_resilience

Error resilience is enabled by the h264 decoder, unless explicitly
disabled. --disable-everything --enable-decoder=h264 will produce
a h264 decoder with error resilience enabled, while
--disable-everything --enable-decoder=h264 --disable-error-resilience
will produce a h264 decoder with error resilience disabled.

Signed-off-by: Martin Storsjö <martin@martin.st>
x86: vc1dsp: Fix indentation

Signed-off-by: Martin Storsjö <martin@martin.st>
configure: Remove the mpegvideo dependency from svq1

The svq1 decoder can be built standalone without mpegvideo.

Signed-off-by: Martin Storsjö <martin@martin.st>
configure: Remove a stray msmpeg4v1 encoder declaration

No such encoder exists currently.

Signed-off-by: Martin Storsjö <martin@martin.st>
utils: add workaround for AVHWAccel in ff_get_buffer compat code

Since c977039e585bfff28ecc037ef827c6c3d1ed88aa plane count for
PIX_FMT_HWACCEL pixel formats is 0 instead of 1. The created dummy
AVBuffers are still bogus since AVFrame does not hold frame data when
AVHWAccels are used.
hwaccel: fix use with frame based multithreading

Allows use of AVHWAccel based decoders with frame based multithreading.
The decoders will be forced into an non-concurrent mode by delaying
ff_thread_finish_setup() calls after decoding of the current frame
is finished.

This wastes memory by unnecessarily using multiple threads and thus
copies of the decoder context but allows seamless switching between
hardware accelerated and frame threaded software decoding when the
hardware decoder does not support the stream.
configure: fix dependencies of XvMC and old vdpau mpeg2 decoders
vdpau: fix obsolete mpeg1 vdpau decoder when mpeg2 is disabled
vdpau: wrap codec specific functions in appropiate #ifs

Fixes linking when only a subset of the deprecated vdpau decoders is
enabled.
dca: Move ff_dca_convert_bitstream() to the DCA common code

This makes the DCA parser and decoder independent.
cosmetics: Remove unnecessary extern keywords from function declarations
mpeg12: Move some ff_mpeg1_* function declarations to a more suitable place
Split MPEG-1/2 decoder code off from MPEG-1/2 common code
mpeg12: Move Mpeg1Context declaration to the only place it is used
msmpeg4: Split decoding related functions to a separate file

This fixes standalone compilation of the msmpeg4v2, msmpeg4v3
and wmv2 encoders, that previously failed to link due to the
decoder codepaths requiring error_resilience.

Signed-off-by: Martin Storsjö <martin@martin.st>
build: Remove configure-generated .config file on distclean
build: Move setting of SRC_DIR to the only place it is used
ape: use correct context for the bit table printed in debug