Commit graph

1062 commits

Author SHA1 Message Date
Evan Shrubsole
fe24f58c73 Report proper VP9 scalability mode with layer activation.
This changes the libvpx VP9 encoder to generate the scalability mode based on the current encoding parameters when using layer activation.

Tested: Ran with L3T3_KEY reduced to L2T3_KEY and L1T3 due to bandwidth or layer activation. Added unit tests.
Bug: webrtc:15892
Change-Id: Iaedca4ea5fc3a692996666ceaf0d6aa03fb058a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/344760
Commit-Queue: Evan Shrubsole <eshr@google.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42007}
2024-04-05 14:02:59 +00:00
Danil Chapovalov
9630287841 Require webrtc::Environment to create VP9 encoder
Bug: webrtc:15860
Change-Id: I0a3f1381f82d0172805e6ed6c44616e5c83b7a1b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345743
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42005}
2024-04-05 13:49:26 +00:00
Danil Chapovalov
73588223c1 Require webrtc::Environment to create H264 Encoder
Bug: webrtc:15860
Change-Id: I76517ee3603847ff064f16fddc9423a3568818a7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345741
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42004}
2024-04-05 13:25:30 +00:00
Johannes Kron
82598402e0 Use predefined SdpVideoFormats when returning supported formats
The predefined SdpVideoFormats were not used everywhere,
which caused a discrepancy between send/receive capabilities
for AV1. This CL solves the immediate problems by making sure
send/receive capabilities for AV1 are reported the same way.

Fixed: chromium:331565934
Change-Id: I073091b7b5f987c7f434c17276fd84047ec723c2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/344681
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41991}
2024-04-03 15:13:11 +00:00
Danil Chapovalov
be9d13a305 Pass webrtc::Environment when constructing video encoders in video/ tests
Bug: webrtc:15860
Change-Id: I44725bddfb5c80d94ad29406c2b0cab013595ce3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343762
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41954}
2024-03-22 13:48:58 +00:00
Ted Meyer
e7d1004709 Remove usage of AVCodecContext::reordered_opaque
FFmpeg has removed this field and usage of it in chromium must be
removed before the ffmpeg dependency is updated. The chromium media
change can be found here:
https://chromium-review.googlesource.com/c/chromium/src/+/5384308

The usage of the field in webrtc seems only to be for sanity checking,
so it should be just safe to remove entirely, since webrtc does not
expect re-ordering at all.

Bug: chromium:330573128
Change-Id: I9c5854ec82c3ad2d55374ea4eaa0c571437f8267
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343840
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Ted (Chromium) Meyer <tmathmeyer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#41935}
2024-03-21 01:12:56 +00:00
Ilya Nikolaevskiy
98aba6b9a8 Configure default bitrate targets for VP9 simulcast
Bug: webrtc:15852
Change-Id: Icab74d4eafe4cfb95dace7ae0e3e5810f3052204
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340441
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41908}
2024-03-15 14:34:15 +00:00
Ted Meyer
d1ba1dc9c7 Update includes to use <> instead of ""
Webrtc is build with FFmpeg sources on defined in the include path
through the -I flag, so they should be included this way instead. This
would otherwise cause a conflict when the chromium ffmpeg sources move
from third_party/ffmpeg/* to third_party/ffmpeg/src/*

BUG: chromium:329282834
Change-Id: Id8f7e91446bdc536db77e74388a73e51f5111ffc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342820
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Ted (Chromium) Meyer <tmathmeyer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#41899}
2024-03-13 21:51:37 +00:00
Per K
0fa90887c5 Deprecate VideoFrame::timestamp() and set_timestamp
Instead, add rtp_timestamp and set_rtp_timestamp.

Bug: webrtc:13756
Change-Id: Ic4266394003e0d49e525d71f4d830f5e518299cc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342781
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41894}
2024-03-13 11:08:37 +00:00
Danil Chapovalov
2725317b1f Propagate Environment through SimulcastEncoderAdapter when provided
Bug: webrtc:15860
Change-Id: Iabd7752ada2f8f774de1e2adc02a4157004bf43c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342720
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41893}
2024-03-13 10:32:31 +00:00
Danil Chapovalov
329f0ead43 Provide Environment when creating VideoEncoder in test code
Bug: webrtc:15860
Change-Id: I8c79ff58619716842e02f33e78a0529c631494e6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342280
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41884}
2024-03-12 11:09:31 +00:00
Danil Chapovalov
b4913a549f Add factory functions to pass Environment to VideoEncoders
Bug: webrtc:15860
Change-Id: I4a9d2678dcfe5b0f178863242e27600fcc95325d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342480
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41879}
2024-03-12 09:43:14 +00:00
Johannes Kron
17e358096e Add AV1 encoder speed setting for screen share
There's an AV1 encoder speed setting 11 that is supposed to be used
for screen sharing content.

Bug: chromium:328598314
Change-Id: Id97898554a740eb1684d03c782c718c19f4c95e2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342201
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41874}
2024-03-08 14:53:54 +00:00
Danil Chapovalov
b9ce3b79fc Delete deprecated VP8Decoder::Create
Bug: webrtc:15791
Change-Id: Ic198706535da9f299735cd0a7bbf571cda643098
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340461
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41837}
2024-02-28 15:18:11 +00:00
Philipp Hancke
bbff58d935 Introduce "well-known" SdpVideoFormat codecs
describing video codecs with their parameters as static members of SdpVideoFormat:
  static const SdpVideoFormat VP8();
  static const SdpVideoFormat H264();
  static const SdpVideoFormat VP9Profile0();
  static const SdpVideoFormat VP9Profile1();
  static const SdpVideoFormat VP9Profile2();
  static const SdpVideoFormat VP9Profile3();
  static const SdpVideoFormat AV1Profile0();
  static const SdpVideoFormat AV1Profile1();
This removes the need to craft instances of these by hand.

BUG=webrtc:15703

Change-Id: I2171e08b48ec98f18424f53f3b5d6d148130532e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337441
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41833}
2024-02-28 06:57:10 +00:00
Markus Handell
97df932ecc Remove multiplex codec.
The feature isn't in use by Google and has proven to contain security
issues. It's time to remove it.

Bug: b/324864439
Change-Id: I80344eb2f2060469d2d69a54dc4519fdd02ab4ea
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340324
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41808}
2024-02-26 11:26:04 +00:00
Danil Chapovalov
4f63ea423f Deprecate VP8Decoder::Create
Migrate remaining usages inside webrtc (all are test only) to CreateVp8Decoder

Bug: webrtc:15791
Change-Id: I6a8317a8761953208ba746ac785fa1606217e6f5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340300
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41792}
2024-02-23 13:31:53 +00:00
Sergey Silkin
74a4038ead Limit max frame size in DAV1D decoder
Bug: chromium:325284120
Change-Id: Iea0aea0a17bb0b1f73b3c1cbd408b7a6cd2b216e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340180
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41776}
2024-02-21 11:05:44 +00:00
Sergey Silkin
2a3db3131d Disable Android specific threading settings in libvpx VP8 encoder
It used up to 3 threads for QVGA on Android before. This change disables Android-specific code path in NumberOfThreads() and uses the generic settings, which configure 1 thread for resolutions <=VGA, instead. The change is guarded by a killswitch.

For reference, frame encode time for VGA 512kbps using 1 thread on Pixel 2 (7 years old device; SD835) is ~5.5ms: https://chromeperf.appspot.com/report?sid=6e80c701ef6ff0d008a299fb122a16f0d2600ddfcd9981d3d75cd722c92b2869

Bug: webrtc:15828, b/316494683
Change-Id: I0e9571ede64c6cb77d529d21ccb0310ccb8bfdaf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337601
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41770}
2024-02-20 13:10:49 +00:00
Sergey Silkin
052bc3af92 Field trial to control SVC frame dropping mode in libvpx VP9 encoder
Example: "WebRTC-LibvpxVp9Encoder-SvcFrameDropConfig/Enabled,layer_drop_mode:1,max_consec_drop:7/"

It is only possible to enable LAYER_DROP (layer_drop_mode=1) for now. All other modes are ignored. Max consecutive frame drops (max_consec_drop) value from the field is always applied if the field trial is enabled.

LAYER_DROP requires flexible mode (is_flexible_mode_=true) which can be enabled by means of WebRTC-Vp9InterLayerPred: https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/media/engine/webrtc_video_engine.cc;l=976

Bug: webrtc:15827, b/320629637
Change-Id: I9c4d4838b11547e608d863198b109cb1485902d6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335041
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41755}
2024-02-16 17:34:52 +00:00
Danil Chapovalov
46364195d3 Propagate webrtc::Environment through MultiplexDecoderAdapter
Bug: webrtc:15791
Change-Id: Ibe8fdc45722409b2cf6608ea6d8da2ea7e3472c2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338621
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41747}
2024-02-15 16:03:55 +00:00
Danil Chapovalov
b158537a4f Allow to propagate field trials into Vp8 Decoder
Bug: webrtc:15791
Change-Id: I0cd279006924c7a4859697b26a2271c3dc63ea6d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337400
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41741}
2024-02-15 10:36:05 +00:00
Sergey Silkin
2bd4129e91 Set scoped field trials in encode/decode test
Since not all codecs read field trials from the environment yet.

Bug: webrtc:14852
Change-Id: Ia2477c41d09dabf91f47c59eb3139d6d6a711548
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339380
Auto-Submit: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41731}
2024-02-14 09:13:58 +00:00
Sergey Silkin
1b5f47f2d3 Set field trials via command line
Also fix an issue with accessing an unset optional.

Bug: webrtc:14852
Change-Id: I45da8c6add87ac562c3c3f3d11c0021244927f8d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337580
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41716}
2024-02-12 10:43:47 +00:00
Danil Chapovalov
5b90b963de Provide Environment for VideoDecoder in video_coding/ tests
Bug: webrtc:15791
Change-Id: I6345f88f895ee6ff89f4c8224c8d2dc495422152
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337980
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41668}
2024-02-05 14:25:26 +00:00
Jeremy Leconte
f19c7caeb5 Fix crash when rolling libaom.
The crash is caused by https://aomedia.googlesource.com/aom.git/+/77cf417565ad2c527d5c351927f11db3764fd93c%5E%21

Example of the test failure:
https://ci.chromium.org/ui/p/webrtc/builders/try/linux_rel/72442/overview

Bug: None
Change-Id: I088bf7e45452cdaa71802802e431119e755eca24
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337320
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41659}
2024-02-02 09:45:05 +00:00
Dan Tan
4860148c51 Add WebRTC-LibaomAv1Encoder-MaxConsecFrameDrop parameter to explicitly limit the maximum consecutive frame drop
Bug: webrtc:15821
Change-Id: Ib8be6827ea57e4e54269b94a0fc9ea81945af09f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337020
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Commit-Queue: Dan Tan <dwtan@google.com>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41648}
2024-01-31 18:35:51 +00:00
Ilya Nikolaevskiy
6adf2243b5 Compute scaling factors for not-explicitly configured layers in VP9 encoder
The division by 2 has been accidentally removed in https://webrtc-review.googlesource.com/c/src/+/76921

The code and comment are out of sync now.

Bug: None
Change-Id: If43a40461878ffe58dd9ed0ab8a6244ad79c4f6b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336283
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Auto-Submit: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41627}
2024-01-29 11:23:21 +00:00
Åsa Persson
1dccfeb395 Set InterLayerPredMode based on scalability mode for VP9.
Bug: webrtc:15673
Change-Id: I7d3cdcda537c85f3be578cb00452e0611759704f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336280
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41621}
2024-01-26 10:40:00 +00:00
Danil Chapovalov
d213dd5517 Pass Environment to VideoDecoders through VideoCodecTester
Bug: webrtc:15791
Change-Id: I002734a17ece1d11b77a261aa8160c4afa1702b5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336241
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41617}
2024-01-26 08:11:19 +00:00
Sergey Silkin
37e9b378fd Use default H264 SDP parameters
We lost H264 [1] in https://webrtc-review.googlesource.com/c/src/+/327260 where we started using QueryCodecSupport which is sensetive to SDP parameters.

Use CBP3.1, packetization_mode=1 (singlecast NALU) as defaults.

[1] https://chromeperf.appspot.com/report?sid=1e12d661147889123ddeea4ef88a87bcdd38cf09cb23c13ee130770be695ac83&start_rev=41064&end_rev=41226

Bug: webrtc:14852, webrtc:15779
Change-Id: I69137ac847ae3a79238abcfe2a76dc2ba097a06d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335081
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41576}
2024-01-19 15:01:12 +00:00
Sergey Silkin
3e623ef57d Respect decoder implementation
This allows using different encoder and decoder implementations in a test. For example, to encode with SW encoder and to decode with HW decoder or vice versa.

Bug: webrtc:14852
Change-Id: Ic100cba2158fb6311b84a54a0831f2a0dcff9270
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335300
Auto-Submit: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41571}
2024-01-19 11:16:00 +00:00
Jeremy Leconte
199fd755bd Run video_codec_perf_tests using the quick mode on Android try bots.
Change-Id: I02678b033815f843e4aee1585ef64c4d9b7e7b14
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334220
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#41535}
2024-01-16 10:07:48 +00:00
Philipp Hancke
de17252e8e Reland "Unify access to SDP codec parameters"
This is a reland of commit 63d03f586b

Original change's description:
> Unify access to SDP codec parameters
>
> which come from the a=fmtp:<pt> lines in the SDP and were used as either
>   std::map<std::string, std:string>
> with three aliases,
>   cricket::CodecParameterMap
>   SdpAudioFormat::Parameters
>   SdpVideoFormat::Parameters
>
> Use webrtc::CodecParameterMap in all places.
>
> BUG=None
>
> Change-Id: If47692bde7347834c349c6539b43309d8770e67b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330420
> Reviewed-by: Florent Castelli <orphis@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#41375}

Bug: None
Change-Id: I5f8f45688df232eb37b12fa3e56a893a1c754e17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331402
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41467}
2024-01-03 12:03:11 +00:00
Philipp Hancke
f698a39eec OpenH264: report error on unsupported pixel format
BUG=webrtc:15713

Change-Id: I32aa14aced59ed8f1a9a3a9b8f70182d704e3354
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330460
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Natalie Silvanovich <natashenka@google.com>
Cr-Commit-Position: refs/heads/main@{#41420}
2023-12-20 08:24:24 +00:00
Mirko Bonadei
6c9c958c69 Revert "Unify access to SDP codec parameters"
This reverts commit 63d03f586b.

Reason for revert: Breaks downstream project (not backwards compatible API change)

Original change's description:
> Unify access to SDP codec parameters
>
> which come from the a=fmtp:<pt> lines in the SDP and were used as either
>   std::map<std::string, std:string>
> with three aliases,
>   cricket::CodecParameterMap
>   SdpAudioFormat::Parameters
>   SdpVideoFormat::Parameters
>
> Use webrtc::CodecParameterMap in all places.
>
> BUG=None
>
> Change-Id: If47692bde7347834c349c6539b43309d8770e67b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330420
> Reviewed-by: Florent Castelli <orphis@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#41375}

Bug: None
Change-Id: I841735d98533d3b66850b9cfcf7ee0a99ddde078
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331400
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#41377}
2023-12-13 16:28:44 +00:00
Philipp Hancke
63d03f586b Unify access to SDP codec parameters
which come from the a=fmtp:<pt> lines in the SDP and were used as either
  std::map<std::string, std:string>
with three aliases,
  cricket::CodecParameterMap
  SdpAudioFormat::Parameters
  SdpVideoFormat::Parameters

Use webrtc::CodecParameterMap in all places.

BUG=None

Change-Id: If47692bde7347834c349c6539b43309d8770e67b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330420
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41375}
2023-12-13 14:22:15 +00:00
Mirko Bonadei
a3d2c58e38 Skip LibaomAv1SvcTest.EncodeAndDecodeAllDecodeTargets/S3T3.
This is temporary while AV1 gets fixed.

Bug: webrtc:15715, b/315476578
Change-Id: I4fdadb97788c934b12b4a3a19dfec1f61a95a3a5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330640
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Marco Paniconi <marpan@google.com>
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41345}
2023-12-09 12:24:51 +00:00
Sergey Silkin
2d86b258e0 Reland "Added an encode/decode test parameterizable via command line"
This is a reland of commit 496893e89e

Original change's description:
> Added an encode/decode test parameterizable via command line
>
> This enables testing different settings without updating code and rebuilding the test binary. Example of command:
>
> video_codec_perf_tests --gtest_also_run_disabled_tests --gtest_filter=*EncodeDecode --encoder=libaom-av1 --decoder=dav1d --scalability_mode=L1T3 --bitrate_kbps=100,200,300 --framerate_fps=30 --write_csv
>
> Also added writing per-frame stats to a CSV. It is more convenient to work with CSV than to parse metrics proto.
>
> Bug: webrtc:14852
> Change-Id: I1b3970f7ffa88c016133197aff585de5bc4e35c6
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327600
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41179}

Bug: webrtc:14852
Change-Id: Iccb9af8bf6a6c37704bc58b6e57238b55761b079
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327781
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41194}
2023-11-20 11:51:43 +00:00
Christoffer Jansson
20724ae1b7 Revert "Added an encode/decode test parameterizable via command line"
This reverts commit 496893e89e.

Reason for revert: Breaks https://ci.chromium.org/ui/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20ios-device/16103/overview

Original change's description:
> Added an encode/decode test parameterizable via command line
>
> This enables testing different settings without updating code and rebuilding the test binary. Example of command:
>
> video_codec_perf_tests --gtest_also_run_disabled_tests --gtest_filter=*EncodeDecode --encoder=libaom-av1 --decoder=dav1d --scalability_mode=L1T3 --bitrate_kbps=100,200,300 --framerate_fps=30 --write_csv
>
> Also added writing per-frame stats to a CSV. It is more convenient to work with CSV than to parse metrics proto.
>
> Bug: webrtc:14852
> Change-Id: I1b3970f7ffa88c016133197aff585de5bc4e35c6
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327600
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41179}

Bug: webrtc:14852
Change-Id: Ifdce738058c3e3fc7c76886939add2813405cae7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327722
Owners-Override: Christoffer Jansson <jansson@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#41183}
2023-11-17 12:53:00 +00:00
Sergey Silkin
496893e89e Added an encode/decode test parameterizable via command line
This enables testing different settings without updating code and rebuilding the test binary. Example of command:

video_codec_perf_tests --gtest_also_run_disabled_tests --gtest_filter=*EncodeDecode --encoder=libaom-av1 --decoder=dav1d --scalability_mode=L1T3 --bitrate_kbps=100,200,300 --framerate_fps=30 --write_csv

Also added writing per-frame stats to a CSV. It is more convenient to work with CSV than to parse metrics proto.

Bug: webrtc:14852
Change-Id: I1b3970f7ffa88c016133197aff585de5bc4e35c6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327600
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41179}
2023-11-17 10:21:51 +00:00
Sergey Silkin
d431156c0e Move codecs handling from test to tester
* Pass codec factories to the video codec tester instead of creating and wrapping codecs into a tester-specific wrappers in video_codec_test.cc. The motivation for this change is to simplify the tests by moving complexity to the tester.

* Merge codec stats and analysis into the tester and move the tester. The merge fixes circular deps issues. Modularization is not strictly needed for testing framework like the video codec tester. It is still possible to unit test underlaying modules with rather small overhead.

* Move the video codec tester from api/ to test/. test/ is accessible from outside of WebRTC which enables reusing the tester in downstream projects.

Test output ~matches before and after this refactoring. There is a small difference that is caused by changes in qpMax: 63 -> 56 (kDefaultVideoMaxQpVpx). 56 is what WebRTC uses by default for VPx/AV1 encoders.

Bug: webrtc:14852
Change-Id: I762707b7144fcff870119ad741ebe7091ea109ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327260
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41144}
2023-11-13 16:48:49 +00:00
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
Byoungchan Lee
11376fb992 Reset H.264 SVC Controller on key frame
Sometimes OpenH264 returns a key frame even though we have not
requested one. However, SVC controller does not know about this
and will not reset its state. Since we are comparing expected tid
from SVC controller with actual tid from OpenH264, and drop frames
if they do not match, that causes a missing frame.

This CL resets the SVC controller state on key frames, ensuring
that it accurately maintains its state and does not drop frames.
Also, changes the message of the error log to be more descriptive.
Now, it will print the expected tid and actual tid.

Bug: webrtc:14877
Change-Id: I6c9e7532b2478773f03e5707bf7a1ca56e4f7b99
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324001
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40972}
2023-10-19 09:51:14 +00:00
Danil Chapovalov
f2443a7971 Replace WebRTC-QuickPerfTest field trial with a flag
This field trial is configured via command line flag, so may use flag system directly, reducing dependency on global field trial string.

Bug: webrtc:7101, webrtc:10335
Change-Id: I1e48e0e3fdc251b73a375c6d7f1a46fa4f8a179b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322624
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40897}
2023-10-10 08:59:10 +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
Erik Språng
d7703d9505 Reland "Add mitigation for very long frame drop gaps with vp8"
This is a reland of commit 0d4b350006

Patchset 1 is the original CL. Patchset 2 contains a small tweak of the target bitrate in the unit test, in order to make in less susceptible to flakiness on runtime environments running a slightly different libvpx.

Original change's description:
> Add mitigation for very long frame drop gaps with vp8
>
> Bug: webrtc:15530
> Change-Id: I11f5e3f31f71301700dbff3fc9285236160bee45
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322320
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Auto-Submit: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40866}

Bug: webrtc:15530
Change-Id: I096b7d952286f7f53852d1ca70aea398b2747784
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322540
Auto-Submit: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40874}
2023-10-05 13:29:23 +00:00
Erik Språng
bada9dd30c Revert "Add mitigation for very long frame drop gaps with vp8"
This reverts commit 0d4b350006.

Reason for revert: Temporary revert to adjust thresholds for internal test

Original change's description:
> Add mitigation for very long frame drop gaps with vp8
>
> Bug: webrtc:15530
> Change-Id: I11f5e3f31f71301700dbff3fc9285236160bee45
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322320
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Auto-Submit: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40866}

Bug: webrtc:15530
Change-Id: I920661835f0e59c0543794222e42b5643017db24
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322443
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40871}
2023-10-05 11:00:47 +00:00
Erik Språng
0d4b350006 Add mitigation for very long frame drop gaps with vp8
Bug: webrtc:15530
Change-Id: I11f5e3f31f71301700dbff3fc9285236160bee45
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322320
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40866}
2023-10-04 14:22:31 +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