Commit graph

92 commits

Author SHA1 Message Date
Danil Chapovalov
4bf4e1753c Provide Environment to construct VideoBitrateAllocator
To allow various VideoBitrateAllocators to use propagated rather than global field trials

Bug: webrtc:42220378
Change-Id: I52816628169a54b18a4405d84fee69b101f92f72
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349920
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42288}
2024-05-13 12:12:01 +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
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
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
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
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
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
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
qwu16
ae82df718c Add codec name H265 to support H265 in WebRTC
Bug: webrtc:13485
Change-Id: I352b15a65867f0d56fc8e9a9e03081bd3258108e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316283
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40773}
2023-09-20 09:25:32 +00:00
Jared Siskin
c018bae807 Format /modules
git ls-files | grep -e  "\(\.h\|\.cc\)$" | grep -e  "^modules/" | xargs clang-format -i ; git cl format
after landing: add to .git-blame-ignore-revs

Bug: webrtc:15082
Change-Id: I2c3cd28740062794f8c10e39d8406aadb9e9a35a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301620
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Jared Siskin <jtsiskin@meta.com>
Cr-Commit-Position: refs/heads/main@{#39901}
2023-04-20 02:02:45 +00:00
Sergey Silkin
1985b5a927 Refactor YUV frame reader
Purposes of this refactoring:
1. Add functionality for reading a specified frame.
2. Change resolution and frame rate on per-frame basis.

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

Bug: b/261160916
Change-Id: I6d60e62dbc3913c43b5c1b491690f5cb4a8632dd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285483
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38829}
2022-12-06 16:23:48 +00:00
Jonas Oreland
6c2dae21e9 Move VideoEncoderConfig from api/ into video/config
This cl move VideoEncoderConfig from api/ to video/config.

VideoStreamEncoderInterface and VideoStreamEncoderObserver
are moved as collateral.

brandt@ think that the reason these were in api/ in the
first place had to downstream project.

Functionality wise, this is a NOP, but it makes it easier
to modify the encoder (config).

Bug: webrtc:14451
Change-Id: I2610d815aeb186298498e7102cac773ecac8cd36
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/277002
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38242}
2022-09-29 09:44:43 +00:00
Jonas Oreland
1262eb5ebc Move EncoderStreamFactory into own file
This cl/ is a NOP refactoring,
moving the EncoderStreamFactory from within webrtc_video_engine.cc
into own file in video/. simulcast.cc is collateral.

Bug: webrtc:14451
Change-Id: Ia69b9241d8cd8a12be6628d887701f2e244c07cc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276861
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38224}
2022-09-27 17:29:11 +00:00
Artem Titov
dab4cea30d Migrate VideoCodecTestFixture on new perf metrics logging API
Bug: b/246095034
Change-Id: I312f2643e4c84cdfa3e8fef7078a2decbbfef978
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276629
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38217}
2022-09-27 08:31:12 +00:00
Danil Chapovalov
e519f38eaa Remove rtc::Location from SendTask test helper
that rtc::Location parameter was used only as extra information for the
RTC_CHECKs directly in the function, thus call stack of the crash should
provide all the information about the caller.

Bug: webrtc:11318
Change-Id: Iec6dd2c5de547f3e1601647a614be7ce57a55734
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270920
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37748}
2022-08-11 12:55:32 +00:00
philipel
f012bfaf96 Use Video{Encoder, Decoder}FactoryTemplate instead of Internal{Encoder, Decoder}Factory.
Bug: webrtc:13573
Change-Id: Id0e46a9b6053dedae3cbf0e5581768868900630b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269247
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37596}
2022-07-22 12:07:25 +00:00
Niels Möller
c0a9f35248 Define SimulcastStream as an alias for SpatialLayer
Step one in making it a separate type, that will be done as a
followup, after downstream code is updated to use the new name.

Bug: webrtc:11607
Change-Id: I6fa664a0729b1cfd71b7f02b6441880beee0e741
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262806
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36946}
2022-05-20 13:12:21 +00:00
Niels Möller
807328fec7 Move frame drop config to VideoCodec and VideoEncoderConfig.
Intend to delete corresponding codec-specific settings in a followup.

Bug: webrtc:6883
Change-Id: I78ab07729a5aee1055f80d39d8f7289beb6721e1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262244
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36882}
2022-05-13 13:40:14 +00:00
“Michael
3147e29c4e Refactor encoder-complexity param in VideoCodec w/backward compatibility
Move complexity parameter to the main VideoCodec class to enable
additional video codecs to use the parameter without creating a new
codec-specific structure.

Bug: webrtc:13694
Change-Id: Icb7cf640b178875d799f39ade8b5084e3222bb1c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251921
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Michael Horowitz <mhoro@google.com>
Cr-Commit-Position: refs/heads/main@{#36040}
2022-02-21 19:40:44 +00:00
Sergey Silkin
984cf9b837 Explicitly set encoder and decoder format in codec tests.
This allows to differentiate and test codecs of the same type but
different implementations/settings.

Bug: none
Change-Id: I74f799b36411e63387513133ffc19a7f0c45d550
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/238165
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35396}
2021-11-22 08:18:25 +00:00
Artem Titov
d3251968d1 Prepare to rename RTC_NOTREACHED to RTC_DCHECK_NOTREACHED
Add implementation of RTC_DCHECK_NOTREACHED equal to the RTC_NOTREACHED.
The new macros will replace the old one when old one's usage will be
removed. The idea of the renaming to provide a clear signal that this
is debug build only macros and will be stripped in the production build.

Bug: webrtc:9065
Change-Id: I4c35d8b03e74a4b3fd1ae75dba2f9c05643101db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237802
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35348}
2021-11-15 21:44:59 +00:00
Ying Wang
d7dd0aa9ee Move sendtask after decoded frame writer is initialized.
Bug: webrtc:13293
Change-Id: Ic71f92a5204715480e207f908f70ffff63e31279
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235580
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35235}
2021-10-19 11:32:33 +00:00
Artem Titov
dcd7fc7ea8 Use backticks not vertical bars to denote variables in comments for /modules/video_coding
Bug: webrtc:12338
Change-Id: Ia8a9adea291d594e4f59a6a1203a7bfb0758adac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227165
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34684}
2021-08-09 15:26:22 +00:00
Sergey Silkin
d6afbead2d Correctly set number of reference buffers in H264 encoder
iNumRefFrame specifies total number of reference buffers to allocate.
For N temporal layers we need at least (N - 1) buffers to store last
encoded frames of all reference temporal layers.

There is no API in OpenH254 encoder to specify exact set of references
to be used to prediction of a given frame. Encoder can theoretically
use all available references.

Note that there is logic in OpenH264 which overrides iNumRefFrame to
max(iNumRefFrame, N - 1): https://source.chromium.org/chromium/chromium/src/+/main:third_party/openh264/src/codec/encoder/core/src/au_set.cpp;drc=8e90a2775c5b9448324fe8fef11d177cb65f36cc;l=122.
I.e., this change has no real effect. It only makes setup more clear.

Bug: none
Change-Id: If4b4970007e1cc55d8f052ea05213ab2e89a878f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225480
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34445}
2021-07-09 13:49:41 +00:00
Johannes Kron
c3fcee7c3a Move h264_profile_level_id and vp9_profile to api/video_codecs
This is a refactor to simplify a follow-up CL of adding
SdpVideoFormat::IsSameCodec.

The original files media/base/h264_profile_level_id.* and
media/base/vp9_profile.h must be kept until downstream projects
stop using them.

Bug: chroimium:1187565
Change-Id: Ib39eca095a3d61939a914d9bffaf4b891ddd222f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215236
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33782}
2021-04-20 09:42:05 +00:00
Sergey Silkin
db0b4a8935 Do not crash if codec is not available
Check if codec was successfully created and exit from RunTest if not
before creating VideoProcessor.

Bug: none
Change-Id: Ia6d7171650dbc9824fb78f4a8e2851f755cfd63b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/209362
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33372}
2021-03-03 13:56:17 +00:00
Erik Språng
c12f625938 Adds VideoDecoder::GetDecoderInfo()
This adds a new way to poll decoder metadata.
A default implementation still delegates to the old methods.
Root call site is updates to not use the olds methods.

Follow-ups will dismantle usage of the olds methods in wrappers.

Bug: webrtc:12271
Change-Id: Id0fa6863c96ff9e3b849da452d6540e7c5da4512
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196520
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32976}
2021-01-14 13:33:22 +00:00
Erik Språng
ebe5acb27a VideoCodecTextFixture and YuvFrameReader improvements.
Adds ability to specify desired frame size separate from actual clip
resolution, as well as clip and desired fps.
This allows e.g. reading an HD clip but running benchmarks in VGA, and
to specify e.g. 60fps for the clip but 30for encoding where frame
dropping kicks in so that motion is actually correct rather than just
plaing the clip slowly.

Bug: webrtc:12229
Change-Id: I4ad4fcc335611a449dc2723ffafbec6731e89f55
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195324
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32839}
2020-12-15 23:18:06 +00:00
Sergey Silkin
b72cc6d670 Analyze quality of dropped frames in VideoProcessor.
Calculate quality metrics for dropped frames by comparing original
frame against last decoded one.

This feature makes comparison of encoders which do/don't drop frames
more fair.

The feature is controlled by analyze_quality_of_dropped_frames flag
and is disabled by default.

Bug: none
Change-Id: Ifab8df92d0b76e743ff3193c05d7c8dbd14921c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190660
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32518}
2020-10-29 08:23:49 +00:00
Erik Språng
ceb44959ca Reland: Wires up WebrtcKeyValueBasedConfig in media engines.
This is a reland of
https://webrtc-review.googlesource.com/c/src/+/174261

Patchset 1 contains the old cl (plus a merge conflict fix).
Later patchets are bufixes: A PeerConnection can be created without a
Call instance (in the case of DataChannel only), so we can't always
use that to fetch the current trials.

Old CL descritpion:

This replaces field_trial:: -based functions from system_wrappers.
Field trials are still used as fallback, but injectable trials are now
possible.

// Since re-land is otherwise unchanged, setting previous reviewers as TBR
TBR=kthelgason@webrtc.org,mbonadei@webrtc.org,stefan@webrtc.org,srte@webrtc.org

Bug: webrtc:11926
Change-Id: I57a9e8c3454f226f77fb93215bcac83da65034b0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185003
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32163}
2020-09-22 16:08:22 +00:00
Artem Titov
5956a17ed6 Revert "Wires up WebrtcKeyValueBasedConfig in media engines."
This reverts commit 591b2ab82e.

Reason for revert: Breaks downstream project

Original change's description:
> Wires up WebrtcKeyValueBasedConfig in media engines.
> 
> This replaces field_trial:: -based functions from system_wrappers.
> Field trials are still used as fallback, but injectable trials are now
> possible.
> 
> Bug: webrtc:11926
> Change-Id: I70f28c4fbabf6d9e55052342000e38612b46682c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174261
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32129}

TBR=mbonadei@webrtc.org,kthelgason@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,perkj@webrtc.org

Change-Id: I3e169149a8b787aa6366bb357abb71794534c63a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11926
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184507
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32132}
2020-09-17 20:17:38 +00:00
Erik Språng
591b2ab82e Wires up WebrtcKeyValueBasedConfig in media engines.
This replaces field_trial:: -based functions from system_wrappers.
Field trials are still used as fallback, but injectable trials are now
possible.

Bug: webrtc:11926
Change-Id: I70f28c4fbabf6d9e55052342000e38612b46682c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174261
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32129}
2020-09-17 16:24:10 +00:00
Niels Möller
5b69aa6613 Move definition of SpatialLayer to api/video_codecs/spatial_layer.h
Bug: webrtc:7660
Change-Id: I54009ebc5f65b6875a8c079ab5264e0c5ce9f654
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181500
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31942}
2020-08-17 09:45:19 +00:00
Jerome Jiang
7f7fb830ba Reland "Add av1 test running real video clips."
This reverts commit 6958d2c6f0.

Disable the test on iOS.

Bug: None
Change-Id: Ie42fada10a92bd4a802c6c79caeb4965410ddf6a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176461
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Jerome Jiang <jianj@google.com>
Cr-Commit-Position: refs/heads/master@{#31437}
2020-06-04 06:32:46 +00:00
Ying Wang
6958d2c6f0 Revert "Add av1 test running real video clips."
This reverts commit 3a2be87b80.

Reason for revert: break internal test

Original change's description:
> Add av1 test running real video clips.
> 
> Bug: None
> Change-Id: I93bb8b3bf15d607d061aa74ad9e34609ffb2ef0a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175821
> Commit-Queue: Jerome Jiang <jianj@google.com>
> Commit-Queue: Stefan Holmer <holmer@google.com>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31401}

TBR=danilchap@webrtc.org,jianj@google.com,stefan@webrtc.org,holmer@google.com,marpan@webrtc.org

Change-Id: I2689ab4f7f26af6e26a4a188a2aa0b4f90a1a92f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176374
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31405}
2020-06-02 10:40:38 +00:00
Jerome Jiang
3a2be87b80 Add av1 test running real video clips.
Bug: None
Change-Id: I93bb8b3bf15d607d061aa74ad9e34609ffb2ef0a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175821
Commit-Queue: Jerome Jiang <jianj@google.com>
Commit-Queue: Stefan Holmer <holmer@google.com>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31401}
2020-06-02 07:36:20 +00:00
Ilya Nikolaevskiy
39fb817efd [Video, Svc] Remove inactive spatial layers in codec initializer
This is more logical way to remove inactive lower layers.
Current way is to notify the encoder that the layer is inactive,
then renumber layers at the packatization level.

This Cl will allow to simplify libvpx vp9 encoder, svcRateAllocator and
vp9 packetizer.

Bug: webrtc:11319
Change-Id: Idf0bb30b729f5ecc97e31454b32934546b681aa2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173182
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31058}
2020-04-14 09:37:44 +00:00
Ilya Nikolaevskiy
03d909634b Ensure that the first active layer isn't disabled by too low input resolution
If e.g. CPU adaptation reduces input video size too much, video pipeline would
reduce the number of used simulcast streams/spatial layers. This may result in
disabled video if some streams are disabled by Rtp encoding parameters API.

Bug: webrtc:11319
Change-Id: Id7f157255599dcb6f494129b83477cda4bea982a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168480
Reviewed-by: Evan Shrubsole <eshr@google.com>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30498}
2020-02-11 14:57:51 +00:00
Sergey Silkin
df8fd28d0b Add output_path to VideoCodecTestFixture::Config.
This lets test to set output path explicitly.

Bug: none
Change-Id: I756484775f4c7f44cd1bb904c89d9215ffa48fe1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158798
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29702}
2019-11-06 08:48:52 +00:00
Danil Chapovalov
eb90e6ffe3 Merge SendTask implementation for SingleThreadedTaskQueueForTesting and TaskQueueForTest
That allows to use SingleThreadedTaskQueueForTesting via TaskQueueBase interface
but still have access to test-only SendTask function.

Bug: webrtc:10933
Change-Id: I3cc397e55ea2f1ed9e5d885d6a2ccda412beb826
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156002
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29480}
2019-10-15 09:17:36 +00:00
Mirko Bonadei
317a1f09ed Use std::make_unique instead of absl::make_unique.
WebRTC is now using C++14 so there is no need to use the Abseil version
of std::make_unique.

This CL has been created with the following steps:

git grep -l absl::make_unique | sort | uniq > /tmp/make_unique.txt
git grep -l absl::WrapUnique | sort | uniq > /tmp/wrap_unique.txt
git grep -l "#include <memory>" | sort | uniq > /tmp/memory.txt

diff --new-line-format="" --unchanged-line-format="" \
  /tmp/make_unique.txt /tmp/wrap_unique.txt | sort | \
  uniq > /tmp/only_make_unique.txt
diff --new-line-format="" --unchanged-line-format="" \
  /tmp/only_make_unique.txt /tmp/memory.txt | \
  xargs grep -l "absl/memory" > /tmp/add-memory.txt

git grep -l "\babsl::make_unique\b" | \
  xargs sed -i "s/\babsl::make_unique\b/std::make_unique/g"

git checkout PRESUBMIT.py abseil-in-webrtc.md

cat /tmp/add-memory.txt | \
  xargs sed -i \
  's/#include "absl\/memory\/memory.h"/#include <memory>/g'
git cl format
# Manual fix order of the new inserted #include <memory>

cat /tmp/only_make_unique | xargs grep -l "#include <memory>" | \
  xargs sed -i '/#include "absl\/memory\/memory.h"/d'

git ls-files | grep BUILD.gn | \
  xargs sed -i '/\/\/third_party\/abseil-cpp\/absl\/memory/d'

python tools_webrtc/gn_check_autofix.py \
  -m tryserver.webrtc -b linux_rel

# Repead the gn_check_autofix step for other platforms

git ls-files | grep BUILD.gn | \
  xargs sed -i 's/absl\/memory:memory/absl\/memory/g'
git cl format

Bug: webrtc:10945
Change-Id: I3fe28ea80f4dd3ba3cf28effd151d5e1f19aff89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153221
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29209}
2019-09-17 15:47:29 +00:00
Marin Kišić
9a91161b9f Fixing way of printing logs because RTC_LOG() on Android has limit on printing 1024-60 characters in line.
Bug: webrtc:10885
Change-Id: I42c365555b682f3352644330167e2a4331ba0527
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149180
Commit-Queue: Marin Kišić <kisicmar@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29151}
2019-09-11 10:44:07 +00:00
Sergey Silkin
44cec0b5bd Handle non-integer frame rates in video codec tests.
Encoder API accepts non-integer frame rate since
https://webrtc-review.googlesource.com/c/src/+/131949.

Bug: webrtc:10812
Change-Id: I5fc9c5dfac4b182b84a735218a2946a95cc2b93c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143483
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28548}
2019-07-12 07:37:43 +00:00
Florent Castelli
668ce0c7fa Remove trial WebRTC-SimulcastMaxLayers and make its behavior default
Also cleans up the unused parameters from GetSimulcastConfig.

Bug: webrtc:8785, webrtc:8486
Change-Id: I1aea8f6c9e6590211ec5ee5cafc0ec2a2100d68f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144627
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28496}
2019-07-05 14:55:46 +00:00
Rasmus Brandt
315de596b0 Switch to RTC_LOG(LS_INFO) for non-perf VideoCodecTest text output.
This allows picking up the output in Android tests, where stdout/stderr
is lost but RTC_LOGs are picked up by the org.webrtc.Logging utility.

Tested: Downstream Android tests.
Bug: webrtc:10349
Change-Id: I1379f4303640dbc9621c64d9c88cf61bc8447ab6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132704
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27616}
2019-04-15 12:08:15 +00:00
Rasmus Brandt
70c961f965 Delete unused members of VideoCodecH264.
profile-level-id for H.264 comes in through the SdpVideoFormat,
rather than through these members.

Bug: None
Change-Id: I9c4ea8873346ca16174aecf5f90a649cbaf913dd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132545
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27571}
2019-04-11 15:32:48 +00:00
Rasmus Brandt
fd720b2406 Switch to SendTask instead of manually waiting for event.
Bug: webrtc:10349
Change-Id: I128856d2baf221d67e957ce0614b075ecef3c5fc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131140
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27439}
2019-04-03 12:03:14 +00:00
Niels Möller
9d8eaac4ee Delete unneeded direct includes of common_types.h
And delete corresponding dependencies on :webrtc_common. After this
change, common_types.h is included directly only from code in the
following directories:

api/
api/video/
api/video_codecs/
common_video/libyuv/include/
media/base/
modules/remote_bitrate_estimator/
modules/rtp_rtcp/source/
modules/video_coding/codecs/vp9/

There remains plenty of indirect dependencies on the types declared in
common_types.h, but the fewer direct dependencies should make it
easier to find the proper place for each type.

Bug: webrtc:5876
Change-Id: I93e8f214025ecb613c19fdec2015bd3f96c59aae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130501
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27376}
2019-04-01 07:18:13 +00:00
Rasmus Brandt
001c782ff2 Save encoded ivf files separately for different TLs.
This allows offline visualization of the different TL.

For now, there is no need to do the same for the decoded frames.

Bug: webrtc:10349
Tested: 1) ninja -C out/Debug; and out/Debug/modules_tests --gtest_filter="*MultiresVP8*:*SvcVP9*". 2) Downstream tests.
Change-Id: Iaf5ab19ee681488706d8777a5adba78efd5cc1ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128861
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27240}
2019-03-22 13:15:54 +00:00