Commit graph

336 commits

Author SHA1 Message Date
philipel
7ceb49c7b8 Fuzzy match the SdpVideoFormat in VideoEncoderFactoryTemplate::CreateVideoEncoder.
Bug: webrtc:13573
Change-Id: I1223f5f989d5298d3a6f7f6d06fd752e650adfd9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300342
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39766}
2023-04-05 11:48:26 +00:00
Henrik Boström
8481f6358e Remove IsSinglecastOrAllNonFirstLayersInactive() helper.
As of recent changes, we can simply look at numberOfSimulcastStreams
because in the {active,inactive,inactive} case we get a single
webrtc::VideoStream here[1] which results in numberOfSimulcastStreams
being 1 here[2].

Looking at numberOfSimulcastStreams instead of using a helper is
preferred because it is more descriptive and in the future, when
{inactive,active,inactive} or {inactive,inactive,active} cases of VP9
simulcast is also supported (webrtc:15046) then this gating will work
even when the first layer is not the active one.

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/video/config/encoder_stream_factory.cc;l=146;drc=c99753ac8f051e379ae68e281aaef04b0a5ca8f2

[2] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/modules/video_coding/video_codec_initializer.cc;l=77;drc=4baea5b07f2fd309892845cf2d1c0f4ca77862d3

# No need to wait for win chrome bot, everything else green
NOTRY=True

Bug: webrtc:15046
Change-Id: I8aaea2e8cc350bd01fb00cc7fd85032b7fdfe24d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299942
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39759}
2023-04-04 13:59:07 +00:00
philipel
31af34ba8c Update Dav1dDecoderTemplateAdapater to include AV1 profile1 support.
Bug: webrtc:13573
Change-Id: Ibc81b6400eb8e22ce28ae434c83a22013ef96c79
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299946
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39757}
2023-04-04 12:40:17 +00:00
Henrik Boström
4baea5b07f Make VP9 simulcast behave like singlecast for single active layer cases.
Various "if streams == 1" cases are updated to "if
IsSinglecastOrAllNonFirstLayersInactive()" in order not to cause subtle
differences between VP9 {active} and VP9 {active,inactive,inactive}.

This CL also affects a line that conditionally sets
`simulcastStream[0].active = codec_active` so it seemed fitting to
improve the test coverage of "if all streams are inactive, don't send".

Bug: webrtc:15028
Change-Id: I8872dc8be0f2dfc1d8914bdba5e6433f9ba8cbfd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298881
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39656}
2023-03-23 14:49:22 +00:00
Henrik Boström
62dc65b537 Add test that attempting HW is still possible after SW fallback.
Based on previous discussions I would have thought that this test would
fail, but it turns out that it passes. See referenced bug for context.

Bug: webrtc:15021
Change-Id: I845b48f688fb25942e3b770d50cafbf8a0bafe94
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298562
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39625}
2023-03-21 15:02:34 +00:00
Henrik Boström
f6eae959bf Delete EncoderSimulcastProxy in favor of SimulcastEncoderAdapter.
Because the adapter has a passthrough mode, it can already handle both
singlecast and simulcast cases, meaning the proxy is no longer providing
value. Let's delete.

Bug: webrtc:15001
Change-Id: I480eaba599448e9b82b8cf7f829dc35ad6ce0434
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297740
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39579}
2023-03-16 13:25:44 +00:00
Philipp Hancke
b660b7a89c Enable multithreaded OpenH264 encoding behind field trial
This uses the field trial introduced is crbug.com/1406331 and
extends the usage to OpenH264. This simplifies experimentation
whether this change improves performance without requiring
multi-slice encoding.

BUG=webrtc:14368

Change-Id: I0031e59059f7113dd5453234869c957d46f311bb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294340
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39371}
2023-02-22 14:26:33 +00:00
Henrik Boström
fbd0ddb32e Introduce WebRTC-VideoEncoderSettings/encoder_thread_limit:X.
As requested by a CEF hosted application (https://crbug.com/1406331)
who want to be able to limit the number of threads in a controlled
environment, this CL adds a flag to control the max limit per encoder.

For plumbing-reasons, this is placed in VideoEncoder::Settings but
with a note that this is considered an experimental API with limited
support. For now only LibvpxVp8Encoder uses it and there are no plans
to roll this out.

I have manually confirmed this is working with printf debugging,
--force-fieldtrials=WebRTC-VideoEncoderSettings/encoder_thread_limit:2
and https://jsfiddle.net/henbos/2bd6m7Lt/

Bug: chromium:1406331
Change-Id: Ib02bd83e2071034874843d3aaa0d3b0adc5bbf46
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293960
Reviewed-by: Markus Handell <handellm@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39349}
2023-02-20 14:01:32 +00:00
Wan-Teh Chang
bd86684bf3 Make VideoEncoder::GetEncoderInfo() pure virtual
Bug: webrtc:9722
Change-Id: I831a9c460425be86e5da2761769b8eecf231462f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293386
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Wan-Teh Chang <wtc@google.com>
Cr-Commit-Position: refs/heads/main@{#39319}
2023-02-15 17:26:07 +00:00
Wan-Teh Chang
0c4c9be436 video_encoder.h: update kFullFramerate in comment
During code review, kFullFramerate was renamed kMaxFramerateFraction but
the uses of kFullFramerate in a comment were not updated. See
https://webrtc-review.googlesource.com/c/src/+/117900/3..4

Change-Id: I6b3c06b4c5b302e8ba40bde4ba722b94aab191eb
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292801
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Wan-Teh Chang <wtc@google.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39285}
2023-02-09 15:17:50 +00:00
Åsa Persson
b7f9113b72 Add API for querying codec support.
Implement
- BuiltinVideoEncoderFactory::QueryCodecSupport
- QualityAnalyzingVideoEncoderFactory::QueryCodecSupport
- FakeWebRtcVideoEncoderFactory::QueryCodecSupport

Bug: webrtc:11607
Change-Id: I9a138bbdc809abf5577dd27d84a51d0ed77d62ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290381
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38994}
2023-01-04 10:04:46 +00:00
Harald Alvestrand
794d599741 Split media_channel and its dependencies from the rtc_media_base target
This helps in figuring out which dependencies exist, and gets closer
to obeying the "one target per .cc file" rule.

Test failures seem unrelated, so using No-Try.

No-Try: true
Bug: webrtc:14775
Change-Id: Id25466c8b8fe628d05c819cf7c69ae6d8421c6cf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288020
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38910}
2022-12-16 12:15:22 +00:00
Chunbo Hua
46ad25119c Make requested_resolution_alignment of webrtc::EncoderInfo as uint32_t.
At the same time, proper names of some parameters are refactored in SimulcastEncoderAdapter.

Bug: None
Change-Id: Ia036e3f362d1394e90aa26b79953c1ffe75e2fe0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284961
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Chunbo Hua <chunbo.hua@intel.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38870}
2022-12-12 06:02:59 +00:00
philipel
99c4c73dbf Add FuzzyMatchSdpVideoFormat convenience function for VideoEncoderFactoryTemplate.
Bug: webrtc:13573
Change-Id: I6813f2a2524271be7862b700da4831575ec6e206
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279701
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38463}
2022-10-25 08:30:25 +00:00
Mirko Bonadei
9d9c2d5795 Make header files self contained.
This CL adds #includes to header files in order to make them
self contained after the preprocessor pass.

Bug: b/251890128
Change-Id: I81c3ba38fb8ab8a2bbd151ba99aa871fae9f1b1b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278422
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38327}
2022-10-08 08:38:36 +00:00
Emil Lundmark
ae5677639c Revise video owners
Bug: None
No-try: True
Change-Id: Ibc8dcb22d0ca81897dc63d39ff13372b0fc7302d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/277402
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Fanny Linderborg <linderborg@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38255}
2022-09-30 08:44:30 +00:00
Tommi
96c1a9b9e2 Clean up decoders when stopping video receive stream.
This updates VideoReceiveStream2::Stop() to symmetrically tear down
state that's built up in VideoReceiveStream2::Start().

Bug: webrtc:11993, webrtc:14486
Change-Id: I41f4feea5584e5baaeed2143432136f8b9761321
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272537
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38244}
2022-09-29 12:03:13 +00:00
Jonas Oreland
6c2dae21e9 Move VideoEncoderConfig from api/ into video/config
This cl move VideoEncoderConfig from api/ to video/config.

VideoStreamEncoderInterface and VideoStreamEncoderObserver
are moved as collateral.

brandt@ think that the reason these were in api/ in the
first place had to downstream project.

Functionality wise, this is a NOP, but it makes it easier
to modify the encoder (config).

Bug: webrtc:14451
Change-Id: I2610d815aeb186298498e7102cac773ecac8cd36
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/277002
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38242}
2022-09-29 09:44:43 +00:00
Jonas Oreland
7252348d76 Create EncoderStreamFactory in VideoStreamEncoder
This cl/ changes so that the EncoderStreamFactory is
not created inside WebRtcVideoSendStream (webrtc_video_engine).

The benifit of this is that the VideoStreamEncoder can then
amend the EncoderStreamFactory with state (and types)
w/o exposing it in VideoEncoderConfig.

I.e as an alternative to changes done inside
https://webrtc-review.googlesource.com/c/src/+/276742.

The fake_webrtc_call is modified to (if needed) create
it's own EncoderStreamFactory if needed.

Note: this cl/ will have to be merged with with
https://webrtc-review.googlesource.com/c/src/+/277002.

Bug: webrtc:14451
Change-Id: I3d896b227d39725ba6409622e8d09d14bd45d5fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/277160
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38237}
2022-09-28 17:47:52 +00:00
Jonas Oreland
0deda15c96 Reland "RtpEncodingParameters::request_resolution patch 1"
This reverts commit b625101da8.

Reason for revert: Found problem that was specific how
configuration is handled for VP9. A 1-line change in webrtc_video_engine.cc line 3715.
Thanks Rasmus and great that this was tested!

Original change's description:
> Revert "RtpEncodingParameters::request_resolution patch 1"
>
> This reverts commit ef7359e679.
>
> Reason for revert: Breaks downstream test
>
> Original change's description:
> > RtpEncodingParameters::request_resolution patch 1
> >
> > This patch adds RtpEncodingParameters::request_resolution
> > with documentation and plumming. No behaviour is changed yet.
> >
> > Bug: webrtc:14451
> > Change-Id: I1f4f83a312ee8c293e3d8f02b950751e62048304
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276262
> > Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> > Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> > Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#38172}
>
> Bug: webrtc:14451
> Change-Id: I4b9590e23ec38e9e1c2e51a4600ef96b129439f2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276541
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
> Owners-Override: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38176}

Bug: webrtc:14451
Change-Id: Ica9b74180bce22d09bf289126bb5ac137bf9eb70
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276543
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38178}
2022-09-23 11:48:19 +00:00
Björn Terelius
b625101da8 Revert "RtpEncodingParameters::request_resolution patch 1"
This reverts commit ef7359e679.

Reason for revert: Breaks downstream test

Original change's description:
> RtpEncodingParameters::request_resolution patch 1
>
> This patch adds RtpEncodingParameters::request_resolution
> with documentation and plumming. No behaviour is changed yet.
>
> Bug: webrtc:14451
> Change-Id: I1f4f83a312ee8c293e3d8f02b950751e62048304
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276262
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38172}

Bug: webrtc:14451
Change-Id: I4b9590e23ec38e9e1c2e51a4600ef96b129439f2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276541
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Owners-Override: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38176}
2022-09-23 08:27:47 +00:00
Jonas Oreland
ef7359e679 RtpEncodingParameters::request_resolution patch 1
This patch adds RtpEncodingParameters::request_resolution
with documentation and plumming. No behaviour is changed yet.

Bug: webrtc:14451
Change-Id: I1f4f83a312ee8c293e3d8f02b950751e62048304
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276262
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38172}
2022-09-22 14:16:20 +00:00
Åsa Persson
178937de8e api/video_codecs: Add scalability mode helper functions.
Bug: webrtc:13960
Change-Id: I8c86e440223929594aec06e8b32b4bbe73546a94
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273303
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37994}
2022-09-02 13:40:38 +00:00
Åsa Persson
ecfe8da46b Add support for more scalability modes (1.5:1 resolution ratio).
Added modes:
- S2T1h
- S2T2h
- S2T3h
- S3T1h
- S3T2h
- S3T3h

Bug: webrtc:13960
Change-Id: I618a30c68b0ce1609847ee33a2298fe8fa0720c9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273664
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37968}
2022-08-31 11:01:16 +00:00
Florent Castelli
33155d763c svc: Remove references to bogus modes
Those never existed, were likely a copy-paste error in the spec
that we somehow inherited.

Bug: webrtc:11607
Change-Id: Ib4a038f061123e879f1099656273f6392f092213
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273485
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37953}
2022-08-30 14:03:21 +00:00
Åsa Persson
6d0516412e Add support for scalability modes S2T2, S3T1, S3T2.
Bug: webrtc:13960
Change-Id: Icafd3a5a3f8889777d65da5313b24e56a57af4d9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273301
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37943}
2022-08-30 09:51:11 +00:00
Niels Möller
a16786b87f Delete nisse@webrtc.org from OWNERS files
Bug: None
Change-Id: I65fd526b236850f6df0de4f9022c77937b82f11a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269213
Auto-Submit: Niels Moller <nisse@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Commit-Queue: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37636}
2022-07-28 08:47:38 +00:00
philipel
f012bfaf96 Use Video{Encoder, Decoder}FactoryTemplate instead of Internal{Encoder, Decoder}Factory.
Bug: webrtc:13573
Change-Id: Id0e46a9b6053dedae3cbf0e5581768868900630b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269247
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37596}
2022-07-22 12:07:25 +00:00
Niels Möller
f2d090a0de Add temporary method SimulcastStream::SetNumberOfTemporalLayers
Similar to https://webrtc-review.googlesource.com/c/src/+/267843, it
turns out we need the setter method too to transition downstream code.

Bug: webrtc:11607
Change-Id: I50df5e9c5d9301717d527089de61fcf783267ee1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268760
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37545}
2022-07-18 12:19:52 +00:00
philipel
98c78cdd20 VideoEncoderFactoryTemplate cleanup.
Bug: webrtc:13573
Change-Id: Id70e64adba6c5d76132dc0edb0c93937e3e894f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268542
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37524}
2022-07-14 16:16:47 +00:00
philipel
f0232f31fb New VideoDecoderFactoryTemplate.
The VideoDecoderFactoryTemplate takes decoder implementations as template arguments, making it possible to easily implement a VideoDecoderFactory only using the implementations required for the particular application. This will replace the BuiltinVideoDecoderFactory.

Bug: webrtc:13573
Change-Id: I0213acd20b69dacf06fc6934851b73bd19b1afc8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268470
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37523}
2022-07-14 15:38:20 +00:00
philipel
02bfcf5132 Compare only SdpVideoFormat::name and SdpVideoFormat::parameters in the VideoEncoderFactoryTemplate.
Since https://webrtc-review.googlesource.com/c/src/+/267780 supported scalability modes are also used to compare for equality between SdpVideoFormats(?).

Bug: webrtc:14267, webrtc:13573
Change-Id: I2f3c2fca93bac6fadd222f776f672c9bd3f1de0a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268304
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37510}
2022-07-13 10:54:00 +00:00
Niels Möller
79924579f3 Add temporary accessors for numberOfTemporalLayers
Intended to be used in downstream code when deleting deleting this
attribute.

Bug: webrtc:11607
Change-Id: I39417997a2ec2e72d726da476b5bce88abe267b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267843
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37445}
2022-07-05 13:52:15 +00:00
Byoungchan Lee
a1a7c638ec Let PCF.GetRtpSenderCapabilities return codecs' scalabilityModes.
Also move ScalabilityModeToString to api and add RTC_EXPORT so that
Chromium can use it.

Bug: chromium:986069
Change-Id: I5dbbb6de9b14ca20f3ae0630552dcd44595ad5ef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267780
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#37444}
2022-07-05 13:28:33 +00:00
Niels Möller
6939f63ca1 Update old TODO comments
Bug: None
Change-Id: I96850df6cfa19303043108a59ef60d7b686ec747
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267661
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37436}
2022-07-05 09:59:33 +00:00
Niels Möller
865e45d14e Add default values for SimulcastStream members
The default values are zero, for consistency with the memset of VideoCodec. Except for numberOfTemporalLayers; This cl sets
numberOfTemporalLayers to 1 by default. The intention is to be able to
delete exlpicit setting of .numberOfTemporalLayers = 1 in downstream
code, to ease replacing it with a scalability mode.

Bug: webrtc:11607
Change-Id: I9de442f1893d474ea360f9b33364a00627f6c3be
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267662
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37430}
2022-07-05 08:37:43 +00:00
Niels Möller
3c24c096ef Add support for scalability modes L2T3 and S2T3
Bug: webrtc:11607
Change-Id: I1d0bd171564d2852f2f6ee2bbee26c7a1c0e1c3f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267103
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37389}
2022-07-01 08:17:04 +00:00
Sergio Garcia Murillo
179f40e81a add 422 8 and 10 bit decoding support
Bug: webrtc:14195
Change-Id: I2048d567850ae669d76d9e593752683f3c76499f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266180
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37306}
2022-06-22 15:08:44 +00:00
Niels Möller
9bda4905d2 Add public visibility for scalability_mode target
Bug: webrtc:11607
Change-Id: I93681ef6ff5918bd3bb26b006a9db9cab1805df2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265862
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37223}
2022-06-15 11:26:38 +00:00
Joe Downing
87bcc1cab9 Adding some AV1 constants and helper functions
I've added a basic AV1 impl to Chrome Remote Desktop and am looking into
what is needed to test with I444 (Profile-1) in our platform. This CL
adds a few helper functions, constants, and enums that can be used to
configure the SDP with different AV1 profiles. More work is still needed
but I wanted to get this in place first so I can build on it in the CRD
host code.

Change-Id: I1af9ebf31f833138e8c36e0c0a30e32289e7b58e
Bug: chromium:1329660
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264000
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Joe Downing <joedow@google.com>
Cr-Commit-Position: refs/heads/main@{#37182}
2022-06-10 16:39:54 +00:00
Jonas Oreland
6545516a14 RtpSenderInterface::SetEncoderSelector
This cl/ adds a way of setting an EncoderSelector on a specific
RtpSenderInterface. This makes it possible to easily use different
EncoderSelector on different streams within the same or different PeerConnections.

The cl/ is almost identical to the impl. of RtpSenderInterface::SetFrameEncryptor.

Iff a EncoderSelector is set on the RtpSender, it will take precedence
over the VideoEncoderFactory::GetEncoderSelector.

Bug: webrtc:14122
Change-Id: Ief4f7c06df7f1ef4ce3245de304a48e9de0ad587
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264542
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37150}
2022-06-08 11:06:52 +00:00
Niels Möller
c4b5f4da97 New struct SimulcastStream.
Currently has the same contents as struct SpatialLayer. Intention is
to add a ScalabilityMode member, which isn't appropriate for a spatial
layer.

Bug: webrtc:11607
Change-Id: I75c9e9b39407e3f24ec117bb17dc37830076b26f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262255
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37062}
2022-05-31 13:14:45 +00:00
philipel
f5c06f3a42 Forward video format to VP9Encoder::Create().
Bug: webrtc:14127
Change-Id: Ib2608aa220ecc10cb5f6759fb9f3a09ebaaaff7e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263600
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37001}
2022-05-25 10:32:31 +00:00
Niels Möller
be2fb41b32 Delete codec-specific frameDroppingOn settings.
Followup to https://webrtc-review.googlesource.com/c/src/+/262244

Bug: webrtc:6883
Change-Id: Iefac43709f14424c74470aa878ec512b7dacc68a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262258
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36949}
2022-05-20 14:54:31 +00:00
Niels Möller
c0a9f35248 Define SimulcastStream as an alias for SpatialLayer
Step one in making it a separate type, that will be done as a
followup, after downstream code is updated to use the new name.

Bug: webrtc:11607
Change-Id: I6fa664a0729b1cfd71b7f02b6441880beee0e741
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262806
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36946}
2022-05-20 13:12:21 +00:00
Niels Möller
cf2c8915f4 Delete H264EncoderSpecificSettings
Production code always use the default settings.

Bug: webrtc:6883
Change-Id: I213fc6433bb1cd0a6623ad523fee2df1506588e1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261903
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36926}
2022-05-18 13:53:20 +00:00
Erik Språng
4da317f0bb Remove complexity parameter from video codec specific structs.
Now only using the complexity from the main VideoCodec settings.

Bug: webrtc:13694
Change-Id: I5a29df0fac0c0686bf5ea0b677f8946d23ef9888
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262762
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36912}
2022-05-17 12:45:04 +00:00
Niels Möller
807328fec7 Move frame drop config to VideoCodec and VideoEncoderConfig.
Intend to delete corresponding codec-specific settings in a followup.

Bug: webrtc:6883
Change-Id: I78ab07729a5aee1055f80d39d8f7289beb6721e1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262244
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36882}
2022-05-13 13:40:14 +00:00
Niels Möller
14d01508be Move VP8 SupportsScalabilityMode utility to its own build target
Intended to let Vp8TemporalLayersFactory (an api/ target) reuse
this function, without depending on the codec implementation, and
without introducing a dependency cycle with the webrtc_vp8 build
target.

Bug: webrtc:11607
Change-Id: I671422e994e1005da8c7d768e8dd8ff795553e51
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261308
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36816}
2022-05-09 13:25:25 +00:00
Niels Möller
3b0481389f Update SupportsScalabilityMode functions to use enum ScalabilityMode.
And add missing values to ScalabilityMode.

Bug: webrtc:11607
Change-Id: I892ac35a3528db11b0901d26902699ecfe8f49a4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260982
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36792}
2022-05-06 07:29:20 +00:00