Commit graph

351 commits

Author SHA1 Message Date
Sergey Silkin
50e2054c5b Move setting single spatial layer bitrates to GetVp9SvcConfig
Before this change bitrate limits for VP9 single spatial layer case were set in VideoCodecInitializer. Move this logic to GetVp9SvcConfig. This simplifies replication of WebRTC behaviour in codec level tests. The similar AV1 logic sits in SetAv1SvcConfig, not VideoCodecInitializer.

Bug: webrtc:14852
Change-Id: Ie7202ec880d0e4b903e7265721eeef9b3920f21a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324286
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40992}
2023-10-23 14:10:21 +00:00
Sergey Silkin
a4b2b95f99 Restrict ARM-specific VP8/VP9/AV1 settings to mobile platforms
ARM-specific settings were intended to be used on mobile ARM devices which may not be powerful enough. But the settings were also applied to ARM-based Macs. This changes restricts ARM-specific settings to Android and iOS platforms.

Bug: none
Change-Id: I68764b4c0679db07399bba5923f4a6be89c5ad80
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321861
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Jerome Jiang <jianj@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40884}
2023-10-06 15:10:04 +00:00
Danil Chapovalov
9c58483b5a Rename EncodedImage property Timetamp to RtpTimestamp
To avoid name collision with Timestamp type,
To avoid confusion with capture time represented as Timestamp

Bug: webrtc:9378
Change-Id: I8438a9cf4316e5f81d98c2af9dc9454c21c78e70
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320601
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40796}
2023-09-24 20:06:48 +00:00
Tony Herre
55b593fb6b Remove EncodedFrame::MissingFrame and start removing Decode() param
Remove EncodedFrame::MissingFrame, as it was always false in actual
in-use code anyway, and remove usages of the Decode missing_frames param
within WebRTC. Uses/overrides in other projects will be cleaned up
shortly, allowing that variant to be removed from the interface.

Bug: webrtc:15444
Change-Id: Id299d82e441a351deff81c0f2812707a985d23d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317802
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Tony Herre <herre@google.com>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#40662}
2023-08-30 10:38:35 +00:00
Florent Castelli
8c4b9ea535 Remove references to AudioCodec and VideoCodec constructors
The preferred method to create codecs is to use the function
cricket::CreateAudioCodec or cricketCreateVideoCodec.
Empty codec objects are deprecated and should be replaced
with alternatives such as methods returning an
absl::optional object instead.

Bug: webrtc:15214
Change-Id: I7fe40f64673cd407830dbbb0e541b85a3aee93aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307521
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40226}
2023-06-05 23:23:40 +00:00
Florent Castelli
816f5b1a39 Create VP9Encoder with a VP9 codec object
Empty codec objects do not make sense. Instead of creating an empty
object to be used as a placeholder in the API, at least create a
video codec with the right name.

Bug: webrtc:15214
Change-Id: I705d9d1361f353fe5dc538a6fe972c8a346f1247
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307221
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40218}
2023-06-05 00:23:47 +00:00
Erik Språng
20bede7cc7 Clean up dead code in vp9 encoder wrapper
Bug: None
Change-Id: Ic99af40e95c5d82db9b4b5624eae3103d0a11c55
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304286
Auto-Submit: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40027}
2023-05-09 12:47:25 +00:00
Åsa Persson
014b244fa0 Keep SVC max bitrate if number of spatial layers are reduced.
Bug: chromium:1423361
Change-Id: I02bcb11f2ac456db79ed835dd38d4d7621a49608
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298446
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39614}
2023-03-21 12:00:17 +00:00
Tove Petersson
1fccaa4485 Reland "operator== for VideoFrameMetadata + used in CloneSenderVideoFrame test"
This reverts commit 8bf3210629.

Reason for revert: Initialized an uninitialized member in GofInfoVP9 (+ removed some redundant initialization of members already initialized by SetGofInfoVP9())

Original change's description:
> Revert "operator== for VideoFrameMetadata + used in CloneSenderVideoFrame test"
>
> This reverts commit 437bf78ed9.
>
> Reason for revert: Breaks upstream project
>
> Original change's description:
> > operator== for VideoFrameMetadata + used in CloneSenderVideoFrame test
> >
> > Added equality and inequality operators for VideoFrameMetadata and used the equality operator to check that the cloned metadata property is equal to the original metadata in RtpSenderVideoFrameTransformerDelegateTest.CloneSenderVideoFrame.
> >
> > Also default-initialized VideoFrameMetadata::ssrc_ to 0.
> >
> > Bug: webrtc:14708
> > Change-Id: If1f5153069bc986061ff9f0a6abaa2a4a5a98dd1
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293560
> > Commit-Queue: Tove Petersson <tovep@google.com>
> > Reviewed-by: Tony Herre <herre@google.com>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#39411}
>
> Bug: webrtc:14708
> Change-Id: Icbec1b65ed22b89766606cb9514dde6f4e9124be
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295500
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Auto-Submit: Andrey Logvin <landrey@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39413}

Bug: webrtc:14708
Change-Id: I843d29f7dd0da2c7f16968a7fc08dc02cd359fc1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295520
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Tove Petersson <tovep@google.com>
Cr-Commit-Position: refs/heads/main@{#39418}
2023-02-28 15:44:21 +00:00
Andrey Logvin
8bf3210629 Revert "operator== for VideoFrameMetadata + used in CloneSenderVideoFrame test"
This reverts commit 437bf78ed9.

Reason for revert: Breaks upstream project

Original change's description:
> operator== for VideoFrameMetadata + used in CloneSenderVideoFrame test
>
> Added equality and inequality operators for VideoFrameMetadata and used the equality operator to check that the cloned metadata property is equal to the original metadata in RtpSenderVideoFrameTransformerDelegateTest.CloneSenderVideoFrame.
>
> Also default-initialized VideoFrameMetadata::ssrc_ to 0.
>
> Bug: webrtc:14708
> Change-Id: If1f5153069bc986061ff9f0a6abaa2a4a5a98dd1
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293560
> Commit-Queue: Tove Petersson <tovep@google.com>
> Reviewed-by: Tony Herre <herre@google.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39411}

Bug: webrtc:14708
Change-Id: Icbec1b65ed22b89766606cb9514dde6f4e9124be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295500
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Andrey Logvin <landrey@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39413}
2023-02-28 11:50:42 +00:00
Tove Petersson
437bf78ed9 operator== for VideoFrameMetadata + used in CloneSenderVideoFrame test
Added equality and inequality operators for VideoFrameMetadata and used the equality operator to check that the cloned metadata property is equal to the original metadata in RtpSenderVideoFrameTransformerDelegateTest.CloneSenderVideoFrame.

Also default-initialized VideoFrameMetadata::ssrc_ to 0.

Bug: webrtc:14708
Change-Id: If1f5153069bc986061ff9f0a6abaa2a4a5a98dd1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293560
Commit-Queue: Tove Petersson <tovep@google.com>
Reviewed-by: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39411}
2023-02-28 08:32:09 +00:00
Palak Agarwal
a09f21b207 Introduce capture_time_identifier in webrtc::EncodedImage
This CL propagates capture_time_identifier introduced in
webrtc::VideoFrame and propagates it to EncodedImage. For use cases
involving EncodedTransforms, this identifier is further propagated to
TransformableVideoSenderFrame.

VideoEncoder::Encode function is overriden by each encoder. Each of
these overriden functions needs to be changed so that they can handle
this new identifier and propagate its value in the created EncodedImage.

Change-Id: I5bea4c5a3fe714f1198e497a4bcb5fd059afe516
Bug: webrtc:14878
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291800
Reviewed-by: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Palak Agarwal <agpalak@google.com>
Cr-Commit-Position: refs/heads/main@{#39374}
2023-02-22 17:08:53 +00:00
Sergio Garcia Murillo
1389c4b594 Add 444 10 bits support for H264 and VP9
This CL adds support for I410 buffers (444 10 bits) and modify vp9 and h264 for being able to convert input buffer to it when appropiate.

Bug: webrtc:14818
Change-Id: I2fb3dc9d80c5338944c6df74dd6217a0454180d9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290721
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39123}
2023-01-17 12:32:26 +00:00
Evan Shrubsole
9b235cd93b Add scalability mode to RTCOutboundRtpStreamStats stats
This is in the webrtc-stats spec at
https://www.w3.org/TR/webrtc-stats/#dom-rtcoutboundrtpstreamstats-scalabilitymode.

This adds the scalability mode to CodecSpecificInfo which is used to
plumb the modes for each simulcast layer.

TBR=orphis@webrtc.org

Tested: Compiled into Chrome and confirmed the scalability mode set for AV1, VP9, VP8 and H264 software encoders in chrome://webrtc-internals.
Bug: webrtc:14730
Change-Id: I71ceba8f6485a4f4a73e0856031b8d5f16f913f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285085
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38847}
2022-12-08 11:46:06 +00:00
Åsa Persson
b8a4daa31c Add support for reducing number of spatial layers via scalability mode.
Bug: webrtc:13960
Change-Id: Icf31d2e327e363dac24245cb5c9fc14cbaa9b3b4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275942
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38454}
2022-10-24 09:40:39 +00:00
Byoungchan Lee
80ed9b8eb9 Remove unused VP9 TemporalStructureMode
kTemporalStructureMode4 is not used anywhere in the code.

Bug: None
Change-Id: I9a396f6706d26940fae68d1318942b5f31afa3bf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274380
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#38079}
2022-09-14 13:33:59 +00:00
Danil Chapovalov
8bfec7c5bc Speed up per frame debug log in vp9 encoder wrapper
For the linked test case that speeds up chromium fuzzer by ~13%
Run time decrease from ~50 seconds to ~44 seconds

Bug: chromium:1357929
Change-Id: I702edf4fda7afd31a5288621220dac063f764ced
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274601
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38038}
2022-09-08 16:39:40 +00:00
Evan Shrubsole
9f1f48bdd8 Remove WebRTC-NV12Decode field trial
As mentioned in https://crbug.com/webrtc/11956, the results did not show
any performance improvments.

Bug: webrtc:11956
Change-Id: Ie050aa5a6083fcf0c776fb8d03e7d18644b37f97
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272280
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37833}
2022-08-19 08:57:34 +00:00
Danil Chapovalov
2ed6fc2217 In Vp9 encoder wrapper force key frame on svc controller request
Bug: chromium:1349761
Change-Id: I865a251ea87b0946ff0247cba5c3bf1e098dffab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270482
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37684}
2022-08-03 19:15:45 +00:00
Danil Chapovalov
3f21ba68bc Improve LibvpxVp9Encoder::UpdateReferenceBuffers perfomance
This change speeds up vp9 encoder reference fuzzer

Bug: chromium:1281020
Change-Id: I8def449b2bf7a525c8d4c8179b68d0b89594bdc1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269216
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37642}
2022-07-29 07:50:11 +00:00
Zhaoliang Ma
e7696f771d Plumb color space from VP8/VP9/H264 encoder
Bug: None
Change-Id: If771d9486bde01d5a2775d904a01ecf3953e75df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268944
Commit-Queue: Zhaoliang Ma <zhaoliang.ma@intel.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37566}
2022-07-20 09:08:41 +00:00
Niels Möller
cb99ccd244 Update/delete old TODOs
Bug: webrtc:10198
Change-Id: I0341e068d792bc0b143db86e675988f4cd07ff2e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267822
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37454}
2022-07-06 07:49:04 +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
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
Florent Castelli
90b74389a2 SVC: Add end to end tests for VP8 and VP9
The tests check that the various scalability mode are supported
and the frames are marked properly by the encoder with their
spatial and temporal index.
The same information is then checked on the receiving side.

A new member is added on EncodedImage to store the temporal index,
and is filled by the encoders and retreived by the ref finder
objects on the decoding side.

Bug: webrtc:11607
Change-Id: I7522f6a6fc5402244cab0c4c64b544ce09bc5204
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260189
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37303}
2022-06-22 11:07:01 +00:00
Åsa Persson
37f7d6c4e1 Update VP9Encoder::SupportsScalabilityMode
Indicate that the scalability mode is supported if the scalability config exists.

Bug: webrtc:13960
Change-Id: I6f42da6c9bbff1322ec5c3e3a68c7e031606da86
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262981
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36989}
2022-05-24 15:51:53 +00:00
Asa Persson
cde992ddad Add support for VP9 configuration through scalability mode.
Bug: webrtc:13960
Change-Id: Ia930647b15f624a4d10d8d335519b69ffdae6636
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260983
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36919}
2022-05-18 08:21:00 +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
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
Niels Möller
79d566b0cf New enum ScalabilityMode.
Used instead of string representation in lower-levels of encoder configuration, to avoid string comparisons (with risk of misspelling) in lots of places.

Bug: webrtc:11607
Change-Id: I4d51c2265aac297c29976d2aa601d8ffb33b7326
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259870
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36706}
2022-04-29 12:16:42 +00:00
Erik Språng
e4589cb55e Reduce libvpx VP9 complexity setting on <= 2 core machines.
This CL sets speed 9 for all resolutions when two or less cores are
available, as a heuristic for a "slow" machine.
This gives a large speed bost at a relatively small quality loss.

A field-trial kill-switch is available to override this behavior.

Bug: webrtc:13888
Change-Id: I24278a45de000ad7984d0525c47d9eb6b9ab6b60
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257421
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36466}
2022-04-06 16:08:00 +00:00
Erik Språng
3225385b3e VP9 per layer settings should not force denoising.
In r36379 a change to per-resolution setting of denoising was introduced
that unintentionally enabled denoising on lower resolutions in the case
that VideoCodec::VP9()->denoising was false.
The CL makes sure the per-resolution setting are only allowed to
disable denoising, not enable it.

Bug: webrtc:13888
Change-Id: Ice07a5a7d27798dc2182a40af0ec521bde6210b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257303
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36412}
2022-04-02 22:03:21 +00:00
Erik Språng
3be87e9afd Reduce VP9 complexity for 1080p and up.
This CL changes the default speed settings for TL0/TL[1-2] from
7/8 to 9/9 at 1080p resolutions and up. We also disable the denoiser
at these resolutions.
Settings can be overriden using existing WebRTC-VP9-PerformanceFlags
field trial.

Bug: webrtc:13888
Change-Id: I70f19efdace88d70bbb90bc6dd5149653eb079c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257141
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36379}
2022-03-30 14:22:31 +00:00
Jonas Oreland
e62c2f2c77 WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 12/inf
rename WebRtcKeyValueConfig to FieldTrialsView

Bug: webrtc:10335
Change-Id: If725bd498c4c3daf144bee638230fa089fdde833
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256965
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36365}
2022-03-29 10:14:00 +00:00
Ali Tofigh
62238097c9 Remove top-level const from parameters in function declarations.
This is a safe cleanup change since top-level const applied to
parameters in function declarations (that are not also
definitions) are ignored by the compiler. Hence, such changes do
not change the type of the declared functions and are simply
no-ops.

Bug: webrtc:13610
Change-Id: Ibafb92c45119a6d8bdb6f9109aa8dad6385163a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249086
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35802}
2022-01-26 11:05:25 +00:00
Erik Språng
16cbed4782 Update how VP9 temporal up switch is populated
This CL updates both the static GOF pattern with the correct flags for
temporal_up_switch, as well the flexible mode logic to base the flag
on dependency descriptors instead use reference buffers.

Bug: webrtc:13576
Change-Id: I578f744bec51d1f3531da5f4a89d12f05a16a6c0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/247187
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35741}
2022-01-19 15:42:21 +00:00
Erik Språng
4b5caee6b1 VP9 encoder: mark only base spatial layer as keyframe
Bug: webrtc:13576
Change-Id: Ia4173d3aa2c8e546a818eccc5d6c09d1150dcaf4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/247188
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35736}
2022-01-19 11:09:34 +00:00
Niels Möller
ac0d18341d Prepare for deleting implicit conversion from raw pointer to scoped_refptr.
Updates all webrtc code, to have a small followup cl to just add the
"explicit" keyword. Patchset #24 passed all webrtc tests, with explicit.

Bug: webrtc:13464
Change-Id: I39863d3752f73209b531120f66916dc9177bf63a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/242363
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35718}
2022-01-18 08:22:15 +00:00
Christoffer Jansson
31bd9fadb6 Disable Vp9ImplTest.DisableEnableBaseLayerWithSvcControllerTriggersKeyFrame
- Enable once a forward fix has landed in WebRTC

Bug: webrtc:13442
Change-Id: I0493fbbfbcf96e643d604406b350a3d315b24779
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/245601
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@google.com>
Cr-Commit-Position: refs/heads/main@{#35670}
2022-01-12 16:43:38 +00:00
Christoffer Jansson
b82193cec8 Disable DisableEnableBaseLayerTriggersKeyFrame
- Enable once a forward fix has landed in WebRTC.

Bug: webrtc:13442
Change-Id: I295383b84a753e8e1f65006cc6a3c00b78033aa4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/245643
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@google.com>
Cr-Commit-Position: refs/heads/main@{#35659}
2022-01-11 14:59:24 +00:00
Konrad Hofbauer
d2cd8722cd Consider frame orientation for number of spatial layers in VP9.
Addresses case where 540*960 would not get a 135*240 layer.

Bug: webrtc:13469
Change-Id: Icc291c65114fb400cc71659d76a786e359e5996c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/239820
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Konrad Hofbauer <hofbauer@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35507}
2021-12-09 09:39:50 +00:00
Niels Möller
13d163654a Delete support for has_internal_source
Bug: webrtc:12875
Change-Id: I9683e71e1fe5b24802033ffcb32a531ca685fc6f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179220
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35353}
2021-11-16 11:29:40 +00:00
Artem Titov
d3251968d1 Prepare to rename RTC_NOTREACHED to RTC_DCHECK_NOTREACHED
Add implementation of RTC_DCHECK_NOTREACHED equal to the RTC_NOTREACHED.
The new macros will replace the old one when old one's usage will be
removed. The idea of the renaming to provide a clear signal that this
is debug build only macros and will be stripped in the production build.

Bug: webrtc:9065
Change-Id: I4c35d8b03e74a4b3fd1ae75dba2f9c05643101db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237802
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35348}
2021-11-15 21:44:59 +00:00
Harald Alvestrand
97597c0f51 Remove usage of INFO alias for LS_INFO in log messages
Bug: webrtc:13362
Change-Id: Ifda893861a036a85c045cd366f9eab33c62ebde0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237221
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35310}
2021-11-04 13:46:17 +00:00
Emil Lundmark
823ba0b038 Cleanup WebRTC-Vp9DependencyDescriptor field trial
Bug: chromium:1178444
Change-Id: Ie2ec796e207fa427fdbe00c8ea41a6b4fefea155
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235374
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35241}
2021-10-19 14:29:29 +00:00
Emil Lundmark
7b35b44b52 Zero initialize heap allocations in LibvpxVp9{Decoder,Encoder}
Bug: chromium:1251010
Change-Id: Iffefdc8bee3752f89b0201f56fd06a2253b53200
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232602
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35049}
2021-09-21 09:24:09 +00:00
Emil Lundmark
b01e6457fe Reland "Reland "Enable WebRTC-Vp9DependencyDescriptor by default""
This is a reland of b062829311

> Reland "Enable WebRTC-Vp9DependencyDescriptor by default"
>
> This is a reland of 4727071506
>
> Original change's description:
> > Enable WebRTC-Vp9DependencyDescriptor by default
> >
> > Bug: chromium:1178444
> > Change-Id: I420e1e9b3c557b8b186cb08c15b962a779e1ca17
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226941
> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#34584}
>
> Bug: chromium:1178444
> Change-Id: I874412b41e657179be6ffbe399617e18a29ec804
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230121
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34890}

Bug: chromium:1178444
Change-Id: I5bb3e3bd2da26f9a24d5e8161bd66b447543fc8e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231843
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35004}
2021-09-15 13:48:58 +00:00
Johannes Kron
b26863ed0c Reland "Handle scalability mode in QueryCodecSupport"
This reverts commit 74281bed53.

Reason for revert: Fixed unit test by removing VP9 profile 2 from encoder factory unit test since this is platform dependent.

Original change's description:
> Revert "Handle scalability mode in QueryCodecSupport"
>
> This reverts commit 715a148118.
>
> Reason for revert: Speculative revert. Breaks upstream project http://b/200009579
>
> Original change's description:
> > Handle scalability mode in QueryCodecSupport
> >
> > All valid scalability modes should be supported by the builtin
> > software decoder/encoder.
> >
> > Bug: chromium:1187565
> > Change-Id: If66105d210d5055019f35dae2f80a18ad4a70cdd
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222642
> > Commit-Queue: Johannes Kron <kron@webrtc.org>
> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#34998}
>
> TBR=danilchap@webrtc.org,sprang@webrtc.org,kron@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
>
> Change-Id: Ibf40d523c50791d73e2afdc3917892b859d2bcb6
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:1187565
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232020
> Reviewed-by: Andrey Logvin <landrey@webrtc.org>
> Commit-Queue: Andrey Logvin <landrey@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35001}


Bug: chromium:1187565
Change-Id: I598a2a530b8fea22997bbb5910eb3b864d1e28a2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232021
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35003}
2021-09-15 13:12:58 +00:00
Andrey Logvin
74281bed53 Revert "Handle scalability mode in QueryCodecSupport"
This reverts commit 715a148118.

Reason for revert: Speculative revert. Breaks upstream project http://b/200009579

Original change's description:
> Handle scalability mode in QueryCodecSupport
>
> All valid scalability modes should be supported by the builtin
> software decoder/encoder.
>
> Bug: chromium:1187565
> Change-Id: If66105d210d5055019f35dae2f80a18ad4a70cdd
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222642
> Commit-Queue: Johannes Kron <kron@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34998}

TBR=danilchap@webrtc.org,sprang@webrtc.org,kron@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: Ibf40d523c50791d73e2afdc3917892b859d2bcb6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1187565
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232020
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Commit-Queue: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35001}
2021-09-15 10:45:41 +00:00