vpx.patch 1.87 KB
Newer Older
Michael Gilbert's avatar
Michael Gilbert committed
1
description: maintain compatibility with system vpx
2 3
author: Michael Gilbert <mgilbert@debian.org>

Michael Gilbert's avatar
Michael Gilbert committed
4 5
--- a/third_party/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
+++ b/third_party/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
6
@@ -1188,9 +1188,6 @@ int VP8DecoderImpl::Decode(const Encoded
Michael Gilbert's avatar
Michael Gilbert committed
7 8 9 10 11 12 13 14 15
 
   img = vpx_codec_get_frame(decoder_, &iter);
   int qp;
-  vpx_codec_err_t vpx_ret =
-      vpx_codec_control(decoder_, VPXD_GET_LAST_QUANTIZER, &qp);
-  RTC_DCHECK_EQ(vpx_ret, VPX_CODEC_OK);
   ret = ReturnFrame(img, input_image._timeStamp, input_image.ntp_time_ms_, qp);
   if (ret != 0) {
     // Reset to avoid requesting key frames too often.
16
@@ -1244,8 +1241,9 @@ int VP8DecoderImpl::ReturnFrame(const vp
Michael Gilbert's avatar
Michael Gilbert committed
17 18 19 20 21 22 23 24 25
 
   VideoFrame decoded_image(buffer, timestamp, 0, kVideoRotation_0);
   decoded_image.set_ntp_time_ms(ntp_time_ms);
-  decode_complete_callback_->Decoded(decoded_image, rtc::Optional<int32_t>(),
-                                     rtc::Optional<uint8_t>(qp));
+  int ret = decode_complete_callback_->Decoded(decoded_image);
+  if (ret != 0)
+    return ret;
 
Michael Gilbert's avatar
Michael Gilbert committed
26 27
   return WEBRTC_VIDEO_CODEC_OK;
 }
28 29 30 31 32 33
--- a/media/base/decode_capabilities.cc
+++ b/media/base/decode_capabilities.cc
@@ -14,8 +14,8 @@
 // backwards compatibility for legacy applications using the library.
 #define VPX_CODEC_DISABLE_COMPAT 1
 extern "C" {
34 35
-#include "third_party/libvpx/source/libvpx/vpx/vp8dx.h"      // nogncheck
-#include "third_party/libvpx/source/libvpx/vpx/vpx_codec.h"  // nogncheck
36 37 38 39 40 41 42 43 44 45 46 47 48 49
+#include <vpx/vp8dx.h>
+#include <vpx/vpx_codec.h>
 }
 #endif
 
@@ -113,7 +113,7 @@ bool IsColorSpaceSupported(const media::
 }
 
 bool IsVp9ProfileSupported(VideoCodecProfile profile) {
-#if !defined(MEDIA_DISABLE_LIBVPX)
+#if 0
   // High bit depth capabilities may be toggled via LibVPX config flags.
   static bool vpx_supports_high_bit_depth =
       (vpx_codec_get_caps(vpx_codec_vp9_dx()) & VPX_CODEC_CAP_HIGHBITDEPTH) !=