Commit graph

1704 commits

Author SHA1 Message Date
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
Florent Castelli
a6b9924988 Remove all usage of //rtc_base target
Bug: webrtc:9838
Change-Id: If813dbb426b4dc848185b64c0349d03fa9c059f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290986
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39116}
2023-01-16 14:36:06 +00:00
Åsa Persson
e6b4cbe606 Add SVC fallback.
Fallback to a default value if the scalability mode is unset or not supported by the codec.

The fallback logic is only enabled if the scalability mode is configured for any of the encodings for now (i.e. initial default values are not set).

Bug: webrtc:11607
Change-Id: Ie632767b627a1dbbef71c59f9340573daf386c14
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/287600
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39074}
2023-01-11 16:49:49 +00:00
anurag
b081042eec Remove dimension check in SimulcastUtility::ValidSimulcastParameters
We found that the legacy assumption for H264 which assumed that
simulcast streams would use 2x width ratios in unnecessary as the
encoder has since been fixed to handle multiple ratios.
H264 encoder still works even if this assumption is invalid

Bug: None
Change-Id: I9caacf78d26c8215b94858a2d8674ec4cd64e96e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/286940
Reviewed-by: Mirta Dvornicic <mirtad@google.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39072}
2023-01-11 13:41:55 +00:00
Evan Shrubsole
11dfb42fe9 [Unwrap] Migrate TimestampExtrapolator to use RtpTimestampUnwrapper
Bug: webrtc:13982
Change-Id: I570f2b053e7c77295e9d6a60f005e51022c3759f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288942
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39042}
2023-01-09 18:24:28 +00:00
Evan Shrubsole
5ef5c2e9b8 [Unwrap] Use RtpTimestampUnwrapper in IvfFileWriter
Bug: webrtc:13982
Change-Id: Iddcc32d5836be524368d691ce4ab0ad630b4b559
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288747
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39040}
2023-01-09 18:22:13 +00:00
Evan Shrubsole
1c7602c65d [Unwrap] Migrate InterFrameDelay to RtpTimestampUnwrapper
Bug: webrtc:13982
Change-Id: I0c4fe63f47d842fc5871baeb1137aa225bc10ea4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288960
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39039}
2023-01-09 18:21:05 +00:00
Evan Shrubsole
f7b0e14d8b [Unwrap] Use RtpTimestampUnwrapper in ScreenshareLayers
Bug: webrtc:13982
Change-Id: I4dbd05be7db77450a7a3a2c6a22f0101c9cb9150
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288748
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39033}
2023-01-09 14:38:55 +00:00
Florent Castelli
a138c6c8a5 Split rtc_base into multiple targets
Keeping the headers to allow compatibility with current users
that expect the headers to be in that target before they are
also updated.

Bug: webrtc:9838
Change-Id: I8b1e88850958e92c043686587a37791f01860220
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290569
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39031}
2023-01-09 12:21:25 +00:00
Evan Shrubsole
097fc347ec [Unwrap] Prepare SequenceNumberUnwrapper for migrations
This is in prep for the migration of all unwrappers to
SequenceNumberUnwrapper as a standard implementation.

This moves the SeqNumUnwapper to its own header and adds 2 methods to
SeqNumUnwrapper which are defined by other unwrappers:
* PeekUnwrap
* Reset

It also adds two implementations for RtpTimestamps and
RtpSequenceNumbers.

Bug: webrtc:13982
Change-Id: I5baefb2de1db92fe1bb600760bd63b71e9310eb5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288742
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39030}
2023-01-09 11:42:20 +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
Sergey Silkin
2e1a9a4ae0 Add video codec tester.
This tester is an improved version of VideoProcessor and VideoCodecTestFixture and will eventually replace them.

The tester provides better separation between codecs and testing logic. Its knowledge about codecs is limited to frame encode/decode calls and frame ready callbacks. Instantiation and configuration of codecs are the test responsibilities.

Other differences:
- Run encoding and decoding in separate threads
- Run quality analysis in a separate thread
- Reference frame buffering is moved into video source (which re-read frames from the file).
- Make it possible to run decode-only tests

This CL is MVP implementation: it adds only 1 test (video_codec_test.cc, ConstantRate/EncodeDecodeTest) and the test is disabled for now.

Bug: b/261160916
Change-Id: Ida24a2fca1b1496237fa695c812084877c76379f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283525
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38901}
2022-12-15 14:32:53 +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
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
Sergey Silkin
1985b5a927 Refactor YUV frame reader
Purposes of this refactoring:
1. Add functionality for reading a specified frame.
2. Change resolution and frame rate on per-frame basis.

Both features are needed for https://webrtc-review.googlesource.com/c/src/+/283525

Bug: b/261160916
Change-Id: I6d60e62dbc3913c43b5c1b491690f5cb4a8632dd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285483
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38829}
2022-12-06 16:23:48 +00:00
Philipp Hancke
279b4b7d4f generateKeyframe: pass frame_types in bypass mode
Passes frame_types to the underlying encoder in bypass mode.
For libvpx this has no effect, for H264 this changes the behavior
to allow generating keyframes on a per-layer basis.

BUG=chromium:1354101

Change-Id: I26fc22d9e2ec4681a57ce591e9eafd0b1ec962b0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285083
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#38821}
2022-12-06 10:54:59 +00:00
Artem Titov
c7fc01269e Fix IvfFileReader to support different time scales
Bug: b/237998511
Change-Id: I8e7766b38cfe19b2fb58853c9614e4d32ea34715
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285087
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38737}
2022-11-25 15:31:53 +00:00
Philipp Hancke
e862da376f generatekeyframe: allow simulcast_encoder_adapter to request per-layer
in the case of separate encoders.

drive-by: add helper function to expect per-layer keyframes

BUG=chromium:1354101

Change-Id: Ib645a621add899f035bea319f035dcb0b2617510
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281002
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#38734}
2022-11-25 12:12:05 +00:00
Sergey Silkin
7404f07ad9 Sync target rates
Cache target bit- and framerate in a frame_num -> rates map and fetch
the rates accociated with the current frame when needed. This solves
the issue when wrong target rates may be used due to frames buffering
in encoder.

Bug: b/254447893
Change-Id: I369c8d8e71234c957dc2362b055061d12cec818f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283841
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38673}
2022-11-18 10:22:01 +00:00
philipel
ef005bc924 Unwrap the presentation timestamp before calling aom_codec_encode in LibaomAv1Encoder.
Bug: webrtc:14673
Change-Id: I0358fed5ac0839994482c5fb049c13e442f82c82
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283701
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38657}
2022-11-17 08:32:18 +00:00
Bruce Dawson
d2a48e8226 Permanently switch to new openh264 include directory
Openh264 switched from api/svc to api/wels as the location for some
codec header files. During the transition it was necessary to
conditionally from either the old or new location, but now that the
switch is completed and has settled for about two weeks the conditionals
can be removed. This finishes the #include transition started by
webrtc-review.googlesource.com/c/280800

Bug: chromium:1218384
Change-Id: Ic0847428d134687908cc26fec1fdec0c612674b2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38622}
2022-11-15 11:39:26 +00:00
Sergey Silkin
73f3393426 Select openh264 includes based on OPENH264_API_WELS
This should be landed after https://chromium-review.googlesource.com/c/chromium/src/+/3986032

Bug: chromium:1218384
Change-Id: Id4104d2914f811e722a083021f515fd06b69b910
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280800
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Bruce Dawson <brucedawson@google.com>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38515}
2022-10-31 19:51:58 +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
Evan Shrubsole
09da10e24f Add powerEfficientDecoder and powerEfficientEncoder stats
The spec for these are at https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-powerefficientdecoder and https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-powerefficientdecoder

These stats are based on the is_hardware_accelerated boolean in both the
DecoderInfo and EncoderInfo structs.

Bug: webrtc:14483
Change-Id: I4610da3c6ae977f5853a3b3424d91d864fe72592
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274409
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38441}
2022-10-19 13:15:31 +00:00
Rasmus Brandt
fb3bd4a01d Logging clarification for frame_helpers.
Bug: b/250447844
Change-Id: Ia52fad7d1e588c205d075cda7797bc2252efd95e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278628
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38387}
2022-10-13 12:40:36 +00:00
Mirko Bonadei
8d92c04a6d Add missing dependencies.
No-Try: True
Bug: b/251890128
Change-Id: I496a09f79a772957815c7e580fb435f8d313438f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278680
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38341}
2022-10-10 15:51:33 +00:00
Mirko Bonadei
5c9b7da038 Add missing dependencies.
Bug: b/251890128
Change-Id: Ia9312797a5552ad1ceb4a80968014b849121a1b9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278580
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38333}
2022-10-10 10:18:37 +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
philipel
7446b60823 Only update TimestampExtrapolator on the last frame of the temporal unit.
Bug: webrtc:14526
Change-Id: I3fd7cb286050fc4cbe0008534f05141aa19b7606
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278142
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38310}
2022-10-06 15:02:54 +00:00
philipel
0c4563c0c4 Remove the libaom av1 decoder.
Bug: webrtc:14267
Change-Id: I95a416b25fa20d4dea6896e05beb59789621f1fa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268305
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38253}
2022-09-30 08:42:25 +00:00
Tommi
73009ec641 Move ownership of decoders to VCMDecoderDatabase
Bug: webrtc:14497
Change-Id: Idf719a1d1605f19fcf46eff7990c61144f2b9e3b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/277401
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38251}
2022-09-30 06:21:36 +00:00
Tommi
20b3271b61 Fork VCMDecoderDatabase for VideoReceiver.
This is to keep the deprecated VideoReceiver separate from the
implementation used by VideoReceiver2 before updating
VCMDecoderDatabase to have ownership of the registered decoders.

Fixing typo (DataBase->Database) in the name of the remaining class.

Bug: webrtc:14486, webrtc:14497
Change-Id: I5ee755921454b0831b3af6d0161f5b48c7c60540
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276781
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38247}
2022-09-29 19:01:05 +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
Björn Terelius
8da45ad5f6 Remove unused #define in quality_scaler.cc
Bug: None
Change-Id: I8a4f130d90fa5e3c251945c333b2ac584e5e0662
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/277001
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38240}
2022-09-29 09:10:33 +00:00
Jonas Oreland
1262eb5ebc Move EncoderStreamFactory into own file
This cl/ is a NOP refactoring,
moving the EncoderStreamFactory from within webrtc_video_engine.cc
into own file in video/. simulcast.cc is collateral.

Bug: webrtc:14451
Change-Id: Ia69b9241d8cd8a12be6628d887701f2e244c07cc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276861
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38224}
2022-09-27 17:29:11 +00:00
Artem Titov
dab4cea30d Migrate VideoCodecTestFixture on new perf metrics logging API
Bug: b/246095034
Change-Id: I312f2643e4c84cdfa3e8fef7078a2decbbfef978
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276629
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38217}
2022-09-27 08:31:12 +00:00
Zhaoliang Ma
dd65499002 Skip one data copy on dav1d decoding
This CL wraps the |Dav1dPicture| data directly for |VideoFrame| using
instead of copy data out to new buffer.

Bug: None
Change-Id: I21ceffb5cac7dda4a44eafbd0ed221974b8d45ca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276526
Commit-Queue: Zhaoliang Ma <zhaoliang.ma@intel.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38194}
2022-09-26 08:37:24 +00:00
Linus Nilsson
8e0fc17204 Add a video codec timeout error code
Reporting timeouts is useful for native hw backed codec implementations.
The value is in sync with VideoCodecStatus.java in the Android sdk.

Bug: b/185740707
Change-Id: I9a08a1303586c677be53aaa4f39455f42e519996
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276042
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Auto-Submit: Linus Nilsson <lnilsson@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38168}
2022-09-22 10:49:10 +00:00
Byoungchan Lee
bc4796af94 Add the dependency descriptor for H.264 temporal scalability
And validate it using svc_e2e_tests.

Bug: webrtc:13961
Change-Id: Ie7edcf5a0684f46e4d26155b77cebbebbd46d21f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269541
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38153}
2022-09-21 12:18:23 +00:00
Rasmus Brandt
2f650fa822 JitterEstimator: remove unnecessary helper functions
Move functionality to closer where the values are used instead,
as per previous CL comment.

Bug: webrtc:14151
Change-Id: I6b7ca02da197420a1f5da930ba87021e6f557444
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275204
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38148}
2022-09-21 10:42:57 +00:00
Rasmus Brandt
9a6a087f37 Remove forward declares
This was missed in https://webrtc-review.googlesource.com/c/src/+/275482.

Bug: webrtc:14111
Change-Id: Id5efcc6838fc3ce4745074b8888c733939e4478d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275767
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38101}
2022-09-16 13:33:08 +00:00
Rasmus Brandt
e4bc975a8a JitterEstimator: add field trial for not estimating noise for congested frames
The reason for rejecting the congested frames in the first place, is
that they do not obey a Gaussian distribution around the line from the
Kalman filter. It therefore also does not make sense to include them
in the noise (*) estimation.

(*) noise = variation around the line from the Kalman filter.

Bug: webrtc:14151
Change-Id: Id8a44ba5f13bf9787ab54848109430ef7657f67a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275762
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38100}
2022-09-16 12:40:38 +00:00
Rasmus Brandt
bcf24f5bcd Move TimestampExtrapolator closer to its single user
The `TimestampExtrapolator` is only used by the `VCMTiming`
class, despite there being references to it from both
`modules/rtp_rtcp/BUILD.gn` and `modules/video_coding/BUILD.gn`.

Bug: webrtc:14111
Change-Id: If1a02a56a0c83b13d619ca08dc76c884fa829369
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275482
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38093}
2022-09-15 13:49:18 +00:00
Rasmus Brandt
624f2eb1aa JitterEstimator: add field trial for overriding frame delay variation clamping
Bug: webrtc:14151
Change-Id: Ib1f26cfaf92ca56000d5904432901d5db225b05a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275203
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38092}
2022-09-15 12:38:13 +00:00
Markus Handell
e1a198b41d VideoStreamEncoder: set at target quality based on codec.
The Chromium RTCVideoEncoder unfortunately doesn't set if the
result is at target quality, and the definition of the threshold
is buried in libvpx_vp8_encoder.h.

This change
* Updates VideoStreamEncoder to postprocess an incoming EncodedImage
by interpreting the incoming QP information instead.
* Updates the related VideoStreamEncoder test to simulate an encoder
producing images around the QP threshold.
* Updates the steady state VP8 screencast QP threshold to a central
include file.
* Moves this and previously existing EncodedImage post-processing to a
new method AugmentEncodedImage.

Bug: b/245029833
Change-Id: I69ae29ffe501e84f28908f7d9a8cfd066ba82b43
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275380
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38091}
2022-09-15 12:15:17 +00:00
Rasmus Brandt
7d704739d7 JitterEstimator: add input validation to field trials
This functionality should have been added as part of the original CLs,
but was missed. The purpose of the validation is avoid catastrophic
failures due to misconfiguration (such as RTC_CHECK crashes).
The purpose is not to always provide practically reasonable values.

Bug: webrtc:14151
Change-Id: Icbddade865bd6a868f467a1df7055026935f36f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275560
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38090}
2022-09-15 11:30:37 +00:00
Rasmus Brandt
916648107b Generalize MovingMedianFilter to MovingPercentileFilter
* Make `percentile` configurable and rename class.
* Introduce convenience type `MovingMedianFilter` that
  maintains the behaviour of the old class with that name.
* Move home grown moving 95th percentile filter in
  `JitterEstimator` to this new utility class.

Bug: webrtc:14151
Change-Id: I17d525b6e0bc98c28568c7dfe94b72eeab4a1ca2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275311
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38082}
2022-09-14 15:32:06 +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
Rasmus Brandt
0a617882df JitterEstimator: add field trial overrides for avg frame filter
This change adds a median filter that can replace the
IIR filter that is currently used to estimate the
avg frame size (in bytes). It is enabled through a boolean,
and reuses the window length from the max percentile filter.

The median filter is only used by the delay calculation in
`CalculateEstimate()`. It does not replaced the use of the
IIR estimate in the size outlier rejection heuristic.

Bug: webrtc:14151
Change-Id: I519b6b57a8bee3c41a300ed2e92a1981c61cca15
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275121
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38077}
2022-09-14 12:12:27 +00:00