Commit graph

1891 commits

Author SHA1 Message Date
Evan Shrubsole
5bfcc873d9 Add event scope to all TRACE_EVENT_INSTANTs
These are required by the Perfetto API and the missing argument prevents
the use of Perfetto.

Bug: webrtc:15917
Change-Id: Ie40c0344dc9d8cd40f7c751b133d150b975a33c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347702
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/main@{#42147}
2024-04-23 09:56:33 +00:00
Ilya Nikolaevskiy
4bad933233 Remove Vp9VariableFramerateScreenshare experiment
Bug: webrtc:10310
Change-Id: Ibd31e111bccbbc61d9f3da63bfdf54448820fb80
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347661
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42109}
2024-04-18 09:01:48 +00:00
Danil Chapovalov
93453f5b19 Delete field trial WebRTC-UseShortVP8TL3Pattern as unused
Bug: webrtc:11503
Change-Id: I38cce7811fc2aa6db9d5bbd40a2c6b586fe30a77
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347660
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42099}
2024-04-17 14:00:21 +00:00
Ilya Nikolaevskiy
39760a1c87 Remove Vp8VariableFramerateScreenshare experiemnt
Bug: webrtc:10310
Change-Id: I5d7e7bb3e303bc5d3f913daf9016051731ce2157
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347641
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42094}
2024-04-17 11:17:21 +00:00
Danil Chapovalov
366a1bc709 Add factory function for legacy VideoCoding that takes Environment
That forces external field trials, thus VideoCoding will be able to remove dependency on the global field trials string through FieldTrialBasedConfig class.

Bug: webrtc:10335
Change-Id: I6d22a7d20a4433801a0086b0863cda78e91f4f60
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347646
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42092}
2024-04-17 10:53:25 +00:00
Danil Chapovalov
de7e4ad1b1 Delete expired field trial WebRTC-VP8-CpuSpeed-Arm
Bug: webrtc:11503
Change-Id: I47d40949443047e58bb4a95bcb8b922eb2cc1c61
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347644
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42088}
2024-04-16 15:46:33 +00:00
Danil Chapovalov
a5f895a366 Delete field trial WebRTC-UseShortVP8TL2Pattern as unused
Bug: webrtc:9477, webrtc:11503
Change-Id: I65551a00c394aa39b0d30ecd343616e8142d1df1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347522
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42082}
2024-04-16 10:38:37 +00:00
Danil Chapovalov
73c8101fcb Require webrtc::Environment to create VP8 encoder
Bug: webrtc:15860
Change-Id: I5d2632127e8a701e8cb0fbf3f271f80e3102dbe0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/346860
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42067}
2024-04-15 14:48:24 +00:00
Danil Chapovalov
79b9c7e889 Delete support for custom VP8 frame buffer controller as unused
Bug: None
Change-Id: Ie7970eeb25f87cd0621aab0c076867a9d631fb06
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/346500
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42047}
2024-04-12 08:28:23 +00:00
Wan-Teh Chang
ef16abac3e RTC_CHECK frame buffer has expected width & height
The width and height of mapped_buffer must match the d_w and d_h members
of frame_to_encode_, which is passed to aom_codec_encode().

Bug: b:330482827
Change-Id: I85d8c82133768685565f165eafc893c42dc40b12
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345807
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Wan-Teh Chang <wtc@google.com>
Cr-Commit-Position: refs/heads/main@{#42036}
2024-04-10 23:04:33 +00:00
Danil Chapovalov
19f1297f7f Propagate field trials for WebRTC-Video-MinVideoBitrate
Instead of relying on the global field trial string

Bug: webrtc:10335
Change-Id: I491be089ffc725fd28483edf10eae4ae5d17d651
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/346263
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42021}
2024-04-09 10:57:41 +00:00
Evan Shrubsole
de5a74a35b Replace switches in scalability mode utility functions
Instead, use an array indexed on the scalability mode. This is a
follow-up on https://webrtc-review.googlesource.com/c/src/+/344760.

Bug: webrtc:15892
Change-Id: I8e820d758e1838d65ae771b502c7c27a89790026
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345922
Commit-Queue: Evan Shrubsole <eshr@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42013}
2024-04-08 09:15:21 +00:00
Johannes Kron
96e758c117 Use simple SdpVideoFormat for AV1X in videocodec_test_fixture
This CL partly restores the changes that were introduced in
https://webrtc-review.googlesource.com/c/src/+/344681

The predefined SdpVideoFormat for AV1 causes some backwards
compatibility issues with downstream projects that are using
the preliminary codec name AV1X.

Bug: b/333007070
Change-Id: I2d4df241d47b399b0012e6095dd6c2445e60e2c1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345941
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42011}
2024-04-08 08:24:56 +00:00
Danil Chapovalov
604b4db346 Require webrtc::Environment to create AV1 Encoder
Bug: webrtc:15860
Change-Id: Ic9bf907a7112c786ef01f8b3209caf55a272bac3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345742
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42008}
2024-04-05 14:30:33 +00:00
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
Jianjun Zhu
d97b6499c3 H26xPacketBuffer handles out of band H.264 parameter sets.
This CL updates H26xPacketBuffer to store and prepend SPS and PPS for
H.264 bitstreams when IDR only keyframe is allowed.

Bug: webrtc:13485
Change-Id: Ic1edc623dff568d54d3ce29b42dd8eab3312f5cb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342225
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41986}
2024-04-03 09:34:47 +00:00
Sergey Silkin
db36884e76 Reland "Mark frames with inter_layer_predicted=true as delta frames"
This is a reland of commit 7ae48c452a with  updated RtpVp9RefFinder

RtpVp9RefFinder relied on the fact that frames with (inter_pic_predicted=true && inter_layer_predicted=true) were marked as keyframes. Since this is not the case anymore, the related code paths in RtpVp9RefFinder have been deleted.

Calculation of gof_info_[] index for non-keyframes has been updated to account for that fact it is now possible to received multiple T0 frames belonging to the same temporal unit (we don't need to do "unwrapped_tl0 - 1" in this case).

Original change's description:
> Mark frames with inter_layer_predicted=true as delta frames
>
> As it is currently implemented, the VP9 depacketizer decides packet's frame type based on p_bit ("Inter-picture predicted layer frame"). p_bit is set to 0 for upper spatial layer frames of keyframe since they do not have temporal refs. This results in marking packets of upper spatial layer frames, and, eventually these frames, of SVC keyframes as "keyframe" while they are in fact delta frames.
>
> Normally spatial layer frames are merged into a superframe and the superframe is passed to decoder. But passing individual layers to a single decoder instance is a valid scenario too and is used in downstream projects. In this case, an upper layer frame marked as keyframe may cause decoder reset [2] and break decoding.
>
> This CL changes frame type decision logic in the VP9 depacketizer such that only packets with both P and D (inter-layer predicted) bits unset are considered as keyframe packets.
>
> When spatial layer frames are merged into a superframe in CombineAndDeleteFrames [1], frame type of the superframe is inferred from the lowest spatial layer frame.
>
> [1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/modules/video_coding/frame_helpers.cc;l=53
>
> [2] https://source.corp.google.com/piper///depot/google3/third_party/webrtc/files/stable/webrtc/modules/video_coding/codecs/vp9/libvpx_vp9_decoder.cc;l=209
>
> Bug: webrtc:15827
> Change-Id: Idc3445636f0eae0192dac998876fedec48628560
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343342
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41939}

Bug: webrtc:15827
Change-Id: Ic69b94989919cf6d353bceea85d0eba63bc500ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/344144
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41985}
2024-04-02 18:59:58 +00:00
Danil Chapovalov
358d674834 Cleanup RttMult experiment as launched
Bug: webrtc:9670
Change-Id: I252db24faf3d668bf24b8d372454003b553cc8d9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343767
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41983}
2024-04-02 08:22:55 +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
philipel
2f3b75d30d Reset prev_unwrapped_timestamp_ in TimestampExtrapolator::Reset
Bug: b/325916306
Change-Id: I7c52ed45d02c8e602670f5e8e345543fed4523f3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342860
Reviewed-by: Stefan Holmer <holmer@google.com>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41897}
2024-03-13 13:19:49 +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
Harald Alvestrand
afaae4e38a Remove remaining .cc files from rtc_media_base
Also remove all dependencies on rtc_media_base except for a few
that are suspected of being linker directives.

Bug: webrtc:14775
Change-Id: Ic0daf88b5422047d3ed7079ee6af9e689853310c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341461
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41886}
2024-03-12 14:09:38 +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
Danil Chapovalov
c3d937b3e4 In RtpFrameReferenceFinder discard frames with too large spatial id
Bug: chromium:41495253
Change-Id: I681f64edfcba319ab9479a2ad10987452cf9b6d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341265
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41829}
2024-02-27 21:44:37 +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
Jianjun Zhu
7e0bd7aaaf Reland "Add HEVC support for h264_packet_buffer."
This is a reland of commit a2655449ee

This CL guards H265 header behind RTC_ENABLE_H265.

Original change's description:
> Add HEVC support for h264_packet_buffer.
>
> Renamed to h26x_packet_buffer as it also supports HEVC now. For HEVC,
> start code is added by depacktizer, and remote endpoint must send
> sequence and picture information in-band.
>
> Co-authored-by: Qiujiao Wu <qiujiao.wu@intel.com>
>
> Bug: webrtc:13485
> Change-Id: I321cb223357d8d15da95cec80ec0c3a43c26734e
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333863
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41739}

Bug: webrtc:13485
Change-Id: I478e0ab88adcef34100670a90b12251ab3c9b623
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339822
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41748}
2024-02-15 16:38:27 +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
Mirko Bonadei
611f21d0d4 Revert "Add HEVC support for h264_packet_buffer."
This reverts commit a2655449ee.

Reason for revert: H265 tests must be hidden behind RTC_ENABLE_H265.

Original change's description:
> Add HEVC support for h264_packet_buffer.
>
> Renamed to h26x_packet_buffer as it also supports HEVC now. For HEVC,
> start code is added by depacktizer, and remote endpoint must send
> sequence and picture information in-band.
>
> Co-authored-by: Qiujiao Wu <qiujiao.wu@intel.com>
>
> Bug: webrtc:13485
> Change-Id: I321cb223357d8d15da95cec80ec0c3a43c26734e
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333863
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41739}

Bug: webrtc:13485
Change-Id: I64660d73ef0d790b25622ce882aab3db63facf26
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339861
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41742}
2024-02-15 10:55:33 +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
Jianjun Zhu
a2655449ee Add HEVC support for h264_packet_buffer.
Renamed to h26x_packet_buffer as it also supports HEVC now. For HEVC,
start code is added by depacktizer, and remote endpoint must send
sequence and picture information in-band.

Co-authored-by: Qiujiao Wu <qiujiao.wu@intel.com>

Bug: webrtc:13485
Change-Id: I321cb223357d8d15da95cec80ec0c3a43c26734e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333863
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41739}
2024-02-15 09:54:06 +00:00
henrika
414c94290a Reland "Extends WebRTC logs for software encoder fallback"
This is a reland of commit 050ffefd85

Original change's description:
> Extends WebRTC logs for software encoder fallback
>
> This CL extends logging related to HW->SW fallbacks on the encoder
> side in WebRTC. The goal is to make it easier to track down the
> different steps taken when setting up the video encoder and why/when
> HW encoding fails.
>
> Current logs are added on several lines which makes regexp searching
> difficult. This CL adds all related information on one line instead.
>
> Three new search tags are also added VSE (VideoStreamEncoder), VESFW
> (VideoEncoderSoftwareFallbackWrapper) and SEA (SimulcastEncoderAdapter). The idea is to allow searching for the tags to see correlated logs.
>
> It has been verified that these added logs also show up in WebRTC
> logs in Meet.
>
> Logs from the GPU process are not included due to the sandboxed
> nature which makes it much more complex to add to the native
> WebRTC log. I think that these simple logs will provide value as is.
>
> Example: https://gist.github.com/henrik-and/41946f7f0b10774241bd14d7687f770b
>
> Bug: b/322132132
> Change-Id: Iec58c9741a9dd6bab3236a88e9a6e45440f5d980
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339260
> Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41733}

NOTRY=true

Bug: b/322132132
Change-Id: I25dd34b9ba59ea8502e47b4c89cd111430636e08
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339680
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41736}
2024-02-14 17:15:29 +00:00
Mirko Bonadei
23c32da48a Revert "Extends WebRTC logs for software encoder fallback"
This reverts commit 050ffefd85.

Reason for revert: Breaks downstream project.

Original change's description:
> Extends WebRTC logs for software encoder fallback
>
> This CL extends logging related to HW->SW fallbacks on the encoder
> side in WebRTC. The goal is to make it easier to track down the
> different steps taken when setting up the video encoder and why/when
> HW encoding fails.
>
> Current logs are added on several lines which makes regexp searching
> difficult. This CL adds all related information on one line instead.
>
> Three new search tags are also added VSE (VideoStreamEncoder), VESFW
> (VideoEncoderSoftwareFallbackWrapper) and SEA (SimulcastEncoderAdapter). The idea is to allow searching for the tags to see correlated logs.
>
> It has been verified that these added logs also show up in WebRTC
> logs in Meet.
>
> Logs from the GPU process are not included due to the sandboxed
> nature which makes it much more complex to add to the native
> WebRTC log. I think that these simple logs will provide value as is.
>
> Example: https://gist.github.com/henrik-and/41946f7f0b10774241bd14d7687f770b
>
> Bug: b/322132132
> Change-Id: Iec58c9741a9dd6bab3236a88e9a6e45440f5d980
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339260
> Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41733}

Bug: b/322132132
Change-Id: I24d0a4e71a43ac192485f1af208563a51d919865
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339661
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41735}
2024-02-14 13:45:39 +00:00
henrika
050ffefd85 Extends WebRTC logs for software encoder fallback
This CL extends logging related to HW->SW fallbacks on the encoder
side in WebRTC. The goal is to make it easier to track down the
different steps taken when setting up the video encoder and why/when
HW encoding fails.

Current logs are added on several lines which makes regexp searching
difficult. This CL adds all related information on one line instead.

Three new search tags are also added VSE (VideoStreamEncoder), VESFW
(VideoEncoderSoftwareFallbackWrapper) and SEA (SimulcastEncoderAdapter). The idea is to allow searching for the tags to see correlated logs.

It has been verified that these added logs also show up in WebRTC
logs in Meet.

Logs from the GPU process are not included due to the sandboxed
nature which makes it much more complex to add to the native
WebRTC log. I think that these simple logs will provide value as is.

Example: https://gist.github.com/henrik-and/41946f7f0b10774241bd14d7687f770b

Bug: b/322132132
Change-Id: Iec58c9741a9dd6bab3236a88e9a6e45440f5d980
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339260
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41733}
2024-02-14 12:29:55 +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