From ab0cfe66a97543ac0d6878b33af9bd90bbabf1cd Mon Sep 17 00:00:00 2001 From: "mikhal@google.com" Date: Mon, 20 Jun 2011 05:28:08 +0000 Subject: [PATCH] VP8 wrapper: Adding an IFDEF prior to new interface. This will allow the wrapper to build with the Bali release. Review URL: http://webrtc-codereview.appspot.com/47001 git-svn-id: http://webrtc.googlecode.com/svn/trunk@99 4adac7df-926f-26a2-2b94-8c16560cd09d --- modules/video_coding/codecs/vp8/main/interface/vp8.h | 3 ++- modules/video_coding/codecs/vp8/main/source/vp8.cc | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/video_coding/codecs/vp8/main/interface/vp8.h b/modules/video_coding/codecs/vp8/main/interface/vp8.h index c3eb00f30..7e6161d23 100644 --- a/modules/video_coding/codecs/vp8/main/interface/vp8.h +++ b/modules/video_coding/codecs/vp8/main/interface/vp8.h @@ -142,8 +142,9 @@ private: // - optimalBuffersize : Optimal buffer size // Return Value : Max target size for Intra frames represented as // percentage of the per frame bandwidth +#ifdef VP8_LATEST WebRtc_Word32 MaxIntraTarget(WebRtc_Word32 optimalBuffersize); - +#endif EncodedImage _encodedImage; EncodedImageCallback* _encodedCompleteCallback; WebRtc_Word32 _width; diff --git a/modules/video_coding/codecs/vp8/main/source/vp8.cc b/modules/video_coding/codecs/vp8/main/source/vp8.cc index 7f1b1adf0..9ff0967db 100644 --- a/modules/video_coding/codecs/vp8/main/source/vp8.cc +++ b/modules/video_coding/codecs/vp8/main/source/vp8.cc @@ -30,6 +30,7 @@ #define VP8_FREQ_HZ 90000 //#define DEV_PIC_LOSS +//#define VP8_LATEST namespace webrtc { @@ -291,8 +292,9 @@ VP8Encoder::InitEncode(const VideoCodec* inst, _cfg->rc_buf_initial_sz = 500; _cfg->rc_buf_optimal_sz = 600; _cfg->rc_buf_sz = 1000; +#ifdef VP8_LATEST _cfg->rc_max_intra_bitrate_pct = MaxIntraTarget(_cfg->rc_buf_optimal_sz); - +#endif #ifdef DEV_PIC_LOSS @@ -354,6 +356,7 @@ VP8Encoder::InitAndSetSpeed() return WEBRTC_VIDEO_CODEC_OK; } +#ifdef VP8_LATEST WebRtc_Word32 VP8Encoder::MaxIntraTarget(WebRtc_Word32 optimalBuffersize) { @@ -370,6 +373,7 @@ VP8Encoder::MaxIntraTarget(WebRtc_Word32 optimalBuffersize) return targetPct; } +#endif WebRtc_Word32 VP8Encoder::Encode(const RawImage& inputImage,