Add VideoCodecType::kVideoCodecAV1 value
Bug: webrtc:11042 Change-Id: I3c5151c9e47679760f8f7d79270488fa8f4c7db5 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159282 Reviewed-by: Åsa Persson <asapersson@webrtc.org> Reviewed-by: Philip Eliasson <philipel@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29927}
This commit is contained in:
parent
e14cb99408
commit
dc36829db0
@ -20,6 +20,7 @@ enum VideoCodecType {
|
|||||||
kVideoCodecGeneric = 0,
|
kVideoCodecGeneric = 0,
|
||||||
kVideoCodecVP8,
|
kVideoCodecVP8,
|
||||||
kVideoCodecVP9,
|
kVideoCodecVP9,
|
||||||
|
kVideoCodecAV1,
|
||||||
kVideoCodecH264,
|
kVideoCodecH264,
|
||||||
kVideoCodecMultiplex,
|
kVideoCodecMultiplex,
|
||||||
};
|
};
|
||||||
|
|||||||
@ -267,7 +267,8 @@ void RtpPayloadParams::SetGeneric(const CodecSpecificInfo* codec_specific_info,
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case VideoCodecType::kVideoCodecVP9:
|
case VideoCodecType::kVideoCodecVP9:
|
||||||
// TODO(philipel): Implement VP9 to new generic descriptor.
|
case VideoCodecType::kVideoCodecAV1:
|
||||||
|
// TODO(philipel): Implement VP9 and AV1 to generic descriptor.
|
||||||
return;
|
return;
|
||||||
case VideoCodecType::kVideoCodecH264:
|
case VideoCodecType::kVideoCodecH264:
|
||||||
if (codec_specific_info) {
|
if (codec_specific_info) {
|
||||||
|
|||||||
@ -382,8 +382,7 @@ bool RtpDepacketizerAv1::Parse(ParsedPayload* parsed_payload,
|
|||||||
uint8_t aggregation_header;
|
uint8_t aggregation_header;
|
||||||
RTC_CHECK(payload.ReadUInt8(&aggregation_header));
|
RTC_CHECK(payload.ReadUInt8(&aggregation_header));
|
||||||
|
|
||||||
// TODO(danilchap): Set AV1 codec when there is such enum value
|
parsed_payload->video.codec = VideoCodecType::kVideoCodecAV1;
|
||||||
parsed_payload->video.codec = VideoCodecType::kVideoCodecGeneric;
|
|
||||||
// These are not accurate since frame may consist of several packet aligned
|
// These are not accurate since frame may consist of several packet aligned
|
||||||
// chunks of obus, but should be good enough for most cases. It might produce
|
// chunks of obus, but should be good enough for most cases. It might produce
|
||||||
// frame that do not map to any real frame, but av1 decoder should be able to
|
// frame that do not map to any real frame, but av1 decoder should be able to
|
||||||
|
|||||||
@ -74,15 +74,17 @@ absl::optional<DataRate> GetExperimentalMinVideoBitrate(VideoCodecType type) {
|
|||||||
// New experiment - per-codec minimum bitrate.
|
// New experiment - per-codec minimum bitrate.
|
||||||
webrtc::FieldTrialOptional<webrtc::DataRate> min_bitrate_vp8("vp8_br");
|
webrtc::FieldTrialOptional<webrtc::DataRate> min_bitrate_vp8("vp8_br");
|
||||||
webrtc::FieldTrialOptional<webrtc::DataRate> min_bitrate_vp9("vp9_br");
|
webrtc::FieldTrialOptional<webrtc::DataRate> min_bitrate_vp9("vp9_br");
|
||||||
|
webrtc::FieldTrialOptional<webrtc::DataRate> min_bitrate_av1("av1_br");
|
||||||
webrtc::FieldTrialOptional<webrtc::DataRate> min_bitrate_h264("h264_br");
|
webrtc::FieldTrialOptional<webrtc::DataRate> min_bitrate_h264("h264_br");
|
||||||
|
|
||||||
webrtc::ParseFieldTrial(
|
webrtc::ParseFieldTrial(
|
||||||
{&enabled, &min_video_bitrate, &min_bitrate_vp8, &min_bitrate_vp9,
|
{&enabled, &min_video_bitrate, &min_bitrate_vp8, &min_bitrate_vp9,
|
||||||
&min_bitrate_h264},
|
&min_bitrate_av1, &min_bitrate_h264},
|
||||||
webrtc::field_trial::FindFullName(kMinVideoBitrateExperiment));
|
webrtc::field_trial::FindFullName(kMinVideoBitrateExperiment));
|
||||||
|
|
||||||
if (min_video_bitrate) {
|
if (min_video_bitrate) {
|
||||||
if (min_bitrate_vp8 || min_bitrate_vp9 || min_bitrate_h264) {
|
if (min_bitrate_vp8 || min_bitrate_vp9 || min_bitrate_av1 ||
|
||||||
|
min_bitrate_h264) {
|
||||||
// "br" is mutually-exclusive with the other configuration possibilites.
|
// "br" is mutually-exclusive with the other configuration possibilites.
|
||||||
RTC_LOG(LS_WARNING) << "Self-contradictory experiment config.";
|
RTC_LOG(LS_WARNING) << "Self-contradictory experiment config.";
|
||||||
}
|
}
|
||||||
@ -94,6 +96,8 @@ absl::optional<DataRate> GetExperimentalMinVideoBitrate(VideoCodecType type) {
|
|||||||
return min_bitrate_vp8.GetOptional();
|
return min_bitrate_vp8.GetOptional();
|
||||||
case kVideoCodecVP9:
|
case kVideoCodecVP9:
|
||||||
return min_bitrate_vp9.GetOptional();
|
return min_bitrate_vp9.GetOptional();
|
||||||
|
case kVideoCodecAV1:
|
||||||
|
return min_bitrate_av1.GetOptional();
|
||||||
case kVideoCodecH264:
|
case kVideoCodecH264:
|
||||||
return min_bitrate_h264.GetOptional();
|
return min_bitrate_h264.GetOptional();
|
||||||
case kVideoCodecGeneric:
|
case kVideoCodecGeneric:
|
||||||
|
|||||||
@ -211,6 +211,7 @@ CreateEncoderSpecificSettings(VideoStreamConfig config) {
|
|||||||
case Codec::kVideoCodecVP9:
|
case Codec::kVideoCodecVP9:
|
||||||
return CreateVp9SpecificSettings(config);
|
return CreateVp9SpecificSettings(config);
|
||||||
case Codec::kVideoCodecGeneric:
|
case Codec::kVideoCodecGeneric:
|
||||||
|
case Codec::kVideoCodecAV1:
|
||||||
return nullptr;
|
return nullptr;
|
||||||
case Codec::kVideoCodecMultiplex:
|
case Codec::kVideoCodecMultiplex:
|
||||||
RTC_NOTREACHED();
|
RTC_NOTREACHED();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user