Commit graph

1203 commits

Author SHA1 Message Date
Niels Möller
f2969fa868 Delete the non-const version of the EncodedImage::data() method.
Bug: webrtc:9378
Change-Id: I84ace3ca6a2eb4d0f7c3d4e62f815d77df581bfa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185122
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32197}
2020-09-25 12:14:50 +00:00
Niels Möller
d60e32a953 Demote method EncodedImage::capacity() to private.
Bug: webrtc:9378
Change-Id: I83be267334fc778aff4eb2ad128d3ed693f755ff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185007
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32177}
2020-09-23 13:53:31 +00:00
Ilya Nikolaevskiy
a945cdadff Make VP9 correctly accept middle-layer singlecast
Unfortunate typo and weak tests made it so if only a middle spatial layer
is active, vp9 encoder would be configured to send two top layers.

Bug: webrtc:11319
Change-Id: I460c245044f60ea7e0127c0e4134d0edab85f4f3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185043
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32164}
2020-09-22 16:09:53 +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
Åsa Persson
ceab7547f0 Make LibvpxVp8Encoder::GetCpuSpeed() to always read from CpuSpeedExperiment for arm.
CpuSpeedExperiment: Add option to have a separate config for cores below a configurable threshold.

Bug: none
Change-Id: I51562979f3a89a949d014a1ee6fc0802f3c1dae5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184926
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32154}
2020-09-22 07:26:26 +00:00
Ilya Nikolaevskiy
4c87d83d03 Extend I420 frame buffer pool to also create NV12 buffers
Bug: webrtc:11956
Change-Id: I758a28f2755cfa72ad486fbe1f9209f356eb5fa1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184510
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32147}
2020-09-21 09:46:15 +00:00
Åsa Persson
c5a74ffba4 Add support so requested resolution alignment also apply to scaled layers.
Bug: webrtc:11872
Change-Id: I7f904e2765330ee93270b66b0102ce57f336f9a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181883
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32146}
2020-09-21 09:23:22 +00:00
Artem Titov
9d77762023 Move SampleStatsCounter to public API
Bug: None
Change-Id: I8956f6febbb1caf71e951d212d57746fe1ec5eb2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184506
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32142}
2020-09-18 17:42:53 +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
Emil Lundmark
7d73c6cf9d Explicitly enable CDEF
It should already be enabled by default in libaom, but explicitly enable
it here in case that changes.

Bug: None
Change-Id: I93a1dfc92f9c02bc5ec823c326d8cf6ff163bceb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184262
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32114}
2020-09-16 11:39:44 +00:00
Harsh Maniar
6e046668d1 Adding field trials to control additional quality scaler settings
Bug: webrtc:11924
Change-Id: I98c7aa4bd4536770500fec7e8e8da9629fddd20f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183342
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32103}
2020-09-15 08:58:36 +00:00
Åsa Persson
869e9fb4f3 Use field trial list in CpuSpeedExperiment.
Removes the need for specifying a fixed number of parameters.

Bug: none
Change-Id: I1324861807cb4929963aedccb6c2755b9c6ea3fc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180421
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32055}
2020-09-08 06:56:49 +00:00
Niels Möller
d381eede92 Rename PlayoutDelay --> VideoPlayoutDelay, move to api/video/video_timing.h
We can then finally delete the top-level common_types.h, and the
corresponding build target webrtc_common.

Bug: webrtc:7660
Change-Id: I1c1096541477586d90774c7a3405b9d36edec14a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182800
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32044}
2020-09-07 08:37:14 +00:00
Mirko Bonadei
08b63641bd Move ABSL_MUST_USE_RESULT at the beginning of the method decl.
Bug: chromium:1122891
Change-Id: Ieb1763bc659e93c38fab14ee90823e3b57872478
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182921
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32016}
2020-08-31 08:19:29 +00:00
Emil Lundmark
91c0477b43 Add AV1 support to IVF reader and writer
Bug: None
Change-Id: I2ce36d282596bba54b7924e838b19b06eaacf0fd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182503
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31998}
2020-08-26 11:12:32 +00:00
Niels Möller
cccd55094d Delete unneeded dependencies on deprecated build target webrtc_common
Bug: webrtc:7660
Change-Id: Iad32aad8432fa2c6b3018d511b51943f869fbd11
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182420
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31986}
2020-08-25 07:33:12 +00:00
Ilya Nikolaevskiy
fbb49b4f7f Enable Vp8VariableFramerateScreenshare by default
Bug: webrtc:10310,chromium:949112
Change-Id: I3ed54c0571bdb8be026dee82ca3578dd5c0f9158
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182182
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31979}
2020-08-21 15:03:58 +00:00
Florent Castelli
253fdc3056 Don't do legacy conference mode temporal layer allocation on non-screenshare
Some libraries hooking into WebRTC still manage to have the conference mode
flag enabled on non screenshare sources resulting in a bad rate allocation.

Bug: webrtc:11310
Change-Id: Id5205affb562511eda40c460e380c105d8589c51
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182003
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31965}
2020-08-19 13:39:42 +00:00
Florent Castelli
eeedb6ea33 Add error reporting on VP8 encoder configuration error
Bug: webrtc:11310
Change-Id: I4ceb565b211a2313add193a3859f3baeaacc3e87
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182001
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31964}
2020-08-19 13:15:52 +00:00
Danil Chapovalov
2549f174b5 Remove RTPFragmentationHeader creation and propagation through webrtc
Bug: webrtc:6471
Change-Id: I5cb1e10088aaecb5981888082b87ae9957bbaaef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181541
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31955}
2020-08-17 16:37:33 +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
Danil Chapovalov
04afc1ff65 Delete legacy MockEncodedImageCallback::OnEncodedFrame
Bug: webrtc:6471
Change-Id: I633965487e0eb9ed03934179c41cd66fdfff7359
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181261
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31922}
2020-08-12 14:41:00 +00:00
Niels Möller
5401bad701 Prepare for deleting VideoCodec::plType
Deletes all webrtc usage of this member. Next step is to delete
any downstream references, and when that's done, the member can be
deleted.

Bug: None
Change-Id: I3f3a94a063dccf56468a1069653efd3809875b01
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181201
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31911}
2020-08-11 14:20:59 +00:00
Niels Möller
5a37d122d3 Delete deprecated variant of VideoCodingModule::RegisterReceiveCodec
Bug: None
Change-Id: Ib7ff9657c5afc265a28a26f7e52059455d51c3e0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181360
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31904}
2020-08-11 08:44:50 +00:00
Evan Shrubsole
a1c77f6d0d [Adaptation] Move Balanced MinFpsDiff logic to VideoStreamAdapter
This way can double adapt right away instead of relying
on the qp scaler checking soon into the future.

Bug: webrtc:11830
Change-Id: I8e878168303cf6a4c3edcf3997dd8ac2413a4479
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181060
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/master@{#31895}
2020-08-10 15:56:07 +00:00
Niels Möller
582102c9b7 Add a VideoCoding::RegisterReceiveCodec method with payload_type
Intended to ease removal of VideoCodec::plType, separating video
coding from transport.

Bug: None
Change-Id: I0764f2f714eab9ee4c3e55751819cd5915fb37b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181075
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31892}
2020-08-10 11:08:52 +00:00
Niels Möller
18c83d3f0b Delete unused argument |require_key_frame|
Bug: webrtc:7408
Change-Id: I59e73e6c54de5b2d293b83d54556e3d3fc6180f4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181073
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31884}
2020-08-07 14:04:07 +00:00
Eldar Rello
2127aaa64e Add new fmtp parameter for H.264
Bug: webrtc:11769, webrtc:8423, webrtc:11376
Change-Id: Ia8f22ff90f817ba46ca03de1e43d3088c05023cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178904
Commit-Queue: Eldar Rello <elrello@microsoft.com>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31878}
2020-08-07 10:32:41 +00:00
Rasmus Brandt
dabe48bb4c Add WebRTC-VP8-GetEncoderInfoOverride field trial to libvpx.
This trial allows the downstream users to quickly set the
requested resolution alignment.

Bug: webrtc:11832
Change-Id: I55b3213179021455740311247829b44926722efe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180884
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31857}
2020-08-05 11:42:54 +00:00
Florent Castelli
d3511010d9 Reland "Only enable conference mode simulcast allocations with flag enabled"
This is a reland of 32ca95145c

Fix includes not enabling the screenshare conference behavior on non
screenshare sources even if the flag is enabled.

Original change's description:
> Only enable conference mode simulcast allocations with flag enabled
>
> Non-conference mode simulcast screenshares were mistakenly using the
> conference mode semantics in the simulcast rate allocator, which broke
> spec compliant usage in some situation.
>
> This behavior should only be used when explicitly using the SDP entry
> "a=x-google-flag:conference" in both offer and answer.
>
> Bug: webrtc:11310, chromium:1093819
> Change-Id: Ibcba75c88a8405d60467546b33977a782e04e469
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179081
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Commit-Queue: Florent Castelli <orphis@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31828}

Bug: webrtc:11310
Bug: chromium:1093819
Change-Id: Ic933f93a5c4bad20583354fe821f8a1170e911cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180802
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31847}
2020-08-04 10:30:08 +00:00
Florent Castelli
834dc9cfa1 Revert "Only enable conference mode simulcast allocations with flag enabled"
This reverts commit 32ca95145c.

Reason for revert: Internal test failure

Original change's description:
> Only enable conference mode simulcast allocations with flag enabled
> 
> Non-conference mode simulcast screenshares were mistakenly using the
> conference mode semantics in the simulcast rate allocator, which broke
> spec compliant usage in some situation.
> 
> This behavior should only be used when explicitly using the SDP entry
> "a=x-google-flag:conference" in both offer and answer.
> 
> Bug: webrtc:11310, chromium:1093819
> Change-Id: Ibcba75c88a8405d60467546b33977a782e04e469
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179081
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Commit-Queue: Florent Castelli <orphis@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31828}

TBR=ilnik@webrtc.org,hta@webrtc.org,orphis@webrtc.org

Change-Id: I5ccb6e87594f491ba09fe6b837ee24d63db878ca
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11310
Bug: chromium:1093819
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180801
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31829}
2020-08-03 10:31:21 +00:00
Florent Castelli
32ca95145c Only enable conference mode simulcast allocations with flag enabled
Non-conference mode simulcast screenshares were mistakenly using the
conference mode semantics in the simulcast rate allocator, which broke
spec compliant usage in some situation.

This behavior should only be used when explicitly using the SDP entry
"a=x-google-flag:conference" in both offer and answer.

Bug: webrtc:11310, chromium:1093819
Change-Id: Ibcba75c88a8405d60467546b33977a782e04e469
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179081
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31828}
2020-08-03 10:09:46 +00:00
philipel
6f148566dc Removed FrameBuffer::Start function.
Bug: webrtc:9106
Change-Id: I98cbc6d89b01e7c49b0595da5d5e446652418897
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180581
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31809}
2020-07-30 11:15:56 +00:00
Danil Chapovalov
a5d9c1a45c In DependencyDescriptor rtp header extension drop partial chain support
i.e. when chain are used,
require each decode target to be protected by some chain.
where previously it was allowed to mark decode target as unprotected.

See https://github.com/AOMediaCodec/av1-rtp-spec/pull/125

Bug: webrtc:10342
Change-Id: Ia2800036e890db44bb1162abfa1a497ff68f3b24
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178807
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31772}
2020-07-21 14:01:27 +00:00
Jerome Jiang
7a9b96ff8e AV1: set error_resilience to 0.
No need to keep error_resilience 1 for layers in AV1

Bug: None
Change-Id: I6570d653a34ed2187307154ccdfd9e941ed8f917
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179742
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Commit-Queue: Jerome Jiang <jianj@google.com>
Cr-Commit-Position: refs/heads/master@{#31769}
2020-07-20 23:57:15 +00:00
philipel
e6542f2112 Removed unused include from encoded_image.h.
Bug: webrtc:9378
Change-Id: Ie26ab4d30d62ec109a8be638661789399821c162
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179525
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31758}
2020-07-17 14:14:03 +00:00
Markus Handell
3d2210876e Remove unused critical section includes.
Bug: webrtc:11567
Change-Id: Ic5e43c51ce06c0619adc265d12ad4bef73a9df76
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179521
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31745}
2020-07-16 13:52:28 +00:00
Danil Chapovalov
a13e7a1d46 Add factory to create scalability structures by name
according to webrtc-svc spec draft

Bug: webrtc:11404
Change-Id: I318b8a1a5c5389f6e5d15c3dd7d93041459e37f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178603
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31731}
2020-07-15 10:26:40 +00:00
Markus Handell
6deec38ede Migrate modules/video_coding to webrtc::Mutex.
Bug: webrtc:11567
Change-Id: I8023fbe7595f7ba8ae7c7db3583fc2e560ec3df2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178803
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31644}
2020-07-07 11:41:21 +00:00
Danil Chapovalov
1e10a61564 In av1 add structure with custom spatial scalability factor
Bug: webrtc:11042
Change-Id: I93f125fba1fa21d060de47c96435798525f6b374
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178566
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31617}
2020-07-02 14:52:08 +00:00
Danil Chapovalov
54544ec92a In av1 encoder set bitrate per layer when scalability is used.
Bug: webrtc:11404
Change-Id: If779c16ffb55d28d21a0900439cbe2614507e557
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177015
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31570}
2020-06-26 09:26:05 +00:00
Danil Chapovalov
bf1816170b In Av1 encoder propagate zero bitrate as inactive decode target
Bug: webrtc:10342
Change-Id: I019acb6cca433db1551c22dd139a735ef976cff5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178101
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31567}
2020-06-25 16:32:28 +00:00
Chema Gonzalez
afdbf8e6f8 H264: Fix stap-a-to-annex-b loop over-read
While converting the aggregated (stap-a) packet transform packet
framing input into an annex-b framing copy, the two loops (both the
required size calculation and the stap-a-to-annex-b copy) may
over-read the input buffer.

In both buffers, `nalu_ptr` follows the input (stap-a) buffer, which
is located in `data`, and whose length is `data_size`. Buffer is read
until `nalu_ptr` reaches the end of the buffer. Issues is that the 5th
line in the loop:

```
    uint16_t segment_length = nalu_ptr[0] << 8 | nalu_ptr[1];
```

This line accesses `nalu_ptr[1]`, which needs to be protected in
the loop condition. Let's assume `data_size = 4`, and that we restart
the loop with `nalu_ptr = data + 3`. The condition of the loop does
hold (`nalu_ptr = data + 3 < data + data_size`), but the 5th line
will access to `data[3+1] = data[4]`, which is an over-read.

Tested:

```
$ ninja -C out/Default
$ out/Default/modules_unittests --gtest_filter=PacketBuffer*:H264*:RtpPacketizerH264Test*:VideoRtpDepacketizerH264Test*:TestH264SpsPpsTracker* --logs
...
[  PASSED  ] 97 tests.
```

Change-Id: I8b8aaf7d12b0bb154430b8922f099cd49e684762
Bug: webrtc:11698
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177140
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Niklas Enbom <niklas.enbom@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31561}
2020-06-24 21:54:45 +00:00
Danil Chapovalov
09867d37ed Share constants for dependency descriptor rtp header extension
Bug: webrtc:10342
Change-Id: I9c81215569bd1bd96b953faa359f5a3d32c7d0c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177521
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31549}
2020-06-22 11:58:29 +00:00
Ilya Nikolaevskiy
7a82467d0d Fix vp9 svc singlecast mode and enable quality scaler for vp9
1) Fix several typos and small mistakes which could lead to crashes
2) Adjust bitrates if leading layers are disabled
3) Wire up webrtc quality scaler

Bug: webrtc:11319
Change-Id: I16e52bdb1c315d64906288e4f2be55fe698d5ceb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177525
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31546}
2020-06-18 21:24:46 +00:00
Zhaoliang Ma
c5c878b8ab vp9_impl: Enable VP9D_SET_LOOP_FILTER_OPT for libvpx vp9 decoder
enable this opt can give 20% performance improvement for video
decoding with 720P video loopback and fake camera on chromebook sarien.

Bug: None
Test: ./modules_tests on chromebook sarien
Change-Id: I8c6487b291b5861e6ba6b6d55b24d7ddb51c341e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177335
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31543}
2020-06-18 08:32:40 +00:00
Erik Språng
969ccf0e12 Reland "VP9 decoder: Sets thread count based on resolution, reinit on change."
This is a reland of d592575698

Patchset 2 is a reland of
https://webrtc-review.googlesource.com/c/src/+/177012

Patchset 3 is a fix for a potential crash when InitDecode()is called from
VideoStreamDecoderImpl::GetDecoder(), where the decoder_settings
parameter is a but surprisingly set to nullptr.

Original change's description:
> VP9 decoder: Sets thread count based on resolution, reinit on change.
>
> Previously, number of decoder threads for VP9 were always set to 8 but
> with a cap at number of cores. This was done since we "can't know" the
> resolution that will be used.
>
> With this change, we now intialize the number of threads based on
> resolution given in InitDecode(). If a resolution change happens in
> flight, it requires a keyframe. We therefore parse the header from
> any key frame and if it has a new resolution, we re-initialize the
> decoder.
>
> The number of threads used is based on pixel count. We set one thread
> as target for 1280x720, and scale up lineraly from there. The 8-thread
> cap is gone, but still limit it core count.
>
> This means for instance: 1 <= 720p, 2 for 1080p, 4 for 1440p, 9 for 4K.
>
> Bug: webrtc:11551
> Change-Id: I14c169a6c651c50bd1b870c4b22bc4495c8448fd
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174460
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31507}

Bug: webrtc:11551
Change-Id: I2b4b146d0b8319f07ce1660202d6aa4b374eb015
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177246
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31527}
2020-06-15 19:14:52 +00:00
Erik Språng
ee4f5cca00 Wires up trial for smarter postproc settings in non-arm VP8 decoder.
Params and format is the same as for existing ARM experiment, but a new
group name is created for non-ARM experiment.

Bug: webrtc:11551
Change-Id: I3a6c0f07a8c1d714477ae4703c16e48df36ac10e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177102
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31524}
2020-06-15 15:55:39 +00:00
Danil Chapovalov
90dc5dae2c Factor encoded frame generation code into own target
Show it can make vp9 tests cleaner too.

Bug: None
Change-Id: I8333a61dec1ef90ade9faffea94e1555ccbfcfaa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177013
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31523}
2020-06-15 12:25:06 +00:00