Use default H264 SDP parameters
We lost H264 [1] in https://webrtc-review.googlesource.com/c/src/+/327260 where we started using QueryCodecSupport which is sensetive to SDP parameters. Use CBP3.1, packetization_mode=1 (singlecast NALU) as defaults. [1] https://chromeperf.appspot.com/report?sid=1e12d661147889123ddeea4ef88a87bcdd38cf09cb23c13ee130770be695ac83&start_rev=41064&end_rev=41226 Bug: webrtc:14852, webrtc:15779 Change-Id: I69137ac847ae3a79238abcfe2a76dc2ba097a06d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335081 Reviewed-by: Erik Språng <sprang@webrtc.org> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org> Cr-Commit-Position: refs/heads/main@{#41576}
This commit is contained in:
parent
7209548090
commit
37e9b378fd
@ -210,6 +210,8 @@ std::unique_ptr<VideoCodecStats> RunEncodeDecodeTest(
|
||||
RTC_LOG(LS_WARNING) << "No " << decoder_impl << " decoder for video format "
|
||||
<< sdp_video_format.ToString()
|
||||
<< ". Trying built-in decoder.";
|
||||
// TODO(ssilkin): No H264 support in ffmpeg on ARM. Consider trying HW
|
||||
// decoder.
|
||||
decoder_factory = CreateDecoderFactory("builtin");
|
||||
if (!decoder_factory
|
||||
->QueryCodecSupport(sdp_video_format,
|
||||
|
||||
@ -1404,6 +1404,7 @@ rtc_library("video_codec_tester") {
|
||||
"../media:media_constants",
|
||||
"../modules/video_coding:video_codec_interface",
|
||||
"../modules/video_coding:video_coding_utility",
|
||||
"../modules/video_coding:webrtc_h264",
|
||||
"../modules/video_coding:webrtc_vp9_helpers",
|
||||
"../modules/video_coding/codecs/av1:av1_svc_config",
|
||||
"../modules/video_coding/svc:scalability_mode_util",
|
||||
|
||||
@ -23,11 +23,13 @@
|
||||
#include "api/video/video_bitrate_allocator.h"
|
||||
#include "api/video/video_codec_type.h"
|
||||
#include "api/video/video_frame.h"
|
||||
#include "api/video_codecs/h264_profile_level_id.h"
|
||||
#include "api/video_codecs/simulcast_stream.h"
|
||||
#include "api/video_codecs/video_decoder.h"
|
||||
#include "api/video_codecs/video_encoder.h"
|
||||
#include "media/base/media_constants.h"
|
||||
#include "modules/video_coding/codecs/av1/av1_svc_config.h"
|
||||
#include "modules/video_coding/codecs/h264/include/h264.h"
|
||||
#include "modules/video_coding/codecs/vp9/svc_config.h"
|
||||
#include "modules/video_coding/include/video_codec_interface.h"
|
||||
#include "modules/video_coding/include/video_error_codes.h"
|
||||
@ -1448,12 +1450,22 @@ std::map<uint32_t, EncodingSettings> VideoCodecTester::CreateEncodingSettings(
|
||||
}
|
||||
}
|
||||
|
||||
SdpVideoFormat sdp_video_format = SdpVideoFormat(codec_type);
|
||||
if (codec_type == "H264") {
|
||||
const std::string packetization_mode =
|
||||
"1"; // H264PacketizationMode::SingleNalUnit
|
||||
sdp_video_format.parameters =
|
||||
CreateH264Format(H264Profile::kProfileConstrainedBaseline,
|
||||
H264Level::kLevel3_1, packetization_mode,
|
||||
/*add_scalability_modes=*/false)
|
||||
.parameters;
|
||||
}
|
||||
|
||||
std::map<uint32_t, EncodingSettings> frames_settings;
|
||||
uint32_t timestamp_rtp = first_timestamp_rtp;
|
||||
for (int frame_num = 0; frame_num < num_frames; ++frame_num) {
|
||||
frames_settings.emplace(
|
||||
timestamp_rtp,
|
||||
EncodingSettings{.sdp_video_format = SdpVideoFormat(codec_type),
|
||||
timestamp_rtp, EncodingSettings{.sdp_video_format = sdp_video_format,
|
||||
.scalability_mode = scalability_mode,
|
||||
.layers_settings = layers_settings});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user