Commit 3005c14f authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Update required version of libavcodec to 53.34

parent b903153a
......@@ -2208,7 +2208,7 @@ dnl
AC_ARG_ENABLE(avcodec,
[ --enable-avcodec libavcodec codec (default enabled)])
AS_IF([test "${enable_avcodec}" != "no"], [
PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 52.25.0 libavutil >= 49.5.0],
PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 53.34.0 libavutil >= 51.22.0],
[
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
......
......@@ -37,9 +37,7 @@
#include <libavcodec/avcodec.h>
#include <libavutil/mem.h>
#if LIBAVUTIL_VERSION_INT >= ((50<<16)+(38<<8)+0)
# include "libavutil/audioconvert.h"
#endif
#include <libavutil/audioconvert.h>
#include "avcodec.h"
......@@ -182,11 +180,9 @@ int InitAudioDec( decoder_t *p_dec, AVCodecContext *p_context,
case CODEC_ID_FLAC:
p_sys->i_output_max = 8 * sizeof(int32_t) * 65535;
break;
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 35, 0 )
case CODEC_ID_WMAPRO:
p_sys->i_output_max = 8 * sizeof(float) * 6144; /* (1 << 12) * 3/2 */
break;
#endif
default:
p_sys->i_output_max = 0;
break;
......
......@@ -42,8 +42,8 @@
#include "chroma.h"
#include "avcommon.h"
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 52, 25, 0 )
# error You must update libavcodec to a version >= 52.25.0
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 53, 34, 0 )
# error You must update libavcodec to a version >= 53.34.0
#endif
/*****************************************************************************
......
......@@ -307,15 +307,6 @@ int ffmpeg_OpenCodec( decoder_t *p_dec );
# define AV_CPU_FLAG_ALTIVEC FF_MM_ALTIVEC
#endif
#if LIBAVCODEC_VERSION_MAJOR < 53
# define AVMediaType CodecType
# define AVMEDIA_TYPE_AUDIO CODEC_TYPE_AUDIO
# define AVMEDIA_TYPE_VIDEO CODEC_TYPE_VIDEO
# define AVMEDIA_TYPE_SUBTITLE CODEC_TYPE_SUBTITLE
# define AVMEDIA_TYPE_DATA CODEC_TYPE_DATA
# define AVMEDIA_TYPE_ATTACHMENT CODEC_TYPE_ATTACHMENT
#endif
#if LIBAVCODEC_VERSION_MAJOR < 54
# define AV_PICTURE_TYPE_B FF_B_TYPE
# define AV_PICTURE_TYPE_I FF_I_TYPE
......
......@@ -66,8 +66,7 @@ static inline void vlc_init_avcodec(void)
#ifdef HAVE_LIBAVUTIL_AVUTIL_H
# include <libavutil/avutil.h>
# if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 51, 7, 0 )
# include <libavutil/dict.h>
# include <libavutil/dict.h>
#define AV_OPTIONS_TEXT "Advanced options."
#define AV_OPTIONS_LONGTEXT "Advanced options, in the form {opt=val,opt2=val2} ."
......@@ -86,5 +85,4 @@ static inline AVDictionary *vlc_av_get_options(const char *psz_opts)
}
return options;
}
# endif
#endif
......@@ -81,17 +81,12 @@ static const struct
{VLC_FOURCC('N','V','1','2'), PIX_FMT_NV12, 0, 0, 0 },
{VLC_FOURCC('N','V','2','1'), PIX_FMT_NV21, 0, 0, 0 },
#if LIBAVUTIL_VERSION_INT >= ((51<<16)+(4<<8)+0)
{VLC_CODEC_I420_9L, PIX_FMT_YUV420P9LE, 0, 0, 0 },
{VLC_CODEC_I420_9B, PIX_FMT_YUV420P9BE, 0, 0, 0 },
{VLC_CODEC_I420_10L, PIX_FMT_YUV420P10LE, 0, 0, 0 },
{VLC_CODEC_I420_10B, PIX_FMT_YUV420P10BE, 0, 0, 0 },
#endif
#if LIBAVUTIL_VERSION_INT > ((51<<16)+(22<<8)+0)
{VLC_CODEC_I422_9L, PIX_FMT_YUV422P9LE, 0, 0, 0 },
{VLC_CODEC_I422_9B, PIX_FMT_YUV422P9BE, 0, 0, 0 },
#endif
#if LIBAVUTIL_VERSION_INT >= ((51<<16)+(9<<8)+0)
{VLC_CODEC_I422_10L, PIX_FMT_YUV422P10LE, 0, 0, 0 },
{VLC_CODEC_I422_10B, PIX_FMT_YUV422P10BE, 0, 0, 0 },
......@@ -99,7 +94,6 @@ static const struct
{VLC_CODEC_I444_9B, PIX_FMT_YUV444P9BE, 0, 0, 0 },
{VLC_CODEC_I444_10L, PIX_FMT_YUV444P10LE, 0, 0, 0 },
{VLC_CODEC_I444_10B, PIX_FMT_YUV444P10BE, 0, 0, 0 },
#endif
/* Packed YUV formats */
{VLC_CODEC_YUYV, PIX_FMT_YUYV422, 0, 0, 0 },
......
......@@ -83,7 +83,7 @@ unsigned GetVlcDspMask( void )
#endif
#if defined ( __arm__)
#if LIBAVUTIL_VERSION_INT >= ((51<<16)+(29<<8)+0)
#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 29, 0)
if( !vlc_CPU_ARM_NEON() )
mask |= AV_CPU_FLAG_NEON;
#endif
......
......@@ -612,7 +612,6 @@ int OpenEncoder( vlc_object_t *p_this )
/* Misc parameters */
p_context->bit_rate = p_enc->fmt_out.i_bitrate;
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 69, 2 )
/* Set reasonable defaults to VP8, based on
libvpx-720p preset from libvpx ffmpeg-patch */
if( i_codec_id == CODEC_ID_VP8 )
......@@ -660,7 +659,6 @@ int OpenEncoder( vlc_object_t *p_this )
p_context->mb_static_threshold = 0;
#endif
}
#endif
if( i_codec_id == CODEC_ID_RAWVIDEO )
{
......
......@@ -83,9 +83,7 @@ static const struct
{ VLC_CODEC_WMV1, CODEC_ID_WMV1, VIDEO_ES },
{ VLC_CODEC_WMV2, CODEC_ID_WMV2, VIDEO_ES },
{ VLC_CODEC_WMV3, CODEC_ID_WMV3, VIDEO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 90, 1 )
{ VLC_CODEC_WMVP, CODEC_ID_WMV3, VIDEO_ES },
#endif
{ VLC_CODEC_VC1, CODEC_ID_VC1, VIDEO_ES },
{ VLC_CODEC_WMVA, CODEC_ID_VC1, VIDEO_ES },
......@@ -182,41 +180,25 @@ static const struct
{ VLC_CODEC_DIRAC, CODEC_ID_DIRAC, VIDEO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 29, 0 )
{ VLC_CODEC_V210, CODEC_ID_V210, VIDEO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 37, 1 )
{ VLC_CODEC_FRWU, CODEC_ID_FRWU, VIDEO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 53, 0 )
{ VLC_CODEC_INDEO5, CODEC_ID_INDEO5, VIDEO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 68, 2 )
{ VLC_CODEC_VP8, CODEC_ID_VP8, VIDEO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 108, 2 )
{ VLC_CODEC_LAGARITH, CODEC_ID_LAGARITH, VIDEO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 117, 0 )
{ VLC_CODEC_MXPEG, CODEC_ID_MXPEG, VIDEO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 53, 19, 0 )
{ VLC_CODEC_VBLE, CODEC_ID_VBLE, VIDEO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 54, 1, 0 )
{ VLC_CODEC_CDXL, CODEC_ID_CDXL, VIDEO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 53, 13, 0 )
{ VLC_CODEC_UTVIDEO, CODEC_ID_UTVIDEO, VIDEO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 53, 42, 0 )
{ VLC_CODEC_DXTORY, CODEC_ID_DXTORY, VIDEO_ES },
......@@ -258,26 +240,16 @@ static const struct
{ VLC_CODEC_AMV, CODEC_ID_AMV, VIDEO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 53, 7, 0 )
{ VLC_CODEC_FLASHSV2, CODEC_ID_FLASHSV2, VIDEO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 53, 9, 0 )
{ VLC_CODEC_WMVP, CODEC_ID_WMV3IMAGE, VIDEO_ES },
{ VLC_CODEC_WMVP2, CODEC_ID_VC1IMAGE, VIDEO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 53, 15, 0 )
{ VLC_CODEC_PRORES, CODEC_ID_PRORES, VIDEO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 53, 32, 0 )
{ VLC_CODEC_INDEO4, CODEC_ID_INDEO4, VIDEO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 53, 17, 0 )
{ VLC_CODEC_BMVVIDEO, CODEC_ID_BMV_VIDEO, VIDEO_ES },
#endif
#if 0
/* UNTESTED VideoGames*/
......@@ -327,12 +299,8 @@ static const struct
/* WMA family */
{ VLC_CODEC_WMA1, CODEC_ID_WMAV1, AUDIO_ES },
{ VLC_CODEC_WMA2, CODEC_ID_WMAV2, AUDIO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 35, 0 )
{ VLC_CODEC_WMAP, CODEC_ID_WMAPRO, AUDIO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 54, 0 )
{ VLC_CODEC_WMAS, CODEC_ID_WMAVOICE, AUDIO_ES },
#endif
{ VLC_CODEC_DVAUDIO, CODEC_ID_DVAUDIO, AUDIO_ES },
......@@ -354,12 +322,8 @@ static const struct
{ VLC_CODEC_MPGA, CODEC_ID_MP2, AUDIO_ES },
{ VLC_CODEC_MP4A, CODEC_ID_AAC, AUDIO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 26, 0 )
{ VLC_CODEC_ALS, CODEC_ID_MP4ALS, AUDIO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 94, 0 )
{ VLC_CODEC_MP4A, CODEC_ID_AAC_LATM, AUDIO_ES },
#endif
{ VLC_CODEC_INTERPLAY_DPCM, CODEC_ID_INTERPLAY_DPCM, AUDIO_ES },
......@@ -413,21 +377,11 @@ static const struct
{ VLC_CODEC_QCELP, CODEC_ID_QCELP, AUDIO_ES },
{ VLC_CODEC_SPEEX, CODEC_ID_SPEEX, AUDIO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 34, 0 )
{ VLC_CODEC_TWINVQ, CODEC_ID_TWINVQ, AUDIO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 36, 0 )
{ VLC_CODEC_ATRAC1, CODEC_ID_ATRAC1, AUDIO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 47, 0 )
{ VLC_CODEC_SIPR, CODEC_ID_SIPR, AUDIO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 91, 0 )
{ VLC_CODEC_ADPCM_G722, CODEC_ID_ADPCM_G722, AUDIO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 53, 17, 0 )
{ VLC_CODEC_BMVAUDIO, CODEC_ID_BMV_AUDIO, AUDIO_ES },
#endif
{ VLC_CODEC_BMVAUDIO, CODEC_ID_BMV_AUDIO, AUDIO_ES },
/* Lossless */
{ VLC_CODEC_FLAC, CODEC_ID_FLAC, AUDIO_ES },
......@@ -480,17 +434,13 @@ static const struct
#endif
/* Subtitle streams */
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 33, 0 )
{ VLC_CODEC_BD_PG, CODEC_ID_HDMV_PGS_SUBTITLE, SPU_ES },
#endif
{ VLC_CODEC_SPU, CODEC_ID_DVD_SUBTITLE, SPU_ES },
{ VLC_CODEC_DVBS, CODEC_ID_DVB_SUBTITLE, SPU_ES },
{ VLC_CODEC_SUBT, CODEC_ID_TEXT, SPU_ES },
{ VLC_CODEC_XSUB, CODEC_ID_XSUB, SPU_ES },
{ VLC_CODEC_SSA, CODEC_ID_SSA, SPU_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 38, 0 )
{ VLC_CODEC_TELETEXT, CODEC_ID_DVB_TELETEXT, SPU_ES },
#endif
{ 0, 0, UNKNOWN_ES }
};
......
......@@ -293,11 +293,6 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
/* No idea why ... but this fixes flickering on some TSCC streams */
p_sys->i_codec_id != CODEC_ID_TSCC && p_sys->i_codec_id != CODEC_ID_CSCD &&
p_sys->i_codec_id != CODEC_ID_CINEPAK &&
#if (LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 68, 2 ) ) && (LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 52, 100, 1 ) )
/* avcodec native vp8 decode doesn't handle EMU_EDGE flag, and I
don't have idea howto implement fallback to libvpx decoder */
p_sys->i_codec_id != CODEC_ID_VP8 &&
#endif
!p_sys->p_context->debug_mv )
{
/* Some codecs set pix_fmt only after the 1st frame has been decoded,
......@@ -957,7 +952,6 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
if( p_sys->p_va )
{
#if 1 // LIBAVCODEC_VERSION_MAJOR >= ? FIXME
/* hwaccel_context is not present in old ffmpeg version */
if( vlc_va_Setup( p_sys->p_va,
&p_context->hwaccel_context, &p_dec->fmt_out.video.i_chroma,
......@@ -966,9 +960,6 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
msg_Err( p_dec, "vlc_va_Setup failed" );
return -1;
}
#else
assert(0);
#endif
/* */
p_ff_pic->type = FF_BUFFER_TYPE_USER;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment