Commit 8674d65e authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

AVcodec version needed for 1.1 is 51.48.0 so far.

parent 30f9eb49
......@@ -2926,7 +2926,7 @@ AC_ARG_ENABLE(avcodec,
[ --enable-avcodec libavcodec codec (default enabled)])
if test "${enable_avcodec}" != "no"
then
PKG_CHECK_MODULES(AVCODEC,[libavcodec libavutil],
PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 51.48.0 libavutil],
[
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
......
......@@ -182,16 +182,12 @@ int InitAudioDec( decoder_t *p_dec, AVCodecContext *p_context,
switch( i_codec_id )
{
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 16, 0 )
case CODEC_ID_WAVPACK:
p_sys->i_output_max = 8 * sizeof(int32_t) * 131072;
break;
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 4, 0 )
case CODEC_ID_TTA:
p_sys->i_output_max = p_sys->p_context->channels * sizeof(int32_t) * p_sys->p_context->sample_rate * 2;
break;
#endif
case CODEC_ID_FLAC:
p_sys->i_output_max = 8 * sizeof(int32_t) * 65535;
break;
......
......@@ -192,11 +192,9 @@ vlc_module_begin ()
add_integer( ENC_CFG_PREFIX "chroma-elim-threshold", 0, NULL,
ENC_CHROMA_ELIM_TEXT, ENC_CHROMA_ELIM_LONGTEXT, true )
#if LIBAVCODEC_VERSION_INT >= ((51<<16)+(40<<8)+4)
/* Audio AAC encoder profile */
add_string( ENC_CFG_PREFIX "aac-profile", "low", NULL,
ENC_PROFILE_TEXT, ENC_PROFILE_LONGTEXT, true )
#endif
#endif /* ENABLE_SOUT */
/* video filter submodule */
......
......@@ -241,12 +241,10 @@ void EndAudioDec( decoder_t *p_dec );
"the PSNR isn't much changed (default: 0.0). The H264 specification " \
"recommends 7." )
#if LIBAVCODEC_VERSION_INT >= ((51<<16)+(40<<8)+4)
#define ENC_PROFILE_TEXT N_( "Specify AAC audio profile to use" )
#define ENC_PROFILE_LONGTEXT N_( "Specify the AAC audio profile to use " \
"for encoding the audio bitstream. It takes the following options: " \
"main, low, ssr (not supported) and ltp (default: main)" )
#endif
#define FFMPEG_COMMON_MEMBERS \
int i_cat; \
......
......@@ -141,9 +141,7 @@ struct encoder_sys_t
int i_quality; /* for VBR */
float f_lumi_masking, f_dark_masking, f_p_masking, f_border_masking;
int i_luma_elim, i_chroma_elim;
#if LIBAVCODEC_VERSION_INT >= ((51<<16)+(40<<8)+4)
int i_aac_profile; /* AAC profile to use.*/
#endif
/* Used to work around stupid timestamping behaviour in libavcodec */
uint64_t i_framenum;
mtime_t pi_delay_pts[MAX_FRAME_DELAY];
......@@ -156,9 +154,7 @@ static const char *const ppsz_enc_options[] = {
"trellis", "qscale", "strict", "lumi-masking", "dark-masking",
"p-masking", "border-masking", "luma-elim-threshold",
"chroma-elim-threshold",
#if LIBAVCODEC_VERSION_INT >= ((51<<16)+(40<<8)+4)
"aac-profile",
#endif
NULL
};
......@@ -387,7 +383,6 @@ int OpenEncoder( vlc_object_t *p_this )
var_Get( p_enc, ENC_CFG_PREFIX "chroma-elim-threshold", &val );
p_sys->i_chroma_elim = val.i_int;
#if LIBAVCODEC_VERSION_INT >= ((51<<16)+(40<<8)+4)
var_Get( p_enc, ENC_CFG_PREFIX "aac-profile", &val );
/* ffmpeg uses faac encoder atm, and it has issues with
* other than low-complexity profile, so default to that */
......@@ -411,7 +406,6 @@ int OpenEncoder( vlc_object_t *p_this )
}
}
free( val.psz_string );
#endif
if( p_enc->fmt_in.i_cat == VIDEO_ES )
{
......@@ -592,11 +586,9 @@ int OpenEncoder( vlc_object_t *p_this )
/* XXX: FAAC does resample only when setting the INPUT samplerate
* to the desired value (-R option of the faac frontend)
p_enc->fmt_in.audio.i_rate = p_context->sample_rate;*/
#if LIBAVCODEC_VERSION_INT >= ((51<<16)+(40<<8)+4)
/* vlc should default to low-complexity profile, faac encoder
* has bug and aac audio has issues otherwise atm */
p_context->profile = p_sys->i_aac_profile;
#endif
}
}
......
......@@ -89,9 +89,7 @@ static const struct
{ VLC_CODEC_WMV2, CODEC_ID_WMV2, VIDEO_ES },
{ VLC_CODEC_WMV3, CODEC_ID_WMV3, VIDEO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 10, 1 )
{ VLC_CODEC_VC1, CODEC_ID_VC1, VIDEO_ES },
#endif
{ VLC_CODEC_MSVIDEO1, CODEC_ID_MSVIDEO1, VIDEO_ES },
{ VLC_CODEC_MSRLE, CODEC_ID_MSRLE, VIDEO_ES },
......@@ -105,16 +103,10 @@ static const struct
{ VLC_CODEC_CYUV, CODEC_ID_CYUV, VIDEO_ES },
{ VLC_CODEC_VP3, CODEC_ID_VP3, VIDEO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 14, 0 )
{ VLC_CODEC_VP5, CODEC_ID_VP5, VIDEO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 27, 0 )
{ VLC_CODEC_VP6, CODEC_ID_VP6, VIDEO_ES },
{ VLC_CODEC_VP6F, CODEC_ID_VP6F, VIDEO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 47, 0 )
{ VLC_CODEC_VP6A, CODEC_ID_VP6A, VIDEO_ES },
#endif
{ VLC_CODEC_THEORA, CODEC_ID_THEORA, VIDEO_ES },
......@@ -132,9 +124,7 @@ static const struct
/* Real Video */
{ VLC_CODEC_RV10, CODEC_ID_RV10, VIDEO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 15, 1 )
{ VLC_CODEC_RV20, CODEC_ID_RV20, VIDEO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 8, 0 )
{ VLC_CODEC_RV30, CODEC_ID_RV30, VIDEO_ES },
#endif
......@@ -154,9 +144,7 @@ static const struct
{ VLC_CODEC_ZMBV, CODEC_ID_ZMBV, VIDEO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 13, 0 )
{ VLC_CODEC_VMNC, CODEC_ID_VMNC, VIDEO_ES },
#endif
{ VLC_CODEC_FRAPS, CODEC_ID_FRAPS, VIDEO_ES },
{ VLC_CODEC_TRUEMOTION1, CODEC_ID_TRUEMOTION1, VIDEO_ES },
......@@ -180,28 +168,18 @@ static const struct
{ VLC_CODEC_AASC, CODEC_ID_AASC, VIDEO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 11, 0 )
{ VLC_CODEC_FLASHSV, CODEC_ID_FLASHSV, VIDEO_ES },
#endif
{ VLC_CODEC_KMVC, CODEC_ID_KMVC, VIDEO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 13, 0 )
{ VLC_CODEC_NUV, CODEC_ID_NUV, VIDEO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 8, 0 )
{ VLC_CODEC_SMACKVIDEO, CODEC_ID_SMACKVIDEO, VIDEO_ES },
#endif
/* Chinese AVS - Untested */
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 8, 0 )
{ VLC_CODEC_CAVS, CODEC_ID_CAVS, VIDEO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 40, 0 )
/* Untested yet */
{ VLC_CODEC_DNXHD, CODEC_ID_DNXHD, VIDEO_ES },
#endif
{ VLC_CODEC_8BPS, CODEC_ID_8BPS, VIDEO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 52, 0 )
......@@ -260,18 +238,12 @@ static const struct
{ VLC_CODEC_PAM, CODEC_ID_PAM, VIDEO_ES },
{ VLC_CODEC_JPEGLS, CODEC_ID_JPEGLS, VIDEO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 0, 0 )
{ VLC_CODEC_BMP, CODEC_ID_BMP, VIDEO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 40, 1 )
{ VLC_CODEC_TIFF, CODEC_ID_TIFF, VIDEO_ES },
{ VLC_CODEC_GIF, CODEC_ID_GIF, VIDEO_ES },
{ VLC_CODEC_TARGA, CODEC_ID_TARGA, VIDEO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 40, 3 )
{ VLC_CODEC_SGI, CODEC_ID_SGI, VIDEO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 55, 0 )
{ VLC_CODEC_DIRAC, CODEC_ID_DIRAC, VIDEO_ES },
......@@ -289,12 +261,8 @@ static const struct
{ VLC_CODEC_MACE3, CODEC_ID_MACE3, AUDIO_ES },
{ VLC_CODEC_MACE6, CODEC_ID_MACE6, AUDIO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 41, 1 )
{ VLC_CODEC_MUSEPACK7, CODEC_ID_MUSEPACK7, AUDIO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 48, 0 )
{ VLC_CODEC_MUSEPACK8, CODEC_ID_MUSEPACK8, AUDIO_ES },
#endif
{ VLC_CODEC_RA_144, CODEC_ID_RA_144, AUDIO_ES },
{ VLC_CODEC_RA_288, CODEC_ID_RA_288, AUDIO_ES },
......@@ -319,9 +287,7 @@ static const struct
{ VLC_CODEC_ROQ_DPCM, CODEC_ID_ROQ_DPCM, AUDIO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 27, 0 )
{ VLC_CODEC_DSICINAUDIO, CODEC_ID_DSICINAUDIO, AUDIO_ES },
#endif
{ VLC_CODEC_ADPCM_XA, CODEC_ID_ADPCM_XA, AUDIO_ES },
{ VLC_CODEC_ADPCM_ADX, CODEC_ID_ADPCM_ADX, AUDIO_ES },
......@@ -339,47 +305,27 @@ static const struct
{ VLC_CODEC_ALAC, CODEC_ID_ALAC, AUDIO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 50, 0, 1 )
{ VLC_CODEC_QDM2, CODEC_ID_QDM2, AUDIO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 0, 0 )
{ VLC_CODEC_COOK, CODEC_ID_COOK, AUDIO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 4, 0 )
{ VLC_CODEC_TTA, CODEC_ID_TTA, AUDIO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 8, 0 )
{ VLC_CODEC_SHORTEN, CODEC_ID_SHORTEN, AUDIO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 16, 0 )
{ VLC_CODEC_WAVPACK, CODEC_ID_WAVPACK, AUDIO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 34, 0 )
{ VLC_CODEC_GSM, CODEC_ID_GSM, AUDIO_ES },
{ VLC_CODEC_GSM_MS, CODEC_ID_GSM_MS, AUDIO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 40, 4 )
{ VLC_CODEC_ATRAC3, CODEC_ID_ATRAC3, AUDIO_ES },
#endif
{ VLC_CODEC_SONIC, CODEC_ID_SONIC, AUDIO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 34, 0 )
{ VLC_CODEC_IMC, CODEC_ID_IMC, AUDIO_ES },
#endif
{ VLC_CODEC_TRUESPEECH, CODEC_ID_TRUESPEECH, AUDIO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 46, 0 )
{ VLC_CODEC_NELLYMOSER, CODEC_ID_NELLYMOSER, AUDIO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 44, 0 )
{ VLC_CODEC_APE, CODEC_ID_APE, AUDIO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 58, 0 )
{ VLC_CODEC_MLP, CODEC_ID_MLP, AUDIO_ES },
#endif
......@@ -413,13 +359,11 @@ static const struct
{ VLC_CODEC_S24DAUD, CODEC_ID_PCM_S24DAUD, AUDIO_ES },
/* Subtitle streams */
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 41, 0 )
/* Before this version, subs were too experimental */
{ 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 },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 50, 0 )
{ VLC_CODEC_SSA, CODEC_ID_SSA, SPU_ES },
#endif
......
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