diff --git a/modules/video_coding/codecs/test/videoprocessor.cc b/modules/video_coding/codecs/test/videoprocessor.cc index 20cb0cffbd..06475e196d 100644 --- a/modules/video_coding/codecs/test/videoprocessor.cc +++ b/modules/video_coding/codecs/test/videoprocessor.cc @@ -30,7 +30,6 @@ namespace test { namespace { const int kRtpClockRateHz = 90000; -const int64_t kNoRenderTime = 0; std::unique_ptr CreateBitrateAllocator( TestConfig* config) { @@ -166,9 +165,11 @@ void VideoProcessor::ProcessFrame() { // want to use capture timestamps in the IVF files. const uint32_t rtp_timestamp = (frame_number + 1) * kRtpClockRateHz / config_.codec_settings.maxFramerate; + const int64_t render_time_ms = (frame_number + 1) * rtc::kNumMillisecsPerSec / + config_.codec_settings.maxFramerate; rtp_timestamp_to_frame_num_[rtp_timestamp] = frame_number; input_frames_[frame_number] = rtc::MakeUnique( - buffer, rtp_timestamp, kNoRenderTime, webrtc::kVideoRotation_0); + buffer, rtp_timestamp, render_time_ms, webrtc::kVideoRotation_0); std::vector frame_types = config_.FrameTypeForFrame(frame_number); diff --git a/modules/video_coding/codecs/test/videoprocessor_integrationtest_mediacodec.cc b/modules/video_coding/codecs/test/videoprocessor_integrationtest_mediacodec.cc index 3793ea1ee9..7f6b40b0b9 100644 --- a/modules/video_coding/codecs/test/videoprocessor_integrationtest_mediacodec.cc +++ b/modules/video_coding/codecs/test/videoprocessor_integrationtest_mediacodec.cc @@ -40,8 +40,7 @@ class VideoProcessorIntegrationTestMediaCodec } }; -// TODO(bugs.webrtc.org/8601): Fix HW encoder and re-enable. -TEST_F(VideoProcessorIntegrationTestMediaCodec, DISABLED_ForemanCif500kbpsVp8) { +TEST_F(VideoProcessorIntegrationTestMediaCodec, ForemanCif500kbpsVp8) { config_.SetCodecSettings(kVideoCodecVP8, 1, false, false, false, false, false, 352, 288); @@ -60,9 +59,7 @@ TEST_F(VideoProcessorIntegrationTestMediaCodec, DISABLED_ForemanCif500kbpsVp8) { kNoVisualizationParams); } -// TODO(bugs.webrtc.org/8601): Fix HW encoder and re-enable. -TEST_F(VideoProcessorIntegrationTestMediaCodec, - DISABLED_ForemanCif500kbpsH264CBP) { +TEST_F(VideoProcessorIntegrationTestMediaCodec, ForemanCif500kbpsH264CBP) { config_.encoded_frame_checker = &h264_keyframe_checker_; config_.SetCodecSettings(kVideoCodecH264, 1, false, false, false, false, false, 352, 288); diff --git a/sdk/android/api/org/webrtc/HardwareVideoEncoderFactory.java b/sdk/android/api/org/webrtc/HardwareVideoEncoderFactory.java index 25b7c77e73..ef25a8c908 100644 --- a/sdk/android/api/org/webrtc/HardwareVideoEncoderFactory.java +++ b/sdk/android/api/org/webrtc/HardwareVideoEncoderFactory.java @@ -259,7 +259,8 @@ public class HardwareVideoEncoderFactory implements VideoEncoderFactory { } private boolean isH264HighProfileSupported(MediaCodecInfo info) { - return enableH264HighProfile && info.getName().startsWith(QCOM_PREFIX); + return enableH264HighProfile && Build.VERSION.SDK_INT > Build.VERSION_CODES.M + && info.getName().startsWith(EXYNOS_PREFIX); } private Map getCodecProperties(VideoCodecType type, boolean highProfile) {