Android: Re-enable videoprocessor integration tests.
The problem was that the encoder was feeded with frames that had 0 as a timestamp. This confused the encoder. H264 high profile support clause was also wrong and is corrected. Bug: webrtc:8601 Change-Id: Ic5a893b4b7573e694f865b63620843b2c9aa489f Reviewed-on: https://webrtc-review.googlesource.com/32300 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Commit-Queue: Sami Kalliomäki <sakal@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21234}
This commit is contained in:

committed by
Commit Bot

parent
6acefdb70a
commit
20b294c28e
@ -30,7 +30,6 @@ namespace test {
|
|||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
const int kRtpClockRateHz = 90000;
|
const int kRtpClockRateHz = 90000;
|
||||||
const int64_t kNoRenderTime = 0;
|
|
||||||
|
|
||||||
std::unique_ptr<VideoBitrateAllocator> CreateBitrateAllocator(
|
std::unique_ptr<VideoBitrateAllocator> CreateBitrateAllocator(
|
||||||
TestConfig* config) {
|
TestConfig* config) {
|
||||||
@ -166,9 +165,11 @@ void VideoProcessor::ProcessFrame() {
|
|||||||
// want to use capture timestamps in the IVF files.
|
// want to use capture timestamps in the IVF files.
|
||||||
const uint32_t rtp_timestamp = (frame_number + 1) * kRtpClockRateHz /
|
const uint32_t rtp_timestamp = (frame_number + 1) * kRtpClockRateHz /
|
||||||
config_.codec_settings.maxFramerate;
|
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;
|
rtp_timestamp_to_frame_num_[rtp_timestamp] = frame_number;
|
||||||
input_frames_[frame_number] = rtc::MakeUnique<VideoFrame>(
|
input_frames_[frame_number] = rtc::MakeUnique<VideoFrame>(
|
||||||
buffer, rtp_timestamp, kNoRenderTime, webrtc::kVideoRotation_0);
|
buffer, rtp_timestamp, render_time_ms, webrtc::kVideoRotation_0);
|
||||||
|
|
||||||
std::vector<FrameType> frame_types = config_.FrameTypeForFrame(frame_number);
|
std::vector<FrameType> frame_types = config_.FrameTypeForFrame(frame_number);
|
||||||
|
|
||||||
|
@ -40,8 +40,7 @@ class VideoProcessorIntegrationTestMediaCodec
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO(bugs.webrtc.org/8601): Fix HW encoder and re-enable.
|
TEST_F(VideoProcessorIntegrationTestMediaCodec, ForemanCif500kbpsVp8) {
|
||||||
TEST_F(VideoProcessorIntegrationTestMediaCodec, DISABLED_ForemanCif500kbpsVp8) {
|
|
||||||
config_.SetCodecSettings(kVideoCodecVP8, 1, false, false, false, false, false,
|
config_.SetCodecSettings(kVideoCodecVP8, 1, false, false, false, false, false,
|
||||||
352, 288);
|
352, 288);
|
||||||
|
|
||||||
@ -60,9 +59,7 @@ TEST_F(VideoProcessorIntegrationTestMediaCodec, DISABLED_ForemanCif500kbpsVp8) {
|
|||||||
kNoVisualizationParams);
|
kNoVisualizationParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(bugs.webrtc.org/8601): Fix HW encoder and re-enable.
|
TEST_F(VideoProcessorIntegrationTestMediaCodec, ForemanCif500kbpsH264CBP) {
|
||||||
TEST_F(VideoProcessorIntegrationTestMediaCodec,
|
|
||||||
DISABLED_ForemanCif500kbpsH264CBP) {
|
|
||||||
config_.encoded_frame_checker = &h264_keyframe_checker_;
|
config_.encoded_frame_checker = &h264_keyframe_checker_;
|
||||||
config_.SetCodecSettings(kVideoCodecH264, 1, false, false, false, false,
|
config_.SetCodecSettings(kVideoCodecH264, 1, false, false, false, false,
|
||||||
false, 352, 288);
|
false, 352, 288);
|
||||||
|
@ -259,7 +259,8 @@ public class HardwareVideoEncoderFactory implements VideoEncoderFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean isH264HighProfileSupported(MediaCodecInfo info) {
|
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<String, String> getCodecProperties(VideoCodecType type, boolean highProfile) {
|
private Map<String, String> getCodecProperties(VideoCodecType type, boolean highProfile) {
|
||||||
|
Reference in New Issue
Block a user