On 27/05/15 3:24 PM, James Almer wrote:
> On 27/05/15 1:15 PM, Vittorio Giovara wrote:
>> Bump the minimum libvpx version to 1.4.0 so that all pixel
>> formats are present. Add new VP9 profiles.
>>
>> Signed-off-by: Vittorio Giovara <[email protected]>
>> ---
>> Modified as requested.
>> Vittorio
>>
>> configure | 23 +++++++++++++++------
>> libavcodec/avcodec.h | 4 ++++
>> libavcodec/libvpx.c | 56
>> ++++++++++++++++++++++++++++++++++++++++++--------
>> libavcodec/libvpx.h | 3 ++-
>> libavcodec/libvpxdec.c | 7 ++-----
>> libavcodec/libvpxenc.c | 32 +++++++++++++++++++++--------
>> libavcodec/version.h | 2 +-
>> 7 files changed, 97 insertions(+), 30 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 863e33b..e26fc54 100755
>> --- a/configure
>> +++ b/configure
>> @@ -4274,12 +4274,23 @@ enabled libvo_aacenc && require libvo_aacenc
>> vo-aacenc/voAAC.h voGetAACEncA
>> enabled libvo_amrwbenc && require libvo_amrwbenc vo-amrwbenc/enc_if.h
>> E_IF_init -lvo-amrwbenc
>> enabled libvorbis && require libvorbis vorbis/vorbisenc.h
>> vorbis_info_init -lvorbisenc -lvorbis -logg
>> enabled libvpx && {
>> - enabled libvpx_vp8_decoder && { check_lib2 "vpx/vpx_decoder.h
>> vpx/vp8dx.h" vpx_codec_dec_init_ver -lvpx ||
>> - die "ERROR: libvpx decoder version must
>> be >=0.9.1"; }
>> - enabled libvpx_vp8_encoder && { check_lib2 "vpx/vpx_encoder.h
>> vpx/vp8cx.h" "vpx_codec_enc_init_ver VPX_CQ" -lvpx ||
>> - die "ERROR: libvpx encoder version must
>> be >=0.9.6"; }
>> - enabled libvpx_vp9_decoder && { check_lib2 "vpx/vpx_decoder.h
>> vpx/vp8dx.h" "vpx_codec_vp9_dx" -lvpx || disable libvpx_vp9_decoder; }
>> - enabled libvpx_vp9_encoder && { check_lib2 "vpx/vpx_encoder.h
>> vpx/vp8cx.h" "vpx_codec_vp9_cx" -lvpx || disable libvpx_vp9_encoder; } }
>> + enabled libvpx_vp8_decoder && {
>> + require "vpx >= 1.4.0" vpx/vpx_decoder.h vpx_codec_dec_init_ver
>> -lvpx ||
>> + die "ERROR: libvpx encoder version must be >=1.4.0";
>
> As Luca said, require_pkg_config. If you use require, "vpx >= 1.4.0" is just
> used as a name
> to report a failure. It does not check for that version.
> Also, all require functions terminate configure with an error if the check
> fails, so these
> custom die calls are dead code. If you want to use your own custom error, use
> use_pkg_config
> instead.
Also, since 1.4.0 is the minimum required version now, you can simplify all
this into
enabled libvpx && require_pkg_config "vpx >= 1.4.0" vpx/vpx_codec.h
vpx_codec_version && {
enabled_any libvpx_vp8_decoder libvpx_vp9_decoder && { check_pkg_config vpx
"vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_dec_init_ver ||
disable
libvpx_vp8_decoder libvpx_vp9_decoder; }
enabled_any libvpx_vp8_encoder libvpx_vp9_encoder && { check_pkg_config vpx
"vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_enc_init_ver ||
disable
libvpx_vp8_encoder libvpx_vp9_encoder; } }
Which will check for libvpx 1.4.0 first, then for the decoder and encoding
headers depending
on enabled components.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel