Commit graph

44 commits

Author SHA1 Message Date
Jeroen de Borst
2c7b9825bc Revert "Delete CodecSpecificInfo argument from VideoDecoder::Decode"
This reverts commit 39d3a7de02.

Reason for revert: This change broke an internal project

Original change's description:
> Delete CodecSpecificInfo argument from VideoDecoder::Decode
> 
> Bug: webrtc:10379
> Change-Id: I079b419604bf4e9c1994fe203d7db131a0ccddb6
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125920
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27022}

TBR=brandtr@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org,kthelgason@webrtc.org,sprang@webrtc.org

Change-Id: I2c730cc1834a3b23203fae3d7881f0890802c37b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10379
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126320
Reviewed-by: Jeroen de Borst <jeroendb@webrtc.org>
Commit-Queue: Jeroen de Borst <jeroendb@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27026}
2019-03-07 19:40:17 +00:00
Niels Möller
39d3a7de02 Delete CodecSpecificInfo argument from VideoDecoder::Decode
Bug: webrtc:10379
Change-Id: I079b419604bf4e9c1994fe203d7db131a0ccddb6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125920
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27022}
2019-03-07 16:18:49 +00:00
Niels Möller
b859b326ba Update more VideoEncoder implementations to drop CodecSpecificInfo input
Followup to https://webrtc-review.googlesource.com/c/src/+/125900.

Bug: webrtc:10379
Change-Id: If81c50c862bbcfd65a3cf7000c8327ebafe519c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126002
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27016}
2019-03-07 12:26:57 +00:00
Niels Möller
87e2d785a0 Prepare for splitting FrameType into AudioFrameType and VideoFrameType
This cl deprecates the FrameType enum, and adds aliases AudioFrameType
and VideoFrameType.

After downstream usage is updated, the enums will be separated
and be moved out of common_types.h.

Bug: webrtc:6883
Change-Id: I2aaf660169da45f22574b4cbb16aea8522cc07a6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/123184
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27011}
2019-03-07 10:12:57 +00:00
Ilya Nikolaevskiy
6117068af4 Throttle frame-rate In VP9 encoder in steady state for screenshare
If minQP is reached and encoder undershoot consistently, we consider the
quality good enough and throttle encode frame rate.

This CL also adds perf tests for high fps vp9 screenshare.

Bug: webrtc:10310
Change-Id: I49fc7d31f9f596a9ecb5f85fe9e0c7861d4915f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125761
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26997}
2019-03-06 16:23:26 +00:00
Danil Chapovalov
b769894025 Remove rule that discourages passing optional by const reference
include example to demonstrate:
(subjectively) increased readability
(objectively) decreased binary size

Bug: None
Change-Id: I970e668af98d98725b2d527f44169a8b7c9d2338
Reviewed-on: https://webrtc-review.googlesource.com/c/121420
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26545}
2019-02-05 11:58:05 +00:00
Ilya Nikolaevskiy
5546aef682 Vp9 flexible mode fixes
- Enable vp9 flexible mode in VideoEngine if 3 spatial layers are set.
- Enable flexible mode in loopback tools and quality tests.
- Reset first active spatial layer on keyframe in encoder.
- Ensure duplicate references are not set by the sender in video header.
- Set references manually for flexible mode in vp9 encoder.
- Delay new activated layers until next base layer frame.
- On receive side put each spatial layer as a separate frame to FrameBuffer
  and return several frames combined from FrameBuffer.

Bug: webrtc:10049,webrtc:9794,webrtc:9784
Change-Id: I01e69f134cc145deba666ccc92deb1d37a324ede
Reviewed-on: https://webrtc-review.googlesource.com/c/112289
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25895}
2018-12-04 15:36:28 +00:00
Patrik Höglund
d4d254f315 Revert "Various VP9 high fps fixes"
This reverts commit ba2840ce4e.

Reason for revert: Looks like this breaks all VP9 tests on the Chromium level, for Mac: https://ci.chromium.org/buildbot/chromium.webrtc/Mac%20Tester/85866

Search for TIMED OUT in for instance https://logs.chromium.org/logs/chromium/bb/chromium.webrtc/Mac_Tester/85866/+/recipes/steps/browser_tests/0/stdout (it times out because the video is frozen).

Original change's description:
> Various VP9 high fps fixes
> 
> - Enable flexible mode in loopback tools and quality tests
> - Ensure duplicate references are not set by the sender in video header
> - Reset first active spatial layer on keyframe in encoder
> - Make vp9 encoder to not generate spatial references for first active
>   layer with external reference control in svc flexible mode
> 
> Bug: webrtc:10049
> Change-Id: If9ff576ea8a1a2fef6116b17b5b5adff08c5f8c6
> Reviewed-on: https://webrtc-review.googlesource.com/c/112080
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25795}

TBR=ilnik@webrtc.org,ssilkin@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:10049
Change-Id: Ie6a7daf6414337173fec38c5ff546d509951cba6
Reviewed-on: https://webrtc-review.googlesource.com/c/112400
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25842}
2018-11-29 15:57:55 +00:00
Ilya Nikolaevskiy
ba2840ce4e Various VP9 high fps fixes
- Enable flexible mode in loopback tools and quality tests
- Ensure duplicate references are not set by the sender in video header
- Reset first active spatial layer on keyframe in encoder
- Make vp9 encoder to not generate spatial references for first active
  layer with external reference control in svc flexible mode

Bug: webrtc:10049
Change-Id: If9ff576ea8a1a2fef6116b17b5b5adff08c5f8c6
Reviewed-on: https://webrtc-review.googlesource.com/c/112080
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25795}
2018-11-27 12:20:56 +00:00
Sergey Silkin
88ce4ef46e Don't buffer encoded frames.
Pass encoded frames to packetizer immediately if encoder is configured
to drop whole superframe.

Bug: webrtc:9950
Change-Id: Iedee9618bb146307efd5a86cb35bf14b5e64b341
Reviewed-on: https://webrtc-review.googlesource.com/c/109002
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25771}
2018-11-23 13:48:00 +00:00
Johannes Kron
4749e4e221 Move HdrMetadata to ColorSpace
Move HdrMetadata to ColorSpace as part of preparing for joint transmission
of these two objects.

Bug: webrtc:8651
Change-Id: Ie948011a2c0106d5967cb5ef3b9565217e798272
Reviewed-on: https://webrtc-review.googlesource.com/c/111481
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25730}
2018-11-21 15:09:24 +00:00
Mirko Bonadei
95adedb9c2 Always compile VP9 source files.
Instead of optionally compile VP9 source files based on the value of
the GN argument 'rtc_libvpx_build_vp9', this CL uses the preprocessor
macro RTC_ENABLE_VP9 to decide if VP9 related code needs to be compiled
or not.

Bug: None
Change-Id: I5c1b69d7ec35e8446181d98c912277d0ae8fdba2
Reviewed-on: https://webrtc-review.googlesource.com/c/111063
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25685}
2018-11-19 10:18:18 +00:00
Johannes Kron
9973fa88ae Pass HdrMetadata between VideoFrame and EncodedImage for VP9
Bug: webrtc:8651
Change-Id: Ie4d7ee19bead84eda7788076662c4066edc3f024
Reviewed-on: https://webrtc-review.googlesource.com/c/109583
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25581}
2018-11-09 13:33:37 +00:00
Erik Språng
d3438aa1ed Add ability to specify if rate controller of video encoder is trusted.
If rate controller is trusted, we disable the frame dropper in the
media optimization module.

This is a re-land of
https://webrtc-review.googlesource.com/c/src/+/105020

Bug: webrtc:9890
Change-Id: I418e47a43a1a98cb2fd5295c03360b954f2288f2
Reviewed-on: https://webrtc-review.googlesource.com/c/109141
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25570}
2018-11-08 16:41:12 +00:00
Erik Språng
727d1649c6 Update VP9 encoder to use GetEncoderInfo
Bug: webrtc:9890
Change-Id: I74c1e098c800a44e2e038cd8a01be6c61bec97f5
Reviewed-on: https://webrtc-review.googlesource.com/c/109922
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25551}
2018-11-07 16:51:40 +00:00
philipel
ee49f7087f Remove VideoEncoder::SetChannelParameters.
The SetChannelParameters function was used when WebRTC supported decoding
with errors, which we no longer do.

This cleanup CL is related to the work tracked by 9946.

Bug: webrtc:9946
Change-Id: Id2d5ed23031388f890c42651bfbe5f79eda701e5
Reviewed-on: https://webrtc-review.googlesource.com/c/108861
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25505}
2018-11-05 17:37:07 +00:00
Sergey Silkin
e7ce888abe Fix VP9 K-SVC full stack tests.
- Added field trial to force issuing of key frame on deactivation of
spatial layer. This fixes video corruptions in VP9 K-SVC tests where
layers can be activated/deactivated on-fly due to bandwidth change.

- Added 100ms network delay to the test with restricted link capacity.
This fixes rapid drop of available bandwidth which happens when
bandwidth overuse is detected in the very beginning of call and several
feedback packets arrive without any delay. Also, this makes the test
more realistic.

- Disabled filtering of spatial layer in the test with restricted
link capacity. 1) We don't really need filtering in this test.
2) It appeared that in video quality tests filtering is done before
sending packets to network simulator. Filtering of high layers causes
channel underuse which is compensated by increase of sent bitrate.
This is why we got sent/media bitrates about 2Mbps in test where link
was limited to 1Mbps.

Bug: chromium:889017
Change-Id: I33ffcee0274523f6183c3bbd27d3d29395417d52
Reviewed-on: https://webrtc-review.googlesource.com/c/103520
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24988}
2018-10-04 12:15:18 +00:00
Sergey Silkin
390f358344 Configure frame references in VP9 encoder wrapper.
Bug: webrtc:9585
Change-Id: I3f90d8f2b81556cfb5fa9123607ab0a9ade2bf3f
Reviewed-on: https://webrtc-review.googlesource.com/93469
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24915}
2018-10-01 20:02:46 +00:00
Sergey Silkin
96f2c97161 Reland "Frame rate controller per spatial layer."
This is a reland of ae9e188e67

Original change's description:
> Frame rate controller per spatial layer.
>
> This allows VP9 encoder wrapper to control frame rate of each spatial
> layer. The wrapper configures encoder to skip encoding spatial layer
> when actual frame rate exceeds the target frame rate of that layer.
> Target frame rate of high spatial layer is expected to be equal or
> higher then that of low spatial layer. For now frame rate controller
> is only enabled in screen sharing mode.
>
> Added unit test which configures encoder to produce 3 spatial layers
> with frame rates 10, 20 and 30fps and verifies that absolute delta of
> final and target rate doesn't exceed 10%.
>
> Bug: webrtc:9682
> Change-Id: I7a7833f63927dd475e7b42d43e4d29061613e64e
> Reviewed-on: https://webrtc-review.googlesource.com/96640
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24593}

TBR=sprang@webrtc.org

Bug: webrtc:9682
Change-Id: Idcce315890c79301da532f9ba4997e9606f73fb0
Reviewed-on: https://webrtc-review.googlesource.com/99340
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24669}
2018-09-11 07:08:36 +00:00
Sergey Silkin
042661b404 Revert "Frame rate controller per spatial layer."
This reverts commit ae9e188e67.

Reason for revert: Verify if this causes chromium:882358.

Original change's description:
> Frame rate controller per spatial layer.
>
> This allows VP9 encoder wrapper to control frame rate of each spatial
> layer. The wrapper configures encoder to skip encoding spatial layer
> when actual frame rate exceeds the target frame rate of that layer.
> Target frame rate of high spatial layer is expected to be equal or
> higher then that of low spatial layer. For now frame rate controller
> is only enabled in screen sharing mode.
>
> Added unit test which configures encoder to produce 3 spatial layers
> with frame rates 10, 20 and 30fps and verifies that absolute delta of
> final and target rate doesn't exceed 10%.
>
> Bug: webrtc:9682
> Change-Id: I7a7833f63927dd475e7b42d43e4d29061613e64e
> Reviewed-on: https://webrtc-review.googlesource.com/96640
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24593}

TBR=sprang@webrtc.org,ssilkin@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:9682, chromium:882358
Change-Id: Idc4051eef72104823038ed9139bb9c75018f7d86
Reviewed-on: https://webrtc-review.googlesource.com/99082
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24646}
2018-09-10 11:24:33 +00:00
Sergey Silkin
ae9e188e67 Frame rate controller per spatial layer.
This allows VP9 encoder wrapper to control frame rate of each spatial
layer. The wrapper configures encoder to skip encoding spatial layer
when actual frame rate exceeds the target frame rate of that layer.
Target frame rate of high spatial layer is expected to be equal or
higher then that of low spatial layer. For now frame rate controller
is only enabled in screen sharing mode.

Added unit test which configures encoder to produce 3 spatial layers
with frame rates 10, 20 and 30fps and verifies that absolute delta of
final and target rate doesn't exceed 10%.

Bug: webrtc:9682
Change-Id: I7a7833f63927dd475e7b42d43e4d29061613e64e
Reviewed-on: https://webrtc-review.googlesource.com/96640
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24593}
2018-09-06 07:04:04 +00:00
Niels Möller
d3b8c63b58 Reland "Add spatial index to EncodedImage."
This is a reland of da0898dfae

Original change's description:
> Add spatial index to EncodedImage.
>
> Replaces the VP8 simulcast index and VP9 spatial index formely part of
> CodecSpecificInfo.
>
> Bug: webrtc:9378
> Change-Id: I80eafd63fbdee0a25864338196a690628b4bd3d2
> Reviewed-on: https://webrtc-review.googlesource.com/83161
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24485}

Tbr: magjed@webrtc.org
Bug: webrtc:9378
Change-Id: Iff20b656581ef63317e073833d1a326f7118fdfd
Reviewed-on: https://webrtc-review.googlesource.com/96780
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24507}
2018-08-31 07:35:52 +00:00
Sergey Silkin
ae3144c51f Move VP9 frame rate controller to separate class.
Bug: webrtc:9669
Change-Id: I6f30587778e9783182af11d2410464024918e171
Reviewed-on: https://webrtc-review.googlesource.com/96201
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24487}
2018-08-29 21:05:56 +00:00
Niels Moller
5a998d7246 Revert "Add spatial index to EncodedImage."
This reverts commit da0898dfae.

Reason for revert: Broke downstream tests.

Original change's description:
> Add spatial index to EncodedImage.
> 
> Replaces the VP8 simulcast index and VP9 spatial index formely part of
> CodecSpecificInfo.
> 
> Bug: webrtc:9378
> Change-Id: I80eafd63fbdee0a25864338196a690628b4bd3d2
> Reviewed-on: https://webrtc-review.googlesource.com/83161
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24485}

TBR=brandtr@webrtc.org,magjed@webrtc.org,nisse@webrtc.org,sprang@webrtc.org,philipel@webrtc.org,srte@webrtc.org

Change-Id: Idb4fb9d72e5574d7353c631cb404a1311f3fd148
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9378
Reviewed-on: https://webrtc-review.googlesource.com/96664
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24486}
2018-08-29 14:36:05 +00:00
Niels Möller
da0898dfae Add spatial index to EncodedImage.
Replaces the VP8 simulcast index and VP9 spatial index formely part of
CodecSpecificInfo.

Bug: webrtc:9378
Change-Id: I80eafd63fbdee0a25864338196a690628b4bd3d2
Reviewed-on: https://webrtc-review.googlesource.com/83161
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24485}
2018-08-29 13:50:17 +00:00
Sergey Silkin
8227659075 Prevent duplicates in VP9 RTP p_diff list.
VP9 encoder wrapper duplicated p_diff values in VP9 RTP payload
descriptor for some frames. This confused ref frame finder which
invalidated such frames on receiver.

Bug: webrtc:9657
Change-Id: I5ddfed30d2908c5fbb8bce9d3dac0a519830e978
Reviewed-on: https://webrtc-review.googlesource.com/95701
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24456}
2018-08-27 14:38:59 +00:00
Emircan Uysaler
98badbcd9f Add VP9 profile negotiation to SDP
This CL adds VP9 profile information in SDP. It adds the necessary fields and
enums to codec containers.

Additional profiles will be followed.

Bug: webrtc:9376
Change-Id: I78574714f06f8087262a71dd64c01f31a229dd54
Reviewed-on: https://webrtc-review.googlesource.com/81960
Reviewed-by: Taylor (left Google) <deadbeef@webrtc.org>
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23810}
2018-07-02 23:38:41 +00:00
“Michael
23c5a99381 Fix for VP9 K-SVC video freeze frame when send bandwidth is restricted.
Added distinction between number of configured and number of actively
encoded spatial layers and include number of actively encoded spatial
layers in ssData.  Modified layer_filtering_transport.cc test to
parse from the RTP header and use the number of actively encoded
spatial layers for filtering spatial video layers.

Bug: webrtc:9425
Change-Id: Ic9f8895ab08b0626f9bb53a75ec33d8e7eb8706e
Reviewed-on: https://webrtc-review.googlesource.com/84243
Commit-Queue: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23716}
2018-06-21 17:53:35 +00:00
Danil Chapovalov
0040b66ad3 Replace rtc::Optional with absl::optional
This is a no-op change because rtc::Optional is an alias to absl::optional

This CL generated by running script from modules with parameters
'pacing video_coding congestion_controller remote_bitrate_estimator':

find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+

find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"(../)*api:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;

git cl format

Bug: webrtc:9078
Change-Id: I8ea501d7f1ee36e8d8cd3ed37e6b763c7fe29118
Reviewed-on: https://webrtc-review.googlesource.com/83900
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23640}
2018-06-18 10:24:48 +00:00
Sergey Silkin
4e6cd5eaeb Get actual list of references from encoder in flexible mode.
In flexible mode, use VP9E_GET_SVC_REF_FRAME_CONFIG to get indices of
reference frame buffers and buffers update by encoded frame.

Set inter_pic_predicted to true only if encoder actually used temporal
prediction.

Bug: webrtc:9244, webrtc:9270
Change-Id: I4e439abeab9e063d50abdcefc59bf58d6596ea6c
Reviewed-on: https://webrtc-review.googlesource.com/74780
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Marco Paniconi <marpan@google.com>
Cr-Commit-Position: refs/heads/master@{#23410}
2018-05-28 11:35:49 +00:00
Sergey Silkin
d902d58b0a Framerate controller for VP9 screen sharing.
- Limit framerate by dropping frames before encoding.
- The max framerate at screen sharing is set to 5fps.

Bug: webrtc:9261
Change-Id: Icfbbecce33fdce2d746291708db0108e0ba10760
Reviewed-on: https://webrtc-review.googlesource.com/76921
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23316}
2018-05-19 07:14:48 +00:00
Sergey Silkin
be71a1ee08 Replace VP9 screen sharing.
- Remove referencing control from encoder wrapper. Use fixed temporal
prediction structure.
- Remove flexible mode from encoder wrapper. It only worked with
referencing control which this CL removes.
- Remove external framerate/bitrate controller. Keep codec's internal
frame dropping enabled at screen sharing.
- Use GetSvcConfig() to configure layering.

Bug: webrtc:9261
Change-Id: I355baa6aab7b98ac5028b3851d1f8ccc82a308e0
Reviewed-on: https://webrtc-review.googlesource.com/76801
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23311}
2018-05-18 15:11:46 +00:00
Niels Möller
8df3a388a3 Deprecate RTPFragmentationHeader argument to VideoDecoder::Decode
Intend to delete in a later cl.

Bug: webrtc:6471
Change-Id: Icf0fcd40e0d3287dc59b684fae6552b40b47204a
Reviewed-on: https://webrtc-review.googlesource.com/39511
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23162}
2018-05-08 08:09:35 +00:00
Sergey Silkin
bd0954e83f Encode key frame when enabling upper layer.
Request key frame when upper spatial layer is enabled dynamically
and inter-layer prediction is disabled or limited to key pictures.

This is needed to force encoder to produce RTP compatible bitstream
where temporal prediction is limited to the same spatial layer.

Bug: webrtc:9217
Change-Id: I4fc1e3f067689ba7b5c6bd1f5af922a0637f03d7
Reviewed-on: https://webrtc-review.googlesource.com/73580
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23102}
2018-05-03 13:22:01 +00:00
Sergey Silkin
6a8f30e5a3 Add control for inter-layer prediction mode.
This allows to control inter-layer prediction at encoding VP9 SVC.
There are three options:
1. Disabled.
2. Enabled for all pictures.
3. Enabled for key pictures, disabled for others.

Inter-layer prediction is enabled for all pictures by default.

Bug: none
Change-Id: I49fe43d8744c92bec349d815100ba158519f0664
Reviewed-on: https://webrtc-review.googlesource.com/71500
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23049}
2018-04-27 06:20:15 +00:00
Sergey Silkin
bc0f0d3ded Rename end_of_superframe to end_of_picture.
For consistency with the VP9 RTP spec which uses term "picture" for set
of frames which belong to the same time instance.

Bug: none
Change-Id: I30e92d5debb008feb58f770b63fe10c2e0029267
Reviewed-on: https://webrtc-review.googlesource.com/72180
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23040}
2018-04-26 15:47:17 +00:00
Erik Språng
566124a6df Move BitrateAllocation to api/ and rename it VideoBitrateAllocation
Since the webrtc_common build target does not have visibility set, we
cannot easily use BitrateAllocation in other parts of Chromium.
This is currently blocking parts of chromium:794608, and I know of other
usage outside webrtc already, so moving it to api/ should be warranted.

Also, since there's some naming confusion and this class is video
specific rename it VideoBitrateAllocation. This also fits with the
standard interface for producing these: VideoBitrateAllocator.

Bug: chromium:794608
Change-Id: I4c0fae40f9365e860c605a76a4f67ecc9b9cf9fe
Reviewed-on: https://webrtc-review.googlesource.com/70783
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22986}
2018-04-23 15:31:27 +00:00
Sergey Silkin
07f80cc393 Set first_frame_in_picture on first encoded frame of picture.
Set the flag based on coded length of buffered frame which is reset
after picture is encoded and, thus, is equal to zero when encoder
delivers first frame of next picture.

Before this change first_frame_in_picture was set based on index of
spatial layer of encoded frame. This is not right anymore since encoder
can drop base layer but deliver upper layers.

Bug: chromium:828350
Change-Id: I12c7534240de8bc4905f04ff368cc3704720a70b
Reviewed-on: https://webrtc-review.googlesource.com/68561
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22805}
2018-04-10 12:09:55 +00:00
philipel
9d7d75b0fd Don't use the |codec_settings| parameter in VP9DecoderImpl::InitDecode.
Bug: webrtc:9106
Change-Id: I3d3f38faa0269a01bfb254a9f24839fbcf959463
Reviewed-on: https://webrtc-review.googlesource.com/66741
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22728}
2018-04-04 11:56:30 +00:00
Sergey Silkin
2a1f183e99 Set marker bit on last encoded spatial layer.
In order to handle per-layer frame dropping both VP9 encoder wrapper
and RTP packetizer were modified.

- Encoder wrapper buffers last encoded frame and passes it to
packetizer after frame of next layer is encoded or encoding of
superframe is finished.
- Encoder wrapper sets end_of_superframe flag on last encoded frame of
superframe before passing it to packetizer.
- If end_of_superframe is True then packetizer sets marker bit on last
packet of frame.

Bug: webrtc:9066
Change-Id: I1d45319fbe6bc63d01721ea67bfb7440d4c29275
Reviewed-on: https://webrtc-review.googlesource.com/65540
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22722}
2018-04-04 10:40:19 +00:00
Sergey Silkin
86684960b3 Adding layering configurator and rate allocator for VP9 SVC.
The configurator decides number of spatial layers, their resolution
and bitrate thresholds based on given input resolution and maximum
number of spatial layers.

The allocator distributes available bitrate across spatial and
temporal layers. If there is not enough bitrate to provide acceptable
quality for all spatial layers allocator disables enhancement layers
one by one until the condition is met or number of layers is reduced
to one.

VP9 SVC related unit tests have been updated. Input resolution and
bitrate in these tests have been increased to the level enough to
provide desirable number of spatial layers.

Bug: webrtc:8518
Change-Id: I9df790920227c7f7dd4d42a50a856c22f0f4389b
Reviewed-on: https://webrtc-review.googlesource.com/60340
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22672}
2018-03-29 10:16:47 +00:00
Niels Möller
150dcb0a9a Delete logic to set picture id and tl0 pic idx in encoders.
It would be nice to also delete the fields from CodecSpecificInfo,
but those fields are used on the receive side.

Bug: webrtc:8830
Change-Id: I1a3f13ea2c024cbd73b33fd9dd58e531d3576a55
Reviewed-on: https://webrtc-review.googlesource.com/64780
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22625}
2018-03-27 13:11:16 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org


Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
2017-09-15 05:02:56 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
Renamed from webrtc/modules/video_coding/codecs/vp9/vp9_impl.h (Browse further)