VP8: Adding a flag to indicate the libvpx version. When in Cayuga, additional API's will be used.

Review URL: http://webrtc-codereview.appspot.com/120006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@433 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
mikhal@webrtc.org 2011-08-24 00:51:36 +00:00
parent 9788e18532
commit 6724cf8183
2 changed files with 13 additions and 2 deletions

View File

@ -67,7 +67,7 @@ VP8Encoder::~VP8Encoder()
WebRtc_Word32
VP8Encoder::VersionStatic(WebRtc_Word8* version, WebRtc_Word32 length)
{
const WebRtc_Word8* str = "WebM/VP8 version 1.0.0\n"; // Bali
const WebRtc_Word8* str = "WebM/VP8 version 1.0.0\n";
WebRtc_Word32 verLen = (WebRtc_Word32)strlen(str);
if (verLen > length)
{
@ -345,8 +345,10 @@ VP8Encoder::InitAndSetControlSettings()
}
vpx_codec_control(_encoder, VP8E_SET_STATIC_THRESHOLD, 800);
vpx_codec_control(_encoder, VP8E_SET_CPUUSED, _cpuSpeed);
#if WEBRTC_LIBVPX_VERSION >= 971
vpx_codec_control(_encoder, VP8E_SET_MAX_INTRA_BITRATE_PCT,
_rcMaxIntraTarget);
#endif
*_cfg = cfg_copy;
_inited = true;
@ -656,7 +658,10 @@ VP8Decoder::InitDecode(const VideoCodec* inst,
cfg.threads = numberOfCores;
cfg.h = cfg.w = 0; // set after decode
vpx_codec_flags_t flags = VPX_CODEC_USE_ERROR_CONCEALMENT;
vpx_codec_flags_t flags = 0;
#if WEBRTC_LIBVPX_VERSION >= 971
flags = VPX_CODEC_USE_ERROR_CONCEALMENT;
#endif
if (vpx_codec_dec_init(_decoder, vpx_codec_vp8_dx(), NULL, flags))
{

View File

@ -47,6 +47,9 @@
],
}],
],
'defines': [
'WEBRTC_LIBVPX_VERSION=960' # Bali
],
},{
'dependencies': [
'../../../../../../../third_party/libvpx/libvpx.gyp:libvpx',
@ -54,6 +57,9 @@
'include_dirs': [
'../../../../../../../third_party/libvpx/source/libvpx',
],
'defines': [
'WEBRTC_LIBVPX_VERSION=971' # Cayuga
],
}],
],
'direct_dependent_settings': {