Commit graph

1872 commits

Author SHA1 Message Date
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
Danil Chapovalov
61b1f53a4c Extend test::FunctionVideoDecoderFactory to propagate Environment
To reduce number calls to the CreateVideoDecoder

Bug: webrtc:15791
Change-Id: I5d6ecc2e5e68165d4e012b3ad7edb6eaa40e1913
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336420
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41706}
2024-02-09 10:14:05 +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
philipel
d257cb7333 Remove keyframe tracking from NackRequester.
Tracking keyframe packets is a useless optimization that kicked in when the nack list is full (1000 packets).

Bug: none
Change-Id: I134ecb4d51131718e5bb8775847fbde18f262ef9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334645
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41547}
2024-01-17 14:14:59 +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
Danil Chapovalov
1d6bf3156b Use propagated instead of global field trials in FecControllerDefault
Bug: webrtc:10335
Change-Id: Ia559ae2655b39e7093cfdb9ed669f3463ef90054
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333842
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41483}
2024-01-09 12:26:54 +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
Qiu Jianlin
ddf6084096 Apply QpParser for H.265 streams.
Video stream encoder now parses Qp for H.265 streams as well.

Bug: webrtc:13485
Change-Id: I0db4e0e34e70d189f8e99b4b182fd3ea14b8c734
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330883
Commit-Queue: Jianlin Qiu <jianlin.qiu@intel.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41355}
2023-12-11 22:02:26 +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
ee46340054 Move and extend frame decode failure logging
Move logging of decode failure from VCMGenericDecoder to VideoReceiveStream2 where remote SSRC is always known. Log frame details such as size and resolution which help to identify this frame in bitstream dump.

Bug: b/309132190
Change-Id: Ibe50799e448ffdc19f9857cc1625cfde0d7aa7a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328821
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41276}
2023-11-29 13:50:18 +00:00