avcodec: add AVCodecContext.sw_pix_fmt

This carries the pixel format that would be used if it were not for
hardware acceleration. This is equal to AVCodecContext.pix_fmt if
hardware acceleration is not in use.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec: add AV_HWACCEL_ALLOW_HIGH_DEPTH flag

This can be used by the application to signal its ability to cope with
video surface of types other than 8-bits YUV 4:2:0.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
vdpau: add helper for surface chroma type and size

Since the VDPAU pixel format does not distinguish between different
VDPAU video surface chroma types, we need another way to pass this
data to the application.

Originally VDPAU in libavcodec only supported decoding to 8-bits YUV
with 4:2:0 chroma sampling. Correspondingly, applications assumed that
libavcodec expected VDP_CHROMA_TYPE_420 video surfaces for output.
However some of the new HEVC profiles proposed for addition to VDPAU
would require different depth and/or sampling:
http://lists.freedesktop.org/archives/vdpau/2014-July/000167.html
...as would lossless AVC profiles:
http://lists.freedesktop.org/archives/vdpau/2014-November/000241.html

To preserve backward binary compatibility with existing applications,
a new av_vdpau_bind_context() flag is introduced in a further change.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
vdpau: add support for 4:2:2 and 4:4:4 chroma sampling

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
avconv_vdpau: allocate video surface of VDPAU-specified size

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
vdpau: add support for the H.264 High 4:4:4 Predictive profile

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
h264: restore a block mistakenly removed in e10fd08a

CC: libav-stable@libav.org
Bug-ID: 781
Merge commit '57b6704ecd0f56d6a3092e448687cfd837bb0ac1'

* commit '57b6704ecd0f56d6a3092e448687cfd837bb0ac1':
  avcodec: add AVCodecContext.sw_pix_fmt

Conflicts:
	doc/APIchanges
	libavcodec/avcodec.h
	libavcodec/version.h

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

* commit '6c99c92a42add7f6a462114d5a4a53c93c551058':
  libavcodec: add AV_HWACCEL_ALLOW_HIGH_DEPTH flag

Conflicts:
	libavcodec/version.h

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

* commit 'c220a60f92dde9c7c118fc4deddff5c1f617cda9':
  vdpau: add helper for surface chroma type and size

Conflicts:
	libavcodec/vdpau.c
	libavcodec/version.h

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

* commit 'ebd5320afd42d4315851f3e0ca7f5d4a6300eb68':
  vdpau: add support for 4:2:2 and 4:4:4 chroma sampling

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

* commit '1f9237f2ac46dfbed1bfa1f4f0f1314c2a1d62ec':
  avconv_vdpau: allocate video surface of VDPAU-specified size

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

* commit '737d35e33408263c04d7730f5487eed0d04938ba':
  vdpau: add support for the H.264 High 4:4:4 Predictive profile

Conflicts:
	libavcodec/vdpau_internal.h

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

* commit '60d4c6ff76467d4d8f55c1cc61ab6c618e8ea2f3':
  h264: restore a block mistakenly removed in e10fd08a

See: 0ecb3075c1c243cfb656d1cbe0b19cdb91bde659
Merged-by: Michael Niedermayer <michaelni@gmx.at>
avutil/dict: Use av_freep() to avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avutil/audio_fifo: use av_freep() to avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avutil/hmac: use av_freep() to avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavfi: add tblend filter
avfilter/vf_blend: Fix AVClass

Fixes infinite loop

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avfilter/vf_cropdetect: Factorize duplicated code using a macro

This simplifies subsequent changes

Reviewed-by: Benoit Fouet <benoit.fouet@free.fr>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>