Commit graph

373 commits

Author SHA1 Message Date
Steve Anton
40d55331d7 Include absl/memory/memory.h if absl::make_unique is used
Tbr: kwiberg@webrtc.org
Bug: None
Change-Id: Iaf4533d2ce0e80b351a8a664ef8cf7ba0e5ec583
Reviewed-on: https://webrtc-review.googlesource.com/c/115746
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Yves Gerey <yvesg@google.com>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26168}
2019-01-08 20:08:32 +00:00
Sergey Silkin
d716fb9ecb Reland "Refactor rate profile update."
This is a reland of b6cdfdc165

Original change's description:
> Refactor rate profile update.
>
> RateProfile::frame_num specifies frame at which this rate profile
> should be applied.
>
> Bug: none
> Change-Id: I003ee43f44299a49d83f547558284817bfaeacc0
> Reviewed-on: https://webrtc-review.googlesource.com/c/115242
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Seth Hampson <shampson@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26080}

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

Bug: none
Change-Id: I6ccbb32efe3d52c97e73e248ce5f06d672c9fba5
Reviewed-on: https://webrtc-review.googlesource.com/c/116286
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26155}
2019-01-08 10:35:42 +00:00
Sergey Silkin
08223c1576 Revert "Reland "Refactor rate profile update.""
This reverts commit 77aedaee69.

Reason for revert: breaks VideoCodecTestVideoToolbox tests.

Original change's description:
> Reland "Refactor rate profile update."
> 
> This is a reland of b6cdfdc165
> 
> Original change's description:
> > Refactor rate profile update.
> > 
> > RateProfile::frame_num specifies frame at which this rate profile
> > should be applied.
> > 
> > Bug: none
> > Change-Id: I003ee43f44299a49d83f547558284817bfaeacc0
> > Reviewed-on: https://webrtc-review.googlesource.com/c/115242
> > Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> > Reviewed-by: Seth Hampson <shampson@webrtc.org>
> > Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#26080}
> 
> Bug: none
> Change-Id: I2604878d0bbee0f2182ad74e3cc29546310b76f3
> Reviewed-on: https://webrtc-review.googlesource.com/c/115401
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Seth Hampson <shampson@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26145}

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

Change-Id: Ib53eae70c380eefa303ddb01441f23e32f06b3ad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://webrtc-review.googlesource.com/c/116285
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26148}
2019-01-07 15:41:17 +00:00
Sergey Silkin
77aedaee69 Reland "Refactor rate profile update."
This is a reland of b6cdfdc165

Original change's description:
> Refactor rate profile update.
> 
> RateProfile::frame_num specifies frame at which this rate profile
> should be applied.
> 
> Bug: none
> Change-Id: I003ee43f44299a49d83f547558284817bfaeacc0
> Reviewed-on: https://webrtc-review.googlesource.com/c/115242
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Seth Hampson <shampson@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26080}

Bug: none
Change-Id: I2604878d0bbee0f2182ad74e3cc29546310b76f3
Reviewed-on: https://webrtc-review.googlesource.com/c/115401
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26145}
2019-01-07 11:18:26 +00:00
Artem Titov
1ebfb6aac7 Introduce VideoFrame::id to keep track of frames inside application.
Also switch webrtc code from deprecated constructors to the builder API.

Change-Id: Ie325bf1e9b4ff1e413fef3431ced8ed9ff725107
Bug: webrtc:10138
Reviewed-on: https://webrtc-review.googlesource.com/c/114422
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26132}
2019-01-04 08:59:26 +00:00
Sergey Silkin
a1f78a4fa6 Revert "Refactor rate profile update."
This reverts commit b6cdfdc165.

Reason for revert: breaks downstream projects

Original change's description:
> Refactor rate profile update.
> 
> RateProfile::frame_num specifies frame at which this rate profile
> should be applied.
> 
> Bug: none
> Change-Id: I003ee43f44299a49d83f547558284817bfaeacc0
> Reviewed-on: https://webrtc-review.googlesource.com/c/115242
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Seth Hampson <shampson@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26080}

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

Change-Id: I5957a0169841008436d1db70403d3694bf25d5cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://webrtc-review.googlesource.com/c/115400
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26081}
2018-12-21 09:05:01 +00:00
Sergey Silkin
b6cdfdc165 Refactor rate profile update.
RateProfile::frame_num specifies frame at which this rate profile
should be applied.

Bug: none
Change-Id: I003ee43f44299a49d83f547558284817bfaeacc0
Reviewed-on: https://webrtc-review.googlesource.com/c/115242
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26080}
2018-12-21 08:32:35 +00:00
Jiawei Ou
aa7bc7e0bb Create field trial for vp8 number of thread on iOS.
Without the added preprocessor check, iOS device will be using the desktop logic to determine the number of thread. This put iPhone 8 and iPhone X to use 3 threads and all other iPhones after iPhone 5 to use a single thread.
This CL added a preprocessor for WEBRTC_IOS to have it own thread number calculation logic. In which, the maximum number of thread is fetched from a field_trial and capped by the number of CPU available on the device.

Bug: webrtc:10005
Change-Id: I8c6257fcbf85b07bc986b5f733dbabb3feee37f7
Reviewed-on: https://webrtc-review.googlesource.com/c/110941
Commit-Queue: Jiawei Ou <ouj@fb.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25997}
2018-12-13 07:35:59 +00:00
Niels Möller
48a79465ec Convert all webrtc code to not access EncodedImage::_size directly.
Read using capacity() method, write using set_buffer() method. This is
a preparation for making the member private, and renaming it to
capacity_.

Bug: webrtc:9378
Change-Id: I2f96679d052a83fe81be40301bd9863c87074640
Reviewed-on: https://webrtc-review.googlesource.com/c/113520
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25934}
2018-12-07 16:19:34 +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
Yves Gerey
3e70781361 [Cleanup] Add missing #include. Remove useless ones. IWYU part 2.
This is a follow-up to
https://webrtc-review.googlesource.com/c/src/+/106280.
This time the whole code base is covered.
Some files may have not been fixed though, whenever the IWYU tool
was breaking the build.

Bug: webrtc:8311
Change-Id: I2c31f552a87e887d33931d46e87b6208b1e483ef
Reviewed-on: https://webrtc-review.googlesource.com/c/111965
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25830}
2018-11-28 18:25:07 +00:00
Sergey Silkin
bd04f4ae7f Increase buffer level threshold in VP8/9 tests.
This increases expected value of maximum buffer level in VP8/9 tests
up to 1 second and thus alignes it with the value that WebRTC uses by
default for these codecs.

Bug: webrtc:10017
Change-Id: I8fd41e8006f11c230d844a053c04656408c2ec97
Reviewed-on: https://webrtc-review.googlesource.com/c/111503
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25716}
2018-11-20 16:33:18 +00:00
Mirko Bonadei
22ff1a437a Fix threshold in VideoCodecTestLibvpx.ChangeFramerateVP9.
Libvpx has been recently updated and this test was failing because
of a slightly different value.

TBR=sprang@webrtc.org

Bug: webrtc:10017
Change-Id: I5fe9161eef5c3e1ff8e0dceb36a663648d8f4617
Reviewed-on: https://webrtc-review.googlesource.com/c/111461
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25709}
2018-11-20 13:09:33 +00:00
Mirko Bonadei
8ef57932b1 Switch from RTC_DISABLE_VP9 to RTC_ENABLE_VP9.
RTC_ENABLE_VP9 is more natural to deal with then RTC_DISABLE_VP9.
In all the places this macro is used, WebRTC needs to do more things
so it is easier to "do more if RTC_ENABLE_VP9 is defined" than
"do more if RTC_DISABLE_VP9 is not defined".

Bug: None
Change-Id: If992e5c554173e6af3f030f6e0fd21bd82acf9eb
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/c/111242
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25679}
2018-11-19 08:30:55 +00:00
Jiawei Ou
c2ebe21ba9 Reland "Use the factory instead of using the builtin code path in VideoCodecInitializer"
Compared the original CL: https://webrtc-review.googlesource.com/c/src/+/94782

This new CL added backward compatible functions to WebRtcMediaEngineFactory so that internal projects will not be broken.

Because of that, now we can revert all the changes to SDK and PeerConnection and do it in following CLs. This makes this CL cleaner.

One temporary disadvantage of this is the media engine now need to take a dependency onto builtin video bitrate factory, but practically it just moved code around and should not result in a large binary size change. We can remove this dependency later if needed.

Bug: webrtc:9513
Change-Id: I38708762ff365e4ca05974b99fac71edc739a756
Reviewed-on: https://webrtc-review.googlesource.com/c/109040
Commit-Queue: Jiawei Ou <ouj@fb.com>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25574}
2018-11-08 19:10:47 +00:00
Niels Möller
c572ff3c71 Add default constructor for rtc::Event
Bug: webrtc:9962
Change-Id: Icaa91e657e6881fcb1553f354c07866109a0ea68
Reviewed-on: https://webrtc-review.googlesource.com/c/109500
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25535}
2018-11-07 08:57:50 +00:00
Qingsi Wang
59844ce57e Revert "Use the factory instead of using the builtin code path in VideoCodecInitializer."
This reverts commit be142178aa.

Reason for revert: breaking internal projects

Original change's description:
> Use the factory instead of using the builtin code path in `VideoCodecInitializer`.
> 
> Bug: webrtc:9513
> Change-Id: Ia299ae1044a3ff4c91e208200938cba540bdcea6
> Reviewed-on: https://webrtc-review.googlesource.com/c/94782
> Commit-Queue: Jiawei Ou <ouj@fb.com>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> Reviewed-by: Seth Hampson <shampson@webrtc.org>
> Reviewed-by: 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@{#25456}

TBR=brandtr@webrtc.org,magjed@webrtc.org,sakal@webrtc.org,nisse@webrtc.org,andersc@webrtc.org,tommi@webrtc.org,kthelgason@webrtc.org,sprang@webrtc.org,srte@webrtc.org,perkj@webrtc.org,tkchin@webrtc.org,shampson@webrtc.org,glaznev@webrtc.org,ouj@fb.com,qingsi@webrtc.org

Change-Id: I8040ccabe3ae6464d72c7696adb663c1dd275b63
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9513
Reviewed-on: https://webrtc-review.googlesource.com/c/108980
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25459}
2018-11-01 04:46:02 +00:00
Jiawei Ou
be142178aa Use the factory instead of using the builtin code path in VideoCodecInitializer.
Bug: webrtc:9513
Change-Id: Ia299ae1044a3ff4c91e208200938cba540bdcea6
Reviewed-on: https://webrtc-review.googlesource.com/c/94782
Commit-Queue: Jiawei Ou <ouj@fb.com>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: 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@{#25456}
2018-10-31 22:47:02 +00:00
Danil Chapovalov
99b71dfd4a Use function_video_(en|de)coder_factory from api
Remove them from test.
It is completion of the move started with
https://webrtc-review.googlesource.com/c/src/+/107705

Bug: None
Change-Id: Ib0b26db04a1ee814322851280ba1e59b4b3f7ce6
Reviewed-on: https://webrtc-review.googlesource.com/c/107891
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25392}
2018-10-26 14:54:19 +00:00
Erik Språng
e2fd86a79c Move encoder metadata into EncoderInfo struct.
This deprecates the following methods in VideoEncoder:
  virtual ScalingSettings GetScalingSettings() const;
  virtual bool SupportsNativeHandle() const;
  virtual const char* ImplementationName() const;

Though they are not marked RTC_DEPRECATED since we still want to call
them from within the default GetEncoderInfo() until downstream
projects have been updated.

Furthmore, implementation name is changed from const char* to
std:string, which prevents some lifetime issues with dynamic encoder
names, and CodecSpecificInfo.codec_name is removed in favor of getting
the implementation name via GetEncoderInfo().

This CL removes calls to these deprecated methods, follow-ups will also
remove implementations of the methods and replace them with new
GetEncoderInfo() substitutions.

Bug: webrtc:9890
Change-Id: I6fd6e531480c0b952f53dbd5105e0b0adc3e3b0c
Reviewed-on: https://webrtc-review.googlesource.com/c/106905
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25351}
2018-10-25 08:51:53 +00:00
Rasmus Brandt
2d0c68744c Remove |hw_encoder| and |hw_decoder| from VideoCodecTestFixture::Config.
Only used for output filename nowadays. Previously, it was used for
selecting the codec implementation. That is now done by injecting
the appropriate codec factory.

Bug: webrtc:9317
Change-Id: Ia2bf28f7df165fb65410ecd1f5d646ee6604e1be
Reviewed-on: https://webrtc-review.googlesource.com/c/106023
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25204}
2018-10-16 10:59:23 +00:00
Erik Språng
c84cd950b7 Move MockVideoDecoder to api/test.
Move MockVideoDecoder from
modules/video_coding/include/mock/mock_video_codec_interface.h
to
api/test/mock_video_decoder.h

The mock encoder has already moved:
https://webrtc-review.googlesource.com/c/src/+/105620

Keeping the old header until downstream projects have been updated.

Bug: webrtc:9722
Change-Id: I4bc849173a04813064212f17761876695ca3fed4
Reviewed-on: https://webrtc-review.googlesource.com/c/105900
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25170}
2018-10-15 13:45:27 +00:00
Oleh Prypin
a1d9ca47f9 Revert "Add ability to specify if rate controller of video encoder is trusted."
This reverts commit 3e335d1423.

Reason for revert: breaks downstream project

Original change's description:
> 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.
>
> Bug: webrtc:9722
> Change-Id: I821f21fd74a400ee9d5aa3f6b42d4e569033acbe
> Reviewed-on: https://webrtc-review.googlesource.com/c/105020
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25107}

TBR=brandtr@webrtc.org,ilnik@webrtc.org,nisse@webrtc.org,sprang@webrtc.org,perkj@webrtc.org

Change-Id: Ifdb0aae684894854a184ec1e7423a7c62e7ba237
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9722
Reviewed-on: https://webrtc-review.googlesource.com/c/105360
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25117}
2018-10-11 15:37:40 +00:00
Erik Språng
3e335d1423 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.

Bug: webrtc:9722
Change-Id: I821f21fd74a400ee9d5aa3f6b42d4e569033acbe
Reviewed-on: https://webrtc-review.googlesource.com/c/105020
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25107}
2018-10-11 09:07:34 +00:00
Sergey Silkin
02fed02c00 Assign spatial_idx in FrameStatistics ctor.
- Add spatial_idx to FrameStatistics ctor.
- Pass FrameStatistics object to AddFrame.

Bug: none
Change-Id: I9d6de449b45a007438f6fd3317176bf45fb23806
Reviewed-on: https://webrtc-review.googlesource.com/101781
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24856}
2018-09-27 08:35:29 +00:00
Jonas Olsson
84df1c724e Make fewer copies when using StringBuilder.
Replace calls to .str() which copies with .Release which moves in cases where that's safe.

This CL was generated by this command:
git grep -l 'StringBuilder' |
xargs perl -i -0 -pe "s/(rtc::StringBuilder (\S+);.*?return )\\g2.str\(\)/\$1\$2.Release\(\)/sg"

Bug: webrtc:8982
Change-Id: If4dadbeb039df010aaaa9e58da81c1971a84fe8f
Reviewed-on: https://webrtc-review.googlesource.com/100307
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24790}
2018-09-24 09:39:19 +00:00
Danil Chapovalov
db1285676b Cleanup modules_common_types
Uninline RTPFragmentaion functions
fix RTPFragmentation move constructor and assign operators (was recursive for win)
replace assert with rtc::dchecked_cast
Remove unused includes and dependencies.
Fix other targets that used those includes transitively instead of directly

Bug: None
Change-Id: I647cb1eda107dc7d87d25234095545bc2842fa40
Reviewed-on: https://webrtc-review.googlesource.com/100500
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24759}
2018-09-18 08:08:33 +00:00
Kári Tristan Helgason
640106e1ce Use different thresholds for ARM and x86 in libvpx tests
and audio processing tests.

Bug: webrtc:8757
Change-Id: Ic748fa624ac84af4556cb4b51718106a10fbb787
Reviewed-on: https://webrtc-review.googlesource.com/98540
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24698}
2018-09-12 08:18:33 +00:00
Jonas Olsson
366a50c4ef Remove simple stringstream usages.
This CL replaces std::o?stringstream with rtc::StringBuilder where that's possible to do without changing any of the surrounding code. It also updates includes and build files as appropriate.

The CL was generated by running 'git grep -l -P std::o?stringstream | xargs perl -pi -e "s/std::o?stringstream/rtc::StringBuilder/g"'. Then I've manually updated the #includes and BUILD files, run 'git cl format' and unstaged any file that would need more complex fixes.

Bug: webrtc:8982
Change-Id: Ibc32153f4a3fd177e260b6ad05ce393972549357
Reviewed-on: https://webrtc-review.googlesource.com/98460
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24605}
2018-09-06 12:53:19 +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
Anders Carlsson
7bca8ca4e2 Obj-C SDK Cleanup
This CL separates the files under sdk/objc into logical directories, replacing
the previous file layout under Framework/.

A long term goal is to have some system set up to generate the files under
sdk/objc/api (the PeerConnection API wrappers) from the C++ code. In the shorter
term the goal is to abstract out shared concepts from these classes in order to
make them as uniform as possible.

The separation into base/, components/, and helpers/ are to differentiate between
the base layer's common protocols, various utilities and the actual platform
specific components.

The old directory layout that resembled a framework's internal layout is not
necessary, since it is generated by the framework target when building it.

Bug: webrtc:9627
Change-Id: Ib084fd83f050ae980649ca99e841f4fb0580bd8f
Reviewed-on: https://webrtc-review.googlesource.com/94142
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24493}
2018-08-30 10:42:41 +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
Kári Tristan Helgason
f16776280f Add config option to run VideoCodecTest in real time.
It's reasonable to allow clients implementing their own VideoCodecTests
to decide wether they should run in real-time.

Removes the IsAsyncCodec helper, as the assumptions it made are outdated,
and it is no longer useful.

Bug: None
Change-Id: If766935d4947555af54f499a30cfe553bde4c1ab
Reviewed-on: https://webrtc-review.googlesource.com/95722
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24478}
2018-08-29 09:19:25 +00:00
Sergey Silkin
1946a3f0fe Add frame rate parameter to SpatialLayer struct.
This will allow us to configure VP9 encoder to produce spatial layers
with different frame rates.

Bug: webrtc:9650
Change-Id: I3a9c58072003b8a8da681d5291d8f7ede7f52fa4
Reviewed-on: https://webrtc-review.googlesource.com/95427
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24435}
2018-08-26 19:19:36 +00:00
Niels Möller
2377588c82 Add accessor methods for RTP timestamp of EncodedImage.
Intention is to make the member private, but downstream callers
must be updated to use the accessor methods first.

Bug: webrtc:9378
Change-Id: I3495bd8d545b7234fbea10abfd14f082caa420b6
Reviewed-on: https://webrtc-review.googlesource.com/82160
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24352}
2018-08-21 09:15:51 +00:00
Niels Möller
a12c42a6b2 Delete root header file typedef.h.
Usage replaced with stdint.h, rtc_base/system/arch.h and
rtc_base/system/unused.h, as appropriate.

Bug: webrtc:6854
Change-Id: I97225465d14b969903d92979e2df3c3c05d35f18
Reviewed-on: https://webrtc-review.googlesource.com/90249
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24100}
2018-07-25 14:59:26 +00:00
Niels Möller
5c302c0ec5 Delete obsolete file call/video_config.h.
It was moved to api/video_codecs/video_encoder_config.h in cl
https://webrtc-review.googlesource.com/77683.

Bug: webrtc:8830
Change-Id: I197fd3270d3dea0a5ec98b22cc675c407c388e93
Reviewed-on: https://webrtc-review.googlesource.com/90243
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24092}
2018-07-25 09:11:39 +00:00
Jiawei Ou
4206a0a849 Exposing video bitrate allocator into API
In order to have public video bitrate allocator factory, the video bitrate allocator has be part of
the api.

Bug: webrtc:9513
Change-Id: Ia2e5ab9eb988c710c1ac492afccc470a92544aa2
Reviewed-on: https://webrtc-review.googlesource.com/88083
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Jiawei Ou <ouj@fb.com>
Cr-Commit-Position: refs/heads/master@{#24073}
2018-07-23 21:23:21 +00:00
Emircan Uysaler
0823eecc93 Reland "Reland "Add Profile 2 configuration to VP9 Encoder and Decoder""
This is a reland of cb853c8f90

Original change's description:
> Reland "Add Profile 2 configuration to VP9 Encoder and Decoder"
>
> This is a reland of fc9c4e88b5
>
> Original change's description:
> > Add Profile 2 configuration to VP9 Encoder and Decoder
> >
> > Bug: webrtc:9376
> > Change-Id: I4f627fb2b6c146a90cfcaa815da459b09dc00003
> > Reviewed-on: https://webrtc-review.googlesource.com/81980
> > Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> > Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Jerome Jiang <jianj@google.com>
> > Cr-Commit-Position: refs/heads/master@{#23917}
>
> Bug: webrtc:9376
> Change-Id: I21fc44865af4e381f99dbc5ae2baf4a53ce834ca
> TBR: niklas.enbom@webrtc.org
> Reviewed-on: https://webrtc-review.googlesource.com/88341
> Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23974}

TBR: niklas.enbom@webrtc.org
Bug: webrtc:9376
Change-Id: I90d7ebc2110b82901656df7f9331ae82ee010baf
Reviewed-on: https://webrtc-review.googlesource.com/88582
Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23977}
2018-07-14 06:51:20 +00:00
Emircan Uysaler
c528c0a07f Revert "Reland "Add Profile 2 configuration to VP9 Encoder and Decoder""
This reverts commit cb853c8f90.

Reason for revert: 
Broke Linux tester on FYI bots, https://ci.chromium.org/buildbot/chromium.webrtc.fyi/Linux%20Tester/46636 .

Original change's description:
> Reland "Add Profile 2 configuration to VP9 Encoder and Decoder"
> 
> This is a reland of fc9c4e88b5
> 
> Original change's description:
> > Add Profile 2 configuration to VP9 Encoder and Decoder
> >
> > Bug: webrtc:9376
> > Change-Id: I4f627fb2b6c146a90cfcaa815da459b09dc00003
> > Reviewed-on: https://webrtc-review.googlesource.com/81980
> > Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> > Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Jerome Jiang <jianj@google.com>
> > Cr-Commit-Position: refs/heads/master@{#23917}
> 
> Bug: webrtc:9376
> Change-Id: I21fc44865af4e381f99dbc5ae2baf4a53ce834ca
> TBR: niklas.enbom@webrtc.org
> Reviewed-on: https://webrtc-review.googlesource.com/88341
> Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23974}

TBR=niklase@google.com,jianj@google.com,sprang@webrtc.org,marpan@google.com,niklas.enbom@webrtc.org,emircan@webrtc.org

Change-Id: I23062a0a2e5feafa29fd36e6b1c4a6e2734c4d68
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9376
Reviewed-on: https://webrtc-review.googlesource.com/88600
Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23976}
2018-07-13 21:13:27 +00:00
Emircan Uysaler
cb853c8f90 Reland "Add Profile 2 configuration to VP9 Encoder and Decoder"
This is a reland of fc9c4e88b5

Original change's description:
> Add Profile 2 configuration to VP9 Encoder and Decoder
>
> Bug: webrtc:9376
> Change-Id: I4f627fb2b6c146a90cfcaa815da459b09dc00003
> Reviewed-on: https://webrtc-review.googlesource.com/81980
> Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Jerome Jiang <jianj@google.com>
> Cr-Commit-Position: refs/heads/master@{#23917}

Bug: webrtc:9376
Change-Id: I21fc44865af4e381f99dbc5ae2baf4a53ce834ca
TBR: niklas.enbom@webrtc.org
Reviewed-on: https://webrtc-review.googlesource.com/88341
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23974}
2018-07-13 19:30:36 +00:00
Qingsi Wang
2d82adea03 Revert "Add Profile 2 configuration to VP9 Encoder and Decoder"
This reverts commit fc9c4e88b5.

Reason for revert: Speculative revert. I suspect this breaks the internal importing tests. Will reland it if it is not the culprit.

Original change's description:
> Add Profile 2 configuration to VP9 Encoder and Decoder
> 
> Bug: webrtc:9376
> Change-Id: I4f627fb2b6c146a90cfcaa815da459b09dc00003
> Reviewed-on: https://webrtc-review.googlesource.com/81980
> Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Jerome Jiang <jianj@google.com>
> Cr-Commit-Position: refs/heads/master@{#23917}

TBR=niklase@google.com,jianj@google.com,sprang@webrtc.org,marpan@google.com,niklas.enbom@webrtc.org,emircan@webrtc.org

Change-Id: I6a8c851827707eb861776591087e595de7206ae4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9376
Reviewed-on: https://webrtc-review.googlesource.com/88100
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23920}
2018-07-11 06:04:49 +00:00
Emircan Uysaler
fc9c4e88b5 Add Profile 2 configuration to VP9 Encoder and Decoder
Bug: webrtc:9376
Change-Id: I4f627fb2b6c146a90cfcaa815da459b09dc00003
Reviewed-on: https://webrtc-review.googlesource.com/81980
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Jerome Jiang <jianj@google.com>
Cr-Commit-Position: refs/heads/master@{#23917}
2018-07-10 22:47:52 +00:00
Sami Kalliomäki
c75a5e8dd6 Change test VideoProcessor kMaxBufferedInputFrames from 10 to 20.
Value 10 seems to be too small for some implementations. Updates the
value to 20. This affects VideoCodecTestFixture.

Bug: None
Change-Id: Ibbeb7cb5ef23f8ac625d37aaa764c9d245f23e9d
Reviewed-on: https://webrtc-review.googlesource.com/87562
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23882}
2018-07-09 11:56:43 +00:00
Erik Språng
5e898d612e Stop using VideoCodec.targetBitrate for vp8 screenshare config
This is a step toward simplifying the VideoCodec struct and removing the
targetBitrate. The hard-coded values now reside in
SimulcastRateAllocator.

A follow-up will do away with the field altogether.

Bug: webrtc:9504
Change-Id: I74d483682309d363048fbbbd31e0607d7242f504
Reviewed-on: https://webrtc-review.googlesource.com/87424
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23876}
2018-07-06 15:13:18 +00:00
Karl Wiberg
918f50c5d1 Use absl::make_unique and absl::WrapUnique directly
Instead of going through our wrappers in ptr_util.h.

This CL was generated by the following script:

  git grep -l ptr_util | xargs perl -pi -e 's,#include "rtc_base/ptr_util.h",#include "absl/memory/memory.h",'
  git grep -l MakeUnique | xargs perl -pi -e 's,\b(rtc::)?MakeUnique\b,absl::make_unique,g'
  git grep -l WrapUnique | xargs perl -pi -e 's,\b(rtc::)?WrapUnique\b,absl::WrapUnique,g'
  git checkout -- rtc_base/ptr_util{.h,_unittest.cc}
  git cl format

Followed by manually adding dependencies on
//third_party/abseil-cpp/absl/memory until `gn check` stopped
complaining.

Bug: webrtc:9473
Change-Id: I89ccd363f070479b8c431eb2c3d404a46eaacc1c
Reviewed-on: https://webrtc-review.googlesource.com/86600
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23850}
2018-07-05 10:59:49 +00:00
Rasmus Brandt
7b92ceb0ee Ensure that input_frames_.size() <= kMaxBufferedInputFrames at enqueue time.
Bug: webrtc:9452
Change-Id: I6d415a2cb24461d7359ff30e6499d65d88d2b2f8
Reviewed-on: https://webrtc-review.googlesource.com/85371
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23846}
2018-07-05 07:08:59 +00:00
Sami Kalliomäki
451b29c49c Make a copy of the frame if the processing has to be posted.
Since the frame is processed on the same thread as the decoding happens
on, keeping a reference to the frame may cause deadlocks on some
implementations.

Longer term, we should probably move the frame processing to a separate
thread but this is an easy fix for now.

Bug: b/110246814
Change-Id: I251737e2188e1755d45b35165586d1b0daf14595
Reviewed-on: https://webrtc-review.googlesource.com/87104
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23843}
2018-07-04 14:11:24 +00:00
Rasmus Brandt
58cd385e58 Fix potential division by zero in VP9 VideoCodecTest.
When GetSvcConfig returned fewer spatial layers than the number
statically configured from the test, we would crash on a SIGFPE.

This is not a problem in the production code, since there we
reset the encoder with the correct number of spatial layers
whenever the resolution changes.

Bug: None
Change-Id: I339e4a3c0fa993c7c649533c0eae71e1314194e7
Reviewed-on: https://webrtc-review.googlesource.com/85374
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23741}
2018-06-26 12:58:25 +00:00
Sergio Garcia Murillo
43800f95bf Generalize SimulcastEncoderAdapter, use for H264 & VP8.
* Move SimulcastEncoderAdapter out under modules/video_coding
* Move SimulcastRateAllocator back out to modules/video_coding/utility
* Move TemporalLayers and ScreenshareLayers to modules/video_coding/utility
* Move any VP8 specific code - such as temporal layer bitrate budgeting -
  under codec type dependent conditionals.
* Plumb the simulcast index for H264 in the codec specific and RTP format data structures.

TBR=sprang@webrtc.org,stefan@webrtc.org,titovartem@webrtc.org

Bug: webrtc:5840
Change-Id: I2d3b130622dd7ceec5528f3ab6c46f109e6bafb8
Reviewed-on: https://webrtc-review.googlesource.com/84743
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23715}
2018-06-21 15:57:43 +00:00
Mirko Bonadei
6f440ed5b5 Revert "Implement H264 simulcast support and generalize SimulcastEncoderAdapter use for H264 & VP8."
This reverts commit 07efe436c9.

Reason for revert: Breaks downstream project.

cricket::GetSimulcastConfig method signature has been updated.
I think you can get away with a default value for temporal_layers_supported (and then you can remove it after a few days when projects will be updated).


Original change's description:
> Implement H264 simulcast support and generalize SimulcastEncoderAdapter use for H264 & VP8.
> 
> * Move SimulcastEncoderAdapter out under modules/video_coding
> * Move SimulcastRateAllocator back out to modules/video_coding/utility
> * Move TemporalLayers and ScreenshareLayers to modules/video_coding/utility
> * Move any VP8 specific code - such as temporal layer bitrate budgeting -
>   under codec type dependent conditionals.
> * Plumb the simulcast index for H264 in the codec specific and RTP format data structures.
> 
> Bug: webrtc:5840
> Change-Id: Ieced8a00e38f273c1a6cfd0f5431a87d07b8f44e
> Reviewed-on: https://webrtc-review.googlesource.com/64100
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23705}

TBR=sprang@webrtc.org,stefan@webrtc.org,mflodman@webrtc.org,hta@webrtc.org,sergio.garcia.murillo@gmail.com,titovartem@webrtc.org,agouaillard@gmail.com

Change-Id: Ic9d3b1eeaf195bb5ec2063954421f5e77866d663
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:5840
Reviewed-on: https://webrtc-review.googlesource.com/84760
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23710}
2018-06-21 13:41:14 +00:00
Sergio Garcia Murillo
07efe436c9 Implement H264 simulcast support and generalize SimulcastEncoderAdapter use for H264 & VP8.
* Move SimulcastEncoderAdapter out under modules/video_coding
* Move SimulcastRateAllocator back out to modules/video_coding/utility
* Move TemporalLayers and ScreenshareLayers to modules/video_coding/utility
* Move any VP8 specific code - such as temporal layer bitrate budgeting -
  under codec type dependent conditionals.
* Plumb the simulcast index for H264 in the codec specific and RTP format data structures.

Bug: webrtc:5840
Change-Id: Ieced8a00e38f273c1a6cfd0f5431a87d07b8f44e
Reviewed-on: https://webrtc-review.googlesource.com/64100
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23705}
2018-06-21 12:23:03 +00:00
Yves Gerey
665174fdbb Reformat the WebRTC code base
Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
2018-06-19 14:00:39 +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
Niels Möller
e3cf3d0496 Use enum class for VideoCodecMode and VideoCodecComplexity.
Bug: webrtc:7660
Change-Id: I6a8ef01f8abcc25c8efaf0af387408343a7c8ba3
Reviewed-on: https://webrtc-review.googlesource.com/81240
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23595}
2018-06-13 12:26:09 +00:00
Patrik Höglund
443e71f528 Revert "Disabling VeryLowBitrateVP9 to unblock roll."
This reverts commit 16e28d143a.

Reason for revert: Fix has supposedly landed upstream.

Original change's description:
> Disabling VeryLowBitrateVP9 to unblock roll.
> 
> This should be re-enabled very soon since the libvpx thinks this
> is fixed upstream and is only waiting for merge.
> 
> TBR=marpan@google.com
> 
> Bug: webrtc:9292
> Change-Id: Ib78ea1462059c333b7168a52756329dc9a385b54
> Reviewed-on: https://webrtc-review.googlesource.com/81660
> Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23525}

TBR=phoglund@webrtc.org,marpan@google.com

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

Bug: webrtc:9292
Change-Id: I995953070536e8ee3540e7c30bc11dc1200e0463
Reviewed-on: https://webrtc-review.googlesource.com/82200
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23552}
2018-06-08 13:55:25 +00:00
Rasmus Brandt
5e8fd8ad49 Add simulcastStream output from VideoCodecTestFixture::Config::ToString.
Bug: None
Change-Id: I06c6ac077bb31608b4776e90d548a6e71ca1c252
Reviewed-on: https://webrtc-review.googlesource.com/81186
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23541}
2018-06-08 07:37:50 +00:00
Rasmus Brandt
086de82f51 Add bitrate_priority to GetSimulcastConfig call.
Bug: webrtc:9368
Change-Id: I72317493db02835362c0e6127e6e4c25a5709d63
Reviewed-on: https://webrtc-review.googlesource.com/81661
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23540}
2018-06-08 07:04:44 +00:00
Patrik Höglund
16e28d143a Disabling VeryLowBitrateVP9 to unblock roll.
This should be re-enabled very soon since the libvpx thinks this
is fixed upstream and is only waiting for merge.

TBR=marpan@google.com

Bug: webrtc:9292
Change-Id: Ib78ea1462059c333b7168a52756329dc9a385b54
Reviewed-on: https://webrtc-review.googlesource.com/81660
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23525}
2018-06-07 07:34:27 +00:00
Sergey Silkin
ee20336f6e Drop entire superframe if any layer is overshooting.
Use new frame dropping mode - FULL_SUPERFRAME_DROP - in VP9 encoder and
configure it to drop entire superframe if any layer is overshooting.

Bug: none
Change-Id: Ie22ed5c175e530bcce365d40cba0d10cb608ad4f
Reviewed-on: https://webrtc-review.googlesource.com/79622
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23447}
2018-05-30 11:23:15 +00:00
Rasmus Brandt
2aae2733a7 Remove adapter bools from VideoCodecTestFixture::Config.
It should be the responsibility of the fixture user to provide the exact
codecs that should be tested instead. This reduces the coupling between
the test fixture and the codec instantiation.

Bug: webrtc:9317
Change-Id: I60d8f5c4b516ba33e2293d574ba17602c39f992b
Reviewed-on: https://webrtc-review.googlesource.com/79147
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23425}
2018-05-29 08:02:13 +00:00
Rasmus Brandt
7c1ccfa881 Move VisualizationParams to VideoCodecTestFixture::Config.
Bug: None
Change-Id: I0a725535c840dda2704dfff33f5e5d3bef3fc0a7
Reviewed-on: https://webrtc-review.googlesource.com/78882
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23422}
2018-05-29 07:18:04 +00:00
Ilya Nikolaevskiy
97b4ee5b4c Wire up VAAPI VP8 experimental support in WebRTC.
Experiment flag added to PeerConnectionInterface::RtcConfiguration and
propagated down to VideoStreamEncoder.

Artificial Sdp parameter is added to the sdp format if the flag is set.

Additionally, sdp format is propagated in vp8 simulcast adapters.

Bug: chromium:794608
Change-Id: I2dec54d19ae7bfbd5f2777ec682da5a84194da94
Reviewed-on: https://webrtc-review.googlesource.com/78500
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23412}
2018-05-28 12:30:19 +00:00
Rasmus Brandt
bc84685497 Remove VideoCodecTestFixtureImpl dependency on Android specifics.
This is needed for downstream users of the impl, as we currently pull
in Chromium specifics in the android_codec_factory_helper. Further,
the downstream users should explicitly supply their own factories
if they do not want to use the internal ones.

Bug: None
Change-Id: Ia7b01a66aadaba3d5accf44e5ca38e1a319e4e34
Reviewed-on: https://webrtc-review.googlesource.com/78420
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23390}
2018-05-24 16:20:11 +00:00
Kári Tristan Helgason
169005d8c1 Move VideoCodecTest configuration classes to api/test.
These files are required when implementing tests based on the test fixture,
and should be exposed as part of the test api.

This CL also removes a usage of stringstream and fixes some chromium-style
lint issues.

Bug: webrtc:8982, webrtc:163
Change-Id: I132aea0da79a79587887f21897236fc9802b7574
Reviewed-on: https://webrtc-review.googlesource.com/74586
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23346}
2018-05-22 12:14:38 +00:00
Niels Möller
401d07690b Delete deprecated VideoDecoder::Decode method
Follow up to https://webrtc-review.googlesource.com/c/src/+/39511,
which introduced a new Decode method, without the
RTPFragmentationHeader argument, and deprecated the old method.

Bug: webrtc:6471
Change-Id: Icd3c536ebedd4e3c2d57fdb4d6e078d6ff1de5b6
Reviewed-on: https://webrtc-review.googlesource.com/75180
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23339}
2018-05-22 08:17:03 +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
Kári Tristan Helgason
8eeda499f7 Enable more VideoCodecTests on iOS.
Bug: webrtc:4755
Change-Id: I403834dbe04cc3899847eb10e5595a24e6001507
Reviewed-on: https://webrtc-review.googlesource.com/76602
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23273}
2018-05-17 09:13:31 +00:00
Rasmus Brandt
8dd4db49e2 Create/destroying codecs on task queue + switch to TaskQueueForTest.
After https://webrtc-review.googlesource.com/c/src/+/70740, we are
creating/destroying the codecs on a task queue in the VideoStreamEncoder. This
CL updates the VideoCodecTest to do the same.

Also, this CL switches from manually Wait()'ing on the task queue to using
TaskQueueForTest::SendTask.

Bug: None
Change-Id: Ia0398b24e32e9cc5361ba5ee4c08441116def18e
Reviewed-on: https://webrtc-review.googlesource.com/76800
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23257}
2018-05-16 08:15:23 +00:00
Rasmus Brandt
8694f29b30 Rename VideoProcessorIntegrationTest -> VideoCodecTest.
This CL simply renames the test cases that were not renamed in
prior CLs.

Bug: None
Change-Id: If616eb823e1453bc92ba037722b77a219d54409c
Reviewed-on: https://webrtc-review.googlesource.com/76780
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23240}
2018-05-15 11:28:21 +00:00
Rasmus Brandt
a7e4844298 Move H.264 codec test activation directly behind build flag.
Bug: None
Change-Id: I5dd366aba16b440a8e99826e116db0d6b68bf844
Reviewed-on: https://webrtc-review.googlesource.com/76621
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23231}
2018-05-15 08:00:00 +00:00
Sergey Silkin
dfe8ca0d43 Layering and rate allocation for VP9 screen sharing.
- Two quality layers (same resolution, different bitrate).
- Max bitrate of low layer is limited to 200kbps. The choice of the
limit is driven by VP8 screen sharing which limits max bitrate of low
temporal layer to 200kbps. Using the same value for VP9 guarantees
that there will be no regressions for participants with limited
bandwidth.
- Max bitrate of high layer is limited to 500kbps. According to test
results this value is enough to get up to +5dB higher PSNR than VP8
SS provides on 1.2Mbps (max total bitrate for VP8 SS) link.
- Max total sent bitrate is limited to 700kbps. It is 500kbps lower
than that in VP8 SS (1200kbps).

Bug: webrtc:9261
Change-Id: I7919cc3933064664567c39e380a44cad0c65f1e8
Reviewed-on: https://webrtc-review.googlesource.com/76380
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23226}
2018-05-15 07:06:10 +00:00
Sami Kalliomäki
ee98be7811 Fix handling non-tightly packed ByteBuffers in HardwareVideoDecoder.
Before this CL, there would be an out-of-bounds write in the ByteBuffer
copying when a decoded frame had height != sliceHeight.

Bug: webrtc:9194
Change-Id: Ibb80e5555e8f00d9e1fd4cb8a73f5e4ccd5a0b81
Tested: 640x360 loopback with eglContext == null in AppRTCMobile on Pixel.
Reviewed-on: https://webrtc-review.googlesource.com/74120
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23184}
2018-05-09 09:15:46 +00:00
Kári Tristan Helgason
9d96e92316 Rewrite videoprocessor integrationtest to use public fixture.
This CL creates a test fixture for the videoprocessor integration tests
and exposes it as part of the public API. It also rewrites the current
versions of the tests to build on this new paradigm. The motivation for
this is to easily allow projects that build on top of webrtc to add
integration-level tests for their own custom codec implementations in a
way that does not link them too tightly to the internal implementations
of said tests.

Bug: None
Change-Id: I7cf9f29322a6934b3cfc32da02ea7dfa5858c2b2
Reviewed-on: https://webrtc-review.googlesource.com/72481
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23118}
2018-05-04 12:02:44 +00:00
Kári Tristan Helgason
cad94449dd Remove H264 CHP field trial code.
Bug: webrtc:8317
Change-Id: I2da3cc6578dd8ff6e88052bc33cd38cb92af46dc
Reviewed-on: https://webrtc-review.googlesource.com/73242
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23077}
2018-05-02 13:42:37 +00:00
Sergey Silkin
5613879b7b Fill drops with last decoded frame.
Fill drops with last decoded frame to make them look like freeze at
playback and to keep decoded spatial layers in sync.

Bug: none
Change-Id: I65f7c21100985c22932a1edd441b6c724833c11e
Reviewed-on: https://webrtc-review.googlesource.com/73685
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23076}
2018-05-02 10:46:06 +00:00
Sergey Silkin
3c30c9cb9f Decode base reference frame if current layer was dropped.
If frame of current layer was dropped, pass base frame to decoder if
non_ref_for_inter_layer_pred is set to true.

Bug: none
Change-Id: If7bf5220b74f424106edf74867c9afa8cc2b1ec5
Reviewed-on: https://webrtc-review.googlesource.com/73440
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23074}
2018-05-02 10:17:01 +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
Niels Möller
65fb4049c1 Don't expose resilience mode in VP8 and VP9 configuration.
This deletes the resilienceOn flag in VideoCodecVP8 and VideoCodecVP9.
Instead, the implementations of VP8 and VP9 set resilience mode
internally, based on the configuration of temporal and spatial layers.

The nack_enabled argument to VideoCodecInitializer::SetupCodec becomes
unused with this cl. In a followup, it will be deleted, together with
the corresponding argument to VideoStreamEncoder methods.

An applications which really wants to configure resilience differently
can do that by injecting an EncoderFactory with encoders behaving
as desired.

Bug: webrtc:8830
Change-Id: I9990faf07d3e95c0fb4a56fcc9a56c2005b4a6fa
Reviewed-on: https://webrtc-review.googlesource.com/71380
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23025}
2018-04-25 13:54:33 +00:00
Rasmus Brandt
cd7da92012 Add MediaCodec VP tests for uncommon resolutions.
Bug: None
Change-Id: Ibfc35af3635c3b3a50027c4cd828f78e7a438dcd
Reviewed-on: https://webrtc-review.googlesource.com/72342
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23020}
2018-04-25 11:31:13 +00:00
Rasmus Brandt
abc821cd31 Allow multiple calls to ProcessFramesAndMaybeVerify with frame writers enabled.
Bug: None
Change-Id: Ic6e52401ec2db3d0bcaca3605c28763123a4eeb8
Reviewed-on: https://webrtc-review.googlesource.com/72343
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23016}
2018-04-25 09:46:13 +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
Niels Möller
e8a9c45cc1 Delete enum VP8ResilienceMode.
We only support on (formely kResilientStream) and off (formely
kResilienceOff). The third mode, kResilientFrames, was not
implemented.

Bug: None
Change-Id: Ida82f6a33eda9d943ea70bc8ae4e6bddb720b0e8
Reviewed-on: https://webrtc-review.googlesource.com/71481
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22984}
2018-04-23 15:10:26 +00:00
Sergey Silkin
bfd54ef5cb Round down when converting layer bitrate from bits to kilobits.
This aligns rounding in videoprocessor with rounding in encoder wrappers.

Bug: none
Change-Id: I8bdab7c02628b433d35d63c4bf4c841ffb1c2d1b
Reviewed-on: https://webrtc-review.googlesource.com/69983
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22880}
2018-04-16 14:00:18 +00:00
Sergey Silkin
bc20fe1221 Rename spatial/temporal index variables and fields in videoprocessor.
This fixes inconsistency in names of variables and fields which
represent spatial/temporal index of layer:
simulcast_svc_idx -> spatial_idx
spatial_layer_idx -> spatial_idx
temporal_layer_idx -> temporal_idx

Also, this adds printing of spatial/temporal index and target bitrate
to RD report.

Bug: none
Change-Id: Ic4dfdadc57a1577bb3d35d1782a152a9dbef0280
Reviewed-on: https://webrtc-review.googlesource.com/69981
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22869}
2018-04-16 08:09:27 +00:00
Kári Tristan Helgason
8cbb1c9162 Make Videoprocessor integration test stringly typed.
This allows use of arbitrarily-named codecs.

Bug: None
Change-Id: If7ecbfe3ae8f08f8ebfb224219ef9192a4a0b884
Reviewed-on: https://webrtc-review.googlesource.com/69681
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22860}
2018-04-13 13:17:48 +00:00
Kári Tristan Helgason
c3f8c759c4 Add ability for inject custom codec factories in VP integration test.
This makes it easier to add new test cases without modifying the actual test class.

Bug: None
Change-Id: I48e4f14e26cd6610678ffb07ce9fd56e6bc1ac4e
Reviewed-on: https://webrtc-review.googlesource.com/69600
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22840}
2018-04-12 15:45:36 +00:00
Sergey Silkin
e3b5b6e50b Exclude first frames from RD perf analysis.
It takes some time for rate controller to adapt to content. Quality of first
frames is usually worse than quality of following frames. It makes sense to
exclude first frames from analysis and, thus, avoid negative affect of this
interval on overall results.

Bug: none
Change-Id: Ib0a258889750cf794c7d6fdff26af958f7bbe48a
Reviewed-on: https://webrtc-review.googlesource.com/66100
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22782}
2018-04-08 19:07:14 +00:00
Sergey Silkin
645e2e0a29 Handle per-layer frame drops.
Pass base layer frame to upper layer decoder if inter-layer prediction
is enabled and encoder dropped upper layer.

Bug: none
Change-Id: I4d13790caabd6469fc0260d8c0ddcb3dabbfb86e
Reviewed-on: https://webrtc-review.googlesource.com/65980
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22762}
2018-04-06 08:40:22 +00:00
Sergey Silkin
a31018090e Disable H264 videotoolbox unit tests on iOS builds.
The tests fail when running on internal test bots.

Bug: webrtc:9099
Change-Id: I89a537fe46ac56891f90e9722055218fd9e87ecf
Reviewed-on: https://webrtc-review.googlesource.com/66400
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22723}
2018-04-04 10:54:59 +00:00
Sergey Silkin
c89eed92ad Get pure encode time.
Measure time spent in frame encode callback, accumulate it for layers
and subtract it from measured encode time of next layer frame.

Bug: none
Change-Id: Ifc3baae2f9a49913a55a7de2de9507102edd0295
Reviewed-on: https://webrtc-review.googlesource.com/65981
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22720}
2018-04-04 09:32:39 +00:00
Sergey Silkin
bace350feb Print more frame statistic.
- Print per-plane PSNR.
- Print inter_layer_predicted flag.

Bug: none
Change-Id: I6bc899602252ccca37440eb455dc860d51d87f2f
Reviewed-on: https://webrtc-review.googlesource.com/66080
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22701}
2018-04-03 08:44:39 +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
Sergey Silkin
1d2b627438 Use frame generator in video codec unit tests.
There is no need to use real video as input for encoder in unit tests.
Using generator simplifies testing on mobile devices (no need to upload
files to device).

Bug: none
Change-Id: Ic48609cc6f8eecf90d9956edfdd33135be949398
Reviewed-on: https://webrtc-review.googlesource.com/64526
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22648}
2018-03-28 13:07:16 +00:00
Sergey Silkin
122ba6c050 Handle per-layer frame drops.
Build superframe out of the nearest non-dropped base layer and current layer.

Bug: none
Change-Id: I26720ea6de44f27046208b220d03942cd2a3d6c7
Reviewed-on: https://webrtc-review.googlesource.com/64921
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22631}
2018-03-27 16:07:41 +00:00
Rasmus Brandt
6e09160552 Loosen |max_avg_buffer_level_sec| for SimulcastVP8.
Have not figured out why this metric regressed, but submitting
this CL now to unblock Chromium roll into WebRTC.

Bug: webrtc:9057
Change-Id: I808ad194e1c9107d644a25502a55a7c6fddca7aa
Reviewed-on: https://webrtc-review.googlesource.com/64527
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22600}
2018-03-26 11:14:11 +00:00
Erik Språng
82fad3d513 Remove TemporalLayersFactory and associated classes
As the rate allocation has been moved into entirely into
SimulcastRateAllocator, and the listeners are thus no longer needed,
this class doesn't fill any other purpose than to determine if
ScreenshareLayers or TemporalLayers should be created for a given
simulcast stream. This can however be done just from looking at the
VideoCodec instance, so changing this into a static factory method.

Due to dependencies from upstream projects, keep the class name and
field in VideoCodec around for now.

Bug: webrtc:9012
Change-Id: I028fe6b2a19e0d16b35956cc2df01dcf5bfa7979
Reviewed-on: https://webrtc-review.googlesource.com/63264
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22529}
2018-03-21 10:20:48 +00:00
Rasmus Brandt
d00c8951cd Add ability to disable decode in VideoProcessor.
Bug: webrtc:8448
Change-Id: Iabbf2fa0238b868c5f3869eb0ca542ffa9df7386
Reviewed-on: https://webrtc-review.googlesource.com/61660
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22429}
2018-03-14 14:36:35 +00:00
Sergey Silkin
8d3758e610 Calculate and report PSNR for Y, U, V planes separately.
Bug: webrtc:8448
Change-Id: Ia5b2b2f3ebac9ea7d1efbb3079b0bc3438a54a09
Reviewed-on: https://webrtc-review.googlesource.com/61324
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22420}
2018-03-14 10:57:50 +00:00
Rasmus Brandt
0f1c0bd326 Add async simulcast support to VideoProcessor.
For the buffering of |input_frames_|, we assume that frames
are ordered per simulcast layer but we make no assumptions
between layers.

For SVC, we still assume ordering of encode callbacks for
the spatial layers. If we ever add async codecs that support SVC,
they should still obey this assumption.

Bug: webrtc:8448
Change-Id: I4ebb0c1e1d0eef41d850ed5b92aacc79d0a11137
Reviewed-on: https://webrtc-review.googlesource.com/60801
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22380}
2018-03-12 09:36:39 +00:00
Sergey Silkin
d4bc01b7dd Added printing of frame level statistics.
Bug: none
Change-Id: I0fa607c4f26ccf2bceac116c7869698c9d16cfa3
Reviewed-on: https://webrtc-review.googlesource.com/61000
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22364}
2018-03-09 14:20:54 +00:00
Rasmus Brandt
d062a3c626 Prepare VideoProcessor for async simulcast support.
* Add support for SimulcastEncoderAdapter wrapping of encoder.
* Store input frame timestamps out-of-band, so we don't need to keep
  a raw VideoFrame around just for it's timestamp.
* Store current frame rate in |framerate_fps_|, instead of in
  codec settings struct.
* Add some comments and reorder some data members.
* Explicitly include VideoBitrateAllocator.
* Change type of |input_frames_|, to avoid one layer of indirection.
* Move VideoProcessor::CalculateFrameQuality to anonymous namespace.

This change should have no functional implications.

Bug: webrtc:8448
Change-Id: I10c140eeda750d9bd37bfb6cb1e8acb401fb91d3
Reviewed-on: https://webrtc-review.googlesource.com/60520
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22346}
2018-03-08 17:41:13 +00:00
Rasmus Brandt
bbf146587a Delete dead code for video quality calculation.
Previously, the only user of this code was the
VideoProcessorIntegrationTest. We have now changed that
test to directly calculate image quality metrics using libyuv,
similar to how the full stack tests and browser tests work.

Bug: webrtc:8448
Change-Id: Ia7a607d7ddc37741fba76d56aa7297851ffa1c6b
Reviewed-on: https://webrtc-review.googlesource.com/43760
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22341}
2018-03-08 14:05:03 +00:00
Rasmus Brandt
e90636adc2 Codec instantiation tests for testing device capabilities in batch.
Change-Id: I465fb165bec9d6501015ec57d13fb556c4cb532b
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/58643
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22284}
2018-03-05 10:01:02 +00:00
Kári Tristan Helgason
6375ef7dfb Enable VideoProcessorIntegrationTest on devices.
These tests cannot run on simulators but should be enabled on real device
bots in order to catch regressions or crashes in the iOS codecs.

Bug: webrtc:8950
Change-Id: I8e877aa4368683073fdb4586cd6f4add4a1284ad
Reviewed-on: https://webrtc-review.googlesource.com/59040
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22283}
2018-03-05 09:52:32 +00:00
Sergey Silkin
a796a7ee85 Reland "Replaced temporal_layer_thresholds_bps[] field with num_temporal_layers."
This reverts commit e27e0aca94.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Replaced temporal_layer_thresholds_bps[] field with num_temporal_layers."
> 
> This reverts commit d2ed0a4c9e.
> 
> Reason for revert: Breaks downstream projects.
> 
> Original change's description:
> > Replaced temporal_layer_thresholds_bps[] field with num_temporal_layers.
> > 
> > temporal_layer_thresholds_bps served only one purpose: its size was used
> > to infer number of temporal layers. I replaced it with num_temporal_layers,
> > which does what is says.
> > 
> > The practical reason for this change is the need to have possibility to
> > distinguish between cases when VP9 SVC temporal layering was/not set
> > through field trial. That was not possible with
> > temporal_layer_thresholds_bps[] because empty vector means 1 temporal
> > layer.
> > 
> > Bug: webrtc:8518
> > Change-Id: I275ec3a8c74e8ba409eb049878199f132a20ec51
> > Reviewed-on: https://webrtc-review.googlesource.com/58084
> > Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#22230}
> 
> TBR=sprang@webrtc.org,stefan@webrtc.org,ssilkin@webrtc.org
> 
> Change-Id: Ic2940f7f78a74312170940d51ad8967cde8ad42f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:8518
> Reviewed-on: https://webrtc-review.googlesource.com/58902
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22234}

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

Change-Id: I1900c6b845b9baa9430fb72c3f4e7f2a44b3a8b1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8518
Reviewed-on: https://webrtc-review.googlesource.com/59160
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22256}
2018-03-01 18:07:29 +00:00
Rasmus Brandt
5f7a891257 Minor improvements to TestConfig and VideoProcessor.
* Do not simulate freeze in decoded output file when frames have been dropped.
* Add more DCHECKs and consts.
* Remove unused members |num_encoded_frames_| and |num_decoded_frames_|.
* Move SdpVideoFormat conversion to TestConfig.

Bug: webrtc:8448
Change-Id: Ia879141f36dc23427cd1abcaa66716656fbaac2a
Reviewed-on: https://webrtc-review.googlesource.com/56802
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22239}
2018-03-01 08:42:43 +00:00
Philip Eliasson
e27e0aca94 Revert "Replaced temporal_layer_thresholds_bps[] field with num_temporal_layers."
This reverts commit d2ed0a4c9e.

Reason for revert: Breaks downstream projects.

Original change's description:
> Replaced temporal_layer_thresholds_bps[] field with num_temporal_layers.
> 
> temporal_layer_thresholds_bps served only one purpose: its size was used
> to infer number of temporal layers. I replaced it with num_temporal_layers,
> which does what is says.
> 
> The practical reason for this change is the need to have possibility to
> distinguish between cases when VP9 SVC temporal layering was/not set
> through field trial. That was not possible with
> temporal_layer_thresholds_bps[] because empty vector means 1 temporal
> layer.
> 
> Bug: webrtc:8518
> Change-Id: I275ec3a8c74e8ba409eb049878199f132a20ec51
> Reviewed-on: https://webrtc-review.googlesource.com/58084
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22230}

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

Change-Id: Ic2940f7f78a74312170940d51ad8967cde8ad42f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8518
Reviewed-on: https://webrtc-review.googlesource.com/58902
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22234}
2018-02-28 16:01:32 +00:00
Sergey Silkin
d2ed0a4c9e Replaced temporal_layer_thresholds_bps[] field with num_temporal_layers.
temporal_layer_thresholds_bps served only one purpose: its size was used
to infer number of temporal layers. I replaced it with num_temporal_layers,
which does what is says.

The practical reason for this change is the need to have possibility to
distinguish between cases when VP9 SVC temporal layering was/not set
through field trial. That was not possible with
temporal_layer_thresholds_bps[] because empty vector means 1 temporal
layer.

Bug: webrtc:8518
Change-Id: I275ec3a8c74e8ba409eb049878199f132a20ec51
Reviewed-on: https://webrtc-review.googlesource.com/58084
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22230}
2018-02-28 14:46:03 +00:00
Sergey Silkin
556270c4d9 Remove FourPeople_1280x720_30.yuv from resources for mobile builds.
Uploading of the file to device causes timeouts. I removed it from
resources for iOS and Android builds and disabled the test that used
the file since we don't really need to run it on test bots.

Bug: webrtc:8936
Change-Id: Ia5e04c4630544eca8e56826c9e89c9c9f4dcb600
Reviewed-on: https://webrtc-review.googlesource.com/58090
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22222}
2018-02-28 09:55:20 +00:00
Rasmus Brandt
3f06c3bf04 Change text output from VideoProcessor slightly.
Changes:
* Prefix sections with "==>" and "-->" headers.
* Add some more newlines.

Motivation: Make output more quickly parsed by humans.

BUG=webrtc:8448

Change-Id: I02118e2c25eeae3534285cfe756d8b4818997659
Reviewed-on: https://webrtc-review.googlesource.com/56120
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22153}
2018-02-22 14:32:58 +00:00
Rasmus Brandt
defad847b1 Add batch script for running multiple VideoProcessor tests in parallel.
This script is for running on device tests in parallel.

BUG=webrtc:8448
NOTRY=TRUE

Change-Id: I6b13f76223653ddb6ec999613ef66ac4f82d8567
Reviewed-on: https://webrtc-review.googlesource.com/55561
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22117}
2018-02-21 08:00:06 +00:00
Sergey Silkin
06a8f304ef Moved analysis to Stats.
Slicing, aggregation and analysis has been moved to Stats class.
Data of all spatial layers is stored in single Stats object.

Bug: webrtc:8524
Change-Id: Ic9a64859a36a1ccda661942a201cdeeed470686a
Reviewed-on: https://webrtc-review.googlesource.com/50301
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22094}
2018-02-20 09:48:41 +00:00
Rasmus Brandt
75e38d2dc3 Remove unused fields from VideoCodecVP8.
Bug: None
Change-Id: I6f29ad5ce04582003e9be7292d04ea18f9335372
Reviewed-on: https://webrtc-review.googlesource.com/47660
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21973}
2018-02-09 15:55:59 +00:00
Sergey Silkin
597472ebc3 Removing kNoVisualizationParams. Use nullptr directly.
Bug: none
Change-Id: Ifcffdf37d0dc4b9caa47b1117fc14e21bffe2cd9
Reviewed-on: https://webrtc-review.googlesource.com/49942
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21965}
2018-02-09 07:52:54 +00:00
Rasmus Brandt
2018823a68 Remove unused field |output_filename| from TestConfig.
Bug: webrtc:8448
Change-Id: I8bb35f6d66112c6590564815e10cb4ec7b516268
Reviewed-on: https://webrtc-review.googlesource.com/49820
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21960}
2018-02-08 15:23:19 +00:00
Rasmus Brandt
4b381afd8e Enforce that VideoProcessor is only run on a TaskQueue.
Prior to this change, the VideoProcessor was run on the main thread
in the unit tests. Using a TaskQueue there instead, we can be
stricter in the thread checks.

Bug: webrtc:8524
Change-Id: Ice7b68f7344fc52801dff7a98cbc219b7231bfbc
Reviewed-on: https://webrtc-review.googlesource.com/48921
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21942}
2018-02-07 15:42:21 +00:00
Rasmus Brandt
17cdcbb57b Access ImplementationName() from task queue.
Accessing this method from the test thread is illegal,
but doesn't always fail.

Bug: webrtc:8524
Change-Id: Ie0e84cc2fb63268fb6d7cbf0c3a58cb35312c16b
Reviewed-on: https://webrtc-review.googlesource.com/49061
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21930}
2018-02-07 12:38:48 +00:00
Rasmus Brandt
f105325a55 Move all Android specific stuff to android_codec_factory_helper.
This helps separate concerns, so that the VideoProcessorIntegrationTest
is almost oblivious to the fact that it needs to connect to the JVM
to get the Android HW codecs.

Bug: webrtc:8448
Change-Id: I4359b31f84be48eaf99d83525bcce6e593e874f8
Reviewed-on: https://webrtc-review.googlesource.com/47384
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21890}
2018-02-05 13:08:26 +00:00
Rasmus Brandt
98a867ccd2 Rename VideoCodecTest to VideoCodecUnitTest.
The VideoCodecTest class is a fixture base class for the
libvpx-VP8, libvpx-VP9, and OpenH264 unit tests. It is unrelated
to the VideoProcessor tests, which we colloquially refer to as
the "codec test".

This rename is thus to reduce this confusion. It should have no
functional impact.

Bug: webrtc:8448
Change-Id: If73443bda5df0f29a71ce6ce069ac128795ff0ad
Reviewed-on: https://webrtc-review.googlesource.com/47160
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21867}
2018-02-02 10:27:33 +00:00
Anders Carlsson
3ff50fba59 Create experimental Obj-C++ API.
This can be used to wrap Objective-C components in C++ classes, so users
can use the WebRTC C++ API directly together with the iOS specific
components provided by our SDK.

Bug: webrtc:8832
Change-Id: I6d34f7ec62d51df8d3a5340a2e17d30ae73e13e8
Reviewed-on: https://webrtc-review.googlesource.com/46162
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21850}
2018-02-01 16:36:24 +00:00
Sergey Silkin
10d9d59db1 Adding simulcast/spatial layering support to VideoProcessor.
Encoded frames are preserved and decoded after all layers are
encoded.
Each spatial layer is decoded with separate decoder.
For quality evaluation of lowres layers original input frame is
downscaled with bilinear interpolation.
Encoded and decoded frames are dumped into separate files.

For async codecs encoded frames are passed to decoder in encode
callback, as before.

Bug: webrtc:8524
Change-Id: Idb0c92c7274c1915cff9a011a2794f1cf4bc8cb1
Reviewed-on: https://webrtc-review.googlesource.com/43381
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21844}
2018-02-01 13:28:46 +00:00
Sami Kalliomäki
82f96e6a56 Create an experimental Android NDK.
Following files were split:
sdk/android/native_api/jni_helpers.h
  -> sdk/android/native_api/jni/java_types.h
sdk/android/native_api/jni_helpers.cc
  -> sdk/android/native_api/jni/java_types.cc

Skipping presubmit to avoid changing moved code.

Bug: webrtc:8769

Change-Id: I0ef0f6b297b5002322915660d26cca33e91ff05b
No-Presubmit: true
Reviewed-on: https://webrtc-review.googlesource.com/40800
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21799}
2018-01-30 09:33:42 +00:00
Åsa Persson
91af24a74b Fix backward jump in timestamp if framerate increases in video processor tests.
Bug: none
Change-Id: Id905eb5ea546d5cf8a2fee70f3e262155e293f4e
Reviewed-on: https://webrtc-review.googlesource.com/43360
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21756}
2018-01-25 08:39:01 +00:00
Sergey Silkin
53a2d8a6c7 One decoder/writer per simulcast/spatial layer.
Each simulcast stream requires dedicated decoder for decoding. SVC
can be decoded by single decoder. But in prod each receiver has its
decoder. We want to replicate this and also use one decoder per
spatial layer.

Also we create one frame writer per simulcast/spatial layer to dump
encoded/decoded frames of different layers to separate files.

Note that videoprocessor is still initialized with single
decoder/writer. It will be updated in next CL and start using
separate decoder/writer per layer.

Bug: webrtc:8524
Change-Id: I3bb3de77f97d51138b8b7675dd01bc281a078b2f
Reviewed-on: https://webrtc-review.googlesource.com/43280
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21744}
2018-01-24 13:45:58 +00:00
Sergey Silkin
b7d7301d7e Added number of simulcast/spatial layers to TestConfig.
These parameters allow to configure number of simulcast/spatial layers
in video codec tests.

Bug: webrtc:8524
Change-Id: Iad1332732758a8297abcf740c24c483e5fccec9a
Reviewed-on: https://webrtc-review.googlesource.com/43020
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21741}
2018-01-24 07:31:51 +00:00
Sergey Silkin
1723cf9fa2 Get rid of packet loss related stuff from videoprocessor.
This feature is not needed in video codec testing framework. In WebRTC
video codecs never deal with packet loss. Packet loss is handled by
jitter buffer which prevents passing of incomplete frames to decoder.

Bug: webrtc:8768
Change-Id: I211cf51d913bec6a1f935e30691661d428ebd3b6
Reviewed-on: https://webrtc-review.googlesource.com/40740
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21722}
2018-01-22 15:45:58 +00:00
Åsa Persson
a6e7b88198 Move rtp_timestamp_to_frame_num_ map from VideoProcessor to Stats class.
Let Stats class handle rtp timestamp to frame number mapping.

Bug: none
Change-Id: I2a29c89a25c75c4bbd6c6368a5d10514f90b3c42
Reviewed-on: https://webrtc-review.googlesource.com/41220
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21709}
2018-01-22 09:02:56 +00:00
Åsa Persson
9e539f0959 Remove min/max/avg parsing of stats.
No stats is logged in this format any longer.

Bug: none
Change-Id: I5f91e93636b6d03ebd91c3b2518857275fb94de7
Reviewed-on: https://webrtc-review.googlesource.com/40700
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21690}
2018-01-19 08:21:39 +00:00
Sergey Silkin
3be2a55e7f Reland "Updated analysis in videoprocessor."
This is a reland of 1880c7162b
Original change's description:
> Updated analysis in videoprocessor.
>
> - Run analysis after all frames are processed. Before part of it was
> done at bitrate change points;
> - Analysis is done for whole stream as well as for each rate update
> interval;
> - Changed units from number of frames to time units for some metrics
> and thresholds. E.g. 'num frames to hit tagret bitrate' is changed to
> 'time to reach target bitrate, sec';
> - Changed data type of FrameStatistic::max_nalu_length (renamed to
> max_nalu_size_bytes) from rtc::Optional to size_t. There it no need to
> use such advanced data type in such low level data structure.
>
> Bug: webrtc:8524
> Change-Id: Ic9f6eab5b15ee12a80324b1f9c101de1bf3c702f
> Reviewed-on: https://webrtc-review.googlesource.com/31901
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21653}

TBR=brandtr@webrtc.org, stefan@webrtc.org

Bug: webrtc:8524
Change-Id: Ie0ad7790689422ffa61da294967fc492a13b75ae
Reviewed-on: https://webrtc-review.googlesource.com/40202
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21668}
2018-01-18 08:37:27 +00:00
Sergey Silkin
18bc3e19c4 Revert "Updated analysis in videoprocessor."
This reverts commit 1880c7162b.

Reason for revert: breaks internal tests

Original change's description:
> Updated analysis in videoprocessor.
> 
> - Run analysis after all frames are processed. Before part of it was
> done at bitrate change points;
> - Analysis is done for whole stream as well as for each rate update
> interval;
> - Changed units from number of frames to time units for some metrics
> and thresholds. E.g. 'num frames to hit tagret bitrate' is changed to
> 'time to reach target bitrate, sec';
> - Changed data type of FrameStatistic::max_nalu_length (renamed to
> max_nalu_size_bytes) from rtc::Optional to size_t. There it no need to
> use such advanced data type in such low level data structure.
> 
> Bug: webrtc:8524
> Change-Id: Ic9f6eab5b15ee12a80324b1f9c101de1bf3c702f
> Reviewed-on: https://webrtc-review.googlesource.com/31901
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21653}

TBR=brandtr@webrtc.org,asapersson@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,ssilkin@webrtc.org

Change-Id: Id0b7d387bbba02e71637b229aeed6f6cf012af46
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8524
Reviewed-on: https://webrtc-review.googlesource.com/40220
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21656}
2018-01-17 13:16:07 +00:00
Sergey Silkin
1880c7162b Updated analysis in videoprocessor.
- Run analysis after all frames are processed. Before part of it was
done at bitrate change points;
- Analysis is done for whole stream as well as for each rate update
interval;
- Changed units from number of frames to time units for some metrics
and thresholds. E.g. 'num frames to hit tagret bitrate' is changed to
'time to reach target bitrate, sec';
- Changed data type of FrameStatistic::max_nalu_length (renamed to
max_nalu_size_bytes) from rtc::Optional to size_t. There it no need to
use such advanced data type in such low level data structure.

Bug: webrtc:8524
Change-Id: Ic9f6eab5b15ee12a80324b1f9c101de1bf3c702f
Reviewed-on: https://webrtc-review.googlesource.com/31901
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21653}
2018-01-17 12:44:06 +00:00
Magnus Jedvert
84d8ae5df7 Android: Use scoped java refs
We currently use raw jobject in our code mixed with sporadic
ScopedLocalRefFrame. This CL moves every jobject into a scoped object,
either local, global, or a parameter. Also, this CL uses the JNI
generation script to generate declaration stubs for the Java->C++
functions so that it no longer becomes possible to mistype them
without getting compilation errors.

TBR=brandt@webrtc.org

Bug: webrtc:8278,webrtc:6969
Change-Id: Ic7bac74a89c11180177d65041086d7db1cdfb516
Reviewed-on: https://webrtc-review.googlesource.com/34655
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21387}
2017-12-20 15:46:06 +00:00
Sami Kalliomäki
20b294c28e Android: Re-enable videoprocessor integration tests.
The problem was that the encoder was feeded with frames that had 0 as
a timestamp. This confused the encoder. H264 high profile support
clause was also wrong and is corrected.

Bug: webrtc:8601
Change-Id: Ic5a893b4b7573e694f865b63620843b2c9aa489f
Reviewed-on: https://webrtc-review.googlesource.com/32300
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21234}
2017-12-13 08:59:30 +00:00
Sergey Silkin
db3d1c611e Remove tests with non-zero packet loss.
Concealment is never used in WebRTC since we never feed decoders with
broken bitstream. If so, there is no need to evaluate concealment
quality.
But if we still want to evaluate it then the tests should be
redesigned: recovery frames should be generated with reasonable
interval and quality thresholds should be set to acceptable level.

Bug: webrtc:8524
Change-Id: Ie7197e0a5a88aafcb3b2698185edcb43b71fae3b
Reviewed-on: https://webrtc-review.googlesource.com/32303
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21230}
2017-12-12 15:03:27 +00:00
Magnus Jedvert
e4a9e923e4 Update videoprocessor tool to use new video factory interface
This will also cause us to use the new Android HardwareVideoEncoder,
instead of the deprecated MediaCodecVideoEncoderFactory. Unfortunately,
the new HW encoder does not seem to work as good as the old (or the new
encoder is more strict with return values or something). I don't think
it adds much value to continue testing the deprecated encoder, so I
filed a bug for fixing the new encoder, and in this CL I disabled the
tests on Android. I want to remove as many places as possible where we
use the old WebRtcVideoEncoderFactory interface, because it makes it
more difficult to migrate to the new interface.

Bug: webrtc:7925
Change-Id: If8e34752148a5e5139944d2dfbe7e231fe58aeb9
Reviewed-on: https://webrtc-review.googlesource.com/27540
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21037}
2017-12-04 13:44:59 +00:00
Emircan Uysaler
90612a681b Reland "Add stereo codec header and pass it through RTP"
This is a reland of 20f2133d5d
Original change's description:
> Add stereo codec header and pass it through RTP
>
> - Defines CodecSpecificInfoStereo that carries stereo specific header info from
> encoded image.
> - Defines RTPVideoHeaderStereo that carries the above info to packetizer,
> see module_common_types.h.
> - Adds an RTPPacketizer and RTPDepacketizer that supports passing specific stereo
> header.
> - Uses new data containers in StereoAdapter classes.
>
> This CL is the step 3 for adding alpha channel support over the wire in webrtc.
> See https://webrtc-review.googlesource.com/c/src/+/7800 for the experimental
> CL that gives an idea about how it will come together.
> Design Doc: https://goo.gl/sFeSUT
>
> Bug: webrtc:7671
> Change-Id: Ia932568fdd7065ba104afd2bc0ecf25a765748ab
> Reviewed-on: https://webrtc-review.googlesource.com/22900
> Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
> Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20920}

TBR=danilchap@webrtc.org, sprang@webrtc.org, niklas.enbom@webrtc.org

Bug: webrtc:7671
Change-Id: If8f0c7e6e3a2a704f19161f0e8bf1880906e7fe0
Reviewed-on: https://webrtc-review.googlesource.com/27160
Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20946}
2017-11-30 01:44:19 +00:00
Philip Eliasson
deb866360a Revert "Add stereo codec header and pass it through RTP"
This reverts commit 20f2133d5d.

Reason for revert: Breaks downstream project.

Original change's description:
> Add stereo codec header and pass it through RTP
> 
> - Defines CodecSpecificInfoStereo that carries stereo specific header info from
> encoded image.
> - Defines RTPVideoHeaderStereo that carries the above info to packetizer,
> see module_common_types.h.
> - Adds an RTPPacketizer and RTPDepacketizer that supports passing specific stereo
> header.
> - Uses new data containers in StereoAdapter classes.
> 
> This CL is the step 3 for adding alpha channel support over the wire in webrtc.
> See https://webrtc-review.googlesource.com/c/src/+/7800 for the experimental
> CL that gives an idea about how it will come together.
> Design Doc: https://goo.gl/sFeSUT
> 
> Bug: webrtc:7671
> Change-Id: Ia932568fdd7065ba104afd2bc0ecf25a765748ab
> Reviewed-on: https://webrtc-review.googlesource.com/22900
> Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
> Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20920}

TBR=danilchap@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,niklas.enbom@webrtc.org,emircan@webrtc.org

Change-Id: I57f3172ca3c60a84537d577a574dc8018e12d634
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7671
Reviewed-on: https://webrtc-review.googlesource.com/26940
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20931}
2017-11-29 11:39:41 +00:00
Emircan Uysaler
20f2133d5d Add stereo codec header and pass it through RTP
- Defines CodecSpecificInfoStereo that carries stereo specific header info from
encoded image.
- Defines RTPVideoHeaderStereo that carries the above info to packetizer,
see module_common_types.h.
- Adds an RTPPacketizer and RTPDepacketizer that supports passing specific stereo
header.
- Uses new data containers in StereoAdapter classes.

This CL is the step 3 for adding alpha channel support over the wire in webrtc.
See https://webrtc-review.googlesource.com/c/src/+/7800 for the experimental
CL that gives an idea about how it will come together.
Design Doc: https://goo.gl/sFeSUT

Bug: webrtc:7671
Change-Id: Ia932568fdd7065ba104afd2bc0ecf25a765748ab
Reviewed-on: https://webrtc-review.googlesource.com/22900
Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20920}
2017-11-28 18:43:43 +00:00
Oskar Sundbom
6bd39025ec Optional: Use nullopt and implicit construction in /modules/video_coding
Changes places where we explicitly construct an Optional to instead use
nullopt or the requisite value type only.

This CL was uploaded by git cl split.

Bug: None
Change-Id: Iedebf4dc56a973306e7d7e7649525879808dc72b
Reviewed-on: https://webrtc-review.googlesource.com/23578
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20878}
2017-11-24 18:36:09 +00:00
Sergey Silkin
64eaa99cfc On-fly calculation of quality metrics.
Calculation of quality metrics required writing of decoded video
to file. There were two drawbacks with that approach. First, frame
drops significantly affected metrics because comparison was done
against the last decoded frame. Second, simulcast/SVC required
writing of multiple files. This might be too much data to dump.

On-fly metrics calculation is done in frame decoded callback.
Calculation time is excluded from encoding/decoding time. If CPU
usage measurement is enabled metrics calculation is disabled since
it affects CPU usage. The results are reported in Stats::PrintSummary.

Bug: webrtc:8524
Change-Id: Id54fb21f2f95deeb93757afaf46bde7d7ae18dac
Reviewed-on: https://webrtc-review.googlesource.com/22560
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20798}
2017-11-20 16:13:59 +00:00
Magnus Jedvert
df4883dbf0 Reland "Update internal encoder factory to new interface"
This is a reland of 2c8c8e26fc
Original change's description:
> Update internal encoder factory to new interface
>
> TBR=stefan@webrtc.org
>
> Bug: webrtc:7925
> Change-Id: I0bb97acdf0d58a9ce531ecdd672bb17ef96360df
> Reviewed-on: https://webrtc-review.googlesource.com/21162
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20717}

TBR=andersc@webrtc.org,brandt@webrtc.org,stefan@webrtc.org

Bug: webrtc:7925
Change-Id: I0d269b3edb029e372a36c3b461a577bca2b6d0cb
Reviewed-on: https://webrtc-review.googlesource.com/24000
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20747}
2017-11-18 10:48:28 +00:00
Zhi Huang
aea84f5519 Revert "Update internal encoder factory to new interface"
This reverts commit 2c8c8e26fc.

Reason for revert: Broke the internal projects.

Original change's description:
> Update internal encoder factory to new interface
> 
> TBR=stefan@webrtc.org
> 
> Bug: webrtc:7925
> Change-Id: I0bb97acdf0d58a9ce531ecdd672bb17ef96360df
> Reviewed-on: https://webrtc-review.googlesource.com/21162
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20717}

TBR=brandtr@webrtc.org,magjed@webrtc.org,andersc@webrtc.org,stefan@webrtc.org

Change-Id: I989070277885ee70fe6b38272d0001cff890f3ef
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7925
Reviewed-on: https://webrtc-review.googlesource.com/23780
Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20720}
2017-11-16 18:46:35 +00:00
Magnus Jedvert
2c8c8e26fc Update internal encoder factory to new interface
TBR=stefan@webrtc.org

Bug: webrtc:7925
Change-Id: I0bb97acdf0d58a9ce531ecdd672bb17ef96360df
Reviewed-on: https://webrtc-review.googlesource.com/21162
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20717}
2017-11-16 17:55:24 +00:00
Oleh Prypin
6581f21f0e Fix some missed stdlib includes
Ran into these when trying a newer libstdc++

Bug: None
Change-Id: Ie3ce0ae1ae1e6da1a15476fbf942b48b37adc9fa
Reviewed-on: https://webrtc-review.googlesource.com/23501
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20701}
2017-11-16 08:50:44 +00:00
Magnus Jedvert
ee92d626bd Update VideoEncoderSoftwareFallbackWrapper to take VideoEncoder as arg
VideoEncoderSoftwareFallbackWrapper is updated to take a VideoEncoder as
argument instead relying on built-in SW codecs. The purpose is to make
VideoEncoderSoftwareFallbackWrapper more modular and not depend on
built-in SW encoders.

Bug: webrtc:7925
Change-Id: I99896f0751cfb77e01efd29c97d3bd07bdb2c7c0
Reviewed-on: https://webrtc-review.googlesource.com/22320
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20671}
2017-11-14 10:47:46 +00:00
Magnus Jedvert
46a2765c56 Reland "Update internal SW codecs to return unique_ptrs"
This reverts commit 34c8e6bce8.

Reason for revert: Fix Android compilation

Original change's description:
> Revert "Update internal SW codecs to return unique_ptrs"
>
> This reverts commit 4fe6adc06a.
>
> Reason for revert: Breaks android compile.
>
> Original change's description:
> > Update internal SW codecs to return unique_ptrs
> >
> > TBR=stefan@webrtc.org
> >
> > Bug: webrtc:7925
> > Change-Id: I84239b071a2608d928f09b06809090eec5eafb14
> > Reviewed-on: https://webrtc-review.googlesource.com/21165
> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#20650}
>
> TBR=magjed@webrtc.org,sprang@webrtc.org,stefan@webrtc.org
>
> Change-Id: If33c3a0ee0dfce63d105558a2897a472f0633306
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:7925
> Reviewed-on: https://webrtc-review.googlesource.com/22540
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20652}

TBR=magjed@webrtc.org,sprang@webrtc.org,stefan@webrtc.org

Change-Id: Ic8551af4687e927c9b605060155abdd5bc6208b2
Bug: webrtc:7925
Reviewed-on: https://webrtc-review.googlesource.com/22541
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20655}
2017-11-13 14:23:58 +00:00
Magnus Jedvert
34c8e6bce8 Revert "Update internal SW codecs to return unique_ptrs"
This reverts commit 4fe6adc06a.

Reason for revert: Breaks android compile.

Original change's description:
> Update internal SW codecs to return unique_ptrs
> 
> TBR=stefan@webrtc.org
> 
> Bug: webrtc:7925
> Change-Id: I84239b071a2608d928f09b06809090eec5eafb14
> Reviewed-on: https://webrtc-review.googlesource.com/21165
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20650}

TBR=magjed@webrtc.org,sprang@webrtc.org,stefan@webrtc.org

Change-Id: If33c3a0ee0dfce63d105558a2897a472f0633306
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7925
Reviewed-on: https://webrtc-review.googlesource.com/22540
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20652}
2017-11-13 13:02:30 +00:00
Åsa Persson
eb4500701b Remove use of SetEncodingDataInternal in MediaOptimization.
Add method FilenameWithParams to TestConfig.

Bug: none
Change-Id: I9f683e661537148dc01bee25f7510938fa656dc5
Reviewed-on: https://webrtc-review.googlesource.com/21382
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20651}
2017-11-13 12:39:48 +00:00
Magnus Jedvert
4fe6adc06a Update internal SW codecs to return unique_ptrs
TBR=stefan@webrtc.org

Bug: webrtc:7925
Change-Id: I84239b071a2608d928f09b06809090eec5eafb14
Reviewed-on: https://webrtc-review.googlesource.com/21165
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20650}
2017-11-13 12:31:18 +00:00
Åsa Persson
45bbc8ac19 Change forced software encoder fallback for VP8 to be only based on resolution and not bitrate.
Switches from VP8 HW to VP8 SW for resolutions <= max_pixels. 

|<- min_pixels  VP8 SW  max_pixels ->|  VP8 HW  |

Bug: webrtc:6634
Change-Id: Ib324df2b8418659c29d999259c0ed47448310696
Reviewed-on: https://webrtc-review.googlesource.com/7362
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20646}
2017-11-13 10:58:42 +00:00
Magnus Jedvert
7501b1c3d1 Reland "Update internal video decoder factory to new interface"
This reverts commit 267d84baf0.

Reason for reland: Fix the bug; decoder is not allowed to ever be null and we need to use a
NullVideoDecoder that ignores calls instead.

Original change's description:
> Revert "Update internal video decoder factory to new interface"
>
> This reverts commit b2fc9b1b10.
>
> Reason for revert: Suspected to cause failures on Android bots on webrtc.fyi, see https://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Tests%20%28dbg%29%20%28K%20Nexus5%29/builds/21051
>
> Original change's description:
> > Update internal video decoder factory to new interface
> >
> > We want to move away from cricket::WebRtcVideoDecoderFactory and this CL
> > updates the internal factory. Also, VideoDecoderSoftwareFallbackWrapper
> > is updated to take a VideoDecoder as argument instead of a factory so it
> > can be used with external SW decoders.
> >
> > Bug: webrtc:7925
> > Change-Id: Ie6dc6c24f8610a2129620c6e2b42e3cebb2ddef7
> > Reviewed-on: https://webrtc-review.googlesource.com/7301
> > Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> > Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#20597}
>
> TBR=brandtr@webrtc.org,magjed@webrtc.org,andersc@webrtc.org
>
> Change-Id: I0a12c98fdc30f00d58c85ee7e088f50160d39724
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:7925
> Reviewed-on: https://webrtc-review.googlesource.com/21420
> Reviewed-by: Christian Fremerey <chfremer@webrtc.org>
> Commit-Queue: Christian Fremerey <chfremer@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20605}

TBR=brandtr@webrtc.org,magjed@webrtc.org,andersc@webrtc.org,chfremer@webrtc.org,chfremer@google.com

Change-Id: I6cf5794dc3fadfa86809a94da80b69dbb4c56f52
No-Try: true
Bug: webrtc:7925
Reviewed-on: https://webrtc-review.googlesource.com/21541
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20623}
2017-11-09 14:29:12 +00:00
Christian Fremerey
267d84baf0 Revert "Update internal video decoder factory to new interface"
This reverts commit b2fc9b1b10.

Reason for revert: Suspected to cause failures on Android bots on webrtc.fyi, see https://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Tests%20%28dbg%29%20%28K%20Nexus5%29/builds/21051

Original change's description:
> Update internal video decoder factory to new interface
> 
> We want to move away from cricket::WebRtcVideoDecoderFactory and this CL
> updates the internal factory. Also, VideoDecoderSoftwareFallbackWrapper
> is updated to take a VideoDecoder as argument instead of a factory so it
> can be used with external SW decoders.
> 
> Bug: webrtc:7925
> Change-Id: Ie6dc6c24f8610a2129620c6e2b42e3cebb2ddef7
> Reviewed-on: https://webrtc-review.googlesource.com/7301
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20597}

TBR=brandtr@webrtc.org,magjed@webrtc.org,andersc@webrtc.org

Change-Id: I0a12c98fdc30f00d58c85ee7e088f50160d39724
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7925
Reviewed-on: https://webrtc-review.googlesource.com/21420
Reviewed-by: Christian Fremerey <chfremer@webrtc.org>
Commit-Queue: Christian Fremerey <chfremer@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20605}
2017-11-08 23:59:21 +00:00
Magnus Jedvert
b2fc9b1b10 Update internal video decoder factory to new interface
We want to move away from cricket::WebRtcVideoDecoderFactory and this CL
updates the internal factory. Also, VideoDecoderSoftwareFallbackWrapper
is updated to take a VideoDecoder as argument instead of a factory so it
can be used with external SW decoders.

Bug: webrtc:7925
Change-Id: Ie6dc6c24f8610a2129620c6e2b42e3cebb2ddef7
Reviewed-on: https://webrtc-review.googlesource.com/7301
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20597}
2017-11-08 12:05:10 +00:00
Rasmus Brandt
fb1a8661db Add support for H.264 constrained high profile in VideoProcessor.
BUG=webrtc:8448

Change-Id: I968d6cd78dd4f3c19a7944ae4cc73c5eddb9a949
Reviewed-on: https://webrtc-review.googlesource.com/16160
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20466}
2017-10-27 13:30:34 +00:00
Rasmus Brandt
e4c6915b87 Remove verbose setting and reorder some print statements in VideoProcessor.
Always enabling verbose mode means about 100% more text is printed,
but this should not be a problem as the only time that we explicitly
look at the logs is when the bots are failing, or when we want to save
all output for plotting.

BUG=webrtc:8448

Change-Id: Ia5feab5220d047440d15cddb7d3fbca1c5a4aaf5
Reviewed-on: https://webrtc-review.googlesource.com/16140
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20461}
2017-10-27 10:52:14 +00:00
Åsa Persson
e87cfe2315 Remove unused method PacketLossModeToStr.
Add method FrameType for frame to TestConfig.

Bug: none
Change-Id: Icfeb12fcb961559c9b36a3aedb081a840b9d8556
Reviewed-on: https://webrtc-review.googlesource.com/16120
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20458}
2017-10-27 08:51:27 +00:00
Rasmus Brandt
fb6d32602c Delete unused PredictivePacketManipulator.
BUG=webrtc:8448

Change-Id: I07ff9db5cb49f84d98b6076e748a990aa560b5b5
Reviewed-on: https://webrtc-review.googlesource.com/15400
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20437}
2017-10-26 07:17:24 +00:00
Jerome Jiang
f7eea2a6bc Change key frame mismatch threshold for VP9 in unit test.
Change the threshold in ProcessNoLossChangeBitRateVP9.

Bug: webrtc:8442
Change-Id: Ic924a60f60c57cc2c990430cb6c70fdbefec97f4
Reviewed-on: https://webrtc-review.googlesource.com/15840
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20436}
2017-10-26 07:01:15 +00:00
Åsa Persson
f0c44672df Make VideoProcessor::Init/Release methods private and call from constructor/destructor.
TestConfig: Replace Print method with ToString and add test.

Bug: none
Change-Id: I9853cb16875199a51c5731d1cec326159751d001
Reviewed-on: https://webrtc-review.googlesource.com/14320
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20420}
2017-10-25 09:31:12 +00:00
Rasmus Brandt
f7a3558f3e Add VideoProcessor tests verifying that H.264 keyframes contain SPS/PPS/IDR.
This CL adds an EncodedFrameChecker interface which can be used by users
of the VideoProcessor to inject customized per-frame checks to the
encoding/decoding pipeline. This currently has two uses:
- Verifying that the QP parser works correctly for VP8 and VP9, by comparing the
  parsed QP to that produced by libvpx.
- Verifying that our H.264 encoders always produce SPS/PPS/IDR in tandem.

TESTED=Galaxy S8, Pixel 2 XL, iPhone 7.
BUG=webrtc:8423

Change-Id: Ic3e401546e239a9ffaf2ed2907689cebb1127805
Reviewed-on: https://webrtc-review.googlesource.com/14559
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20409}
2017-10-24 13:58:38 +00:00
Åsa Persson
2d27fb5a33 Move TestConfig to separate file.
Move functions Set/PrintCodecSettings, NumberOfTemporalLayers to TestConfig.
Add function NumberOfCores.

Bug: none
Change-Id: Ic33d79681d59d62bf34d9c9ff056a751ed3f8da8
Reviewed-on: https://webrtc-review.googlesource.com/13120
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20358}
2017-10-19 13:56:31 +00:00
Åsa Persson
7173cf20cc Add cpu measurements to VideoProcessorIntegrationTest.
Remove unused method ExcludeFrameTypesToStr.

Bug: webrtc:6634
Change-Id: I2816466ed428b8ce13f3073ca496c2891d5d6368
Reviewed-on: https://webrtc-review.googlesource.com/9400
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20350}
2017-10-19 11:37:51 +00:00
Åsa Persson
dc182a486a VideoProcessorIntegrationTest: remove arrays in RateProfile and use vector of RateProfiles instead.
Move num_frames from RateProfile to TestConfig struct.

Remove methods: SetRateProfile, AddRateControlThresholds.

Bug: none
Change-Id: I14bcafb8c5b3c1d3b6119417dde038fd82381e3f
Reviewed-on: https://webrtc-review.googlesource.com/8540
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20265}
2017-10-13 07:19:56 +00:00
ssilkin
612f858ba0 Adding test for SingleNalUnit mode
Test enables single-nalu mode, sets limit for nalu lenght and verifies
that encoder follows that limit.
I found that QP jumps significantly when the mode is enabled. In result
encoder might produce 4kbyte and 0.4kbyte frames back-to-back. But it
seems that happens only to couple of frames in the beginning. This
caused test to fail with default RC thresholds. To bypass this I
increased frame size mismatch threshold from 20 to 30%. This should be
Ok considering single-nalu mode is rare.

BUG=webrtc:8070

Review-Url: https://codereview.webrtc.org/3014623002
Cr-Commit-Position: refs/heads/master@{#20023}
2017-09-28 16:23:17 +00:00
Rasmus Brandt
638200e1eb Add support for SW fallback decoder in VideoProcessor.
BUG=none

Change-Id: Ib144b377115a48d26ff053e3b4b43f5260aa9f84
Reviewed-on: https://webrtc-review.googlesource.com/3760
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19999}
2017-09-27 12:51:26 +00:00
asapersson
e19d8bfd5b Modify some rate control and quality thresholds due to flakiness.
BUG=webrtc:8280

Review-Url: https://codereview.webrtc.org/3015683002
Cr-Commit-Position: refs/heads/master@{#19968}
2017-09-26 10:29:49 +00:00
Alex Loiko
dec82abab5 Disable flaky test VideoProcessorIntegrationTestMediaCodec.ForemanCif500kbpsVp8.
Test was Android-only, so it was disabled completely.

TBR=brandtr@webrtc.org

Bug: webrtc:8280
Change-Id: Id45eedac90fb892f5a380e5c2614037e01ee8c76
Reviewed-on: https://webrtc-review.googlesource.com/3460
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19954}
2017-09-25 16:25:03 +00:00
asapersson
55c7eded94 VideoProcessorIntegrationTest: Group member variables into two structs containing target/actual rates.
- Group member variables into two structs: target rates/actual rates.
- Split verify and print of rate control metrics into separate functions.
- Rename member variables.

BUG=webrtc:6634

Review-Url: https://codereview.webrtc.org/3009423002
Cr-Commit-Position: refs/heads/master@{#19925}
2017-09-22 10:45:15 +00:00
Mirko Bonadei
7120742701 Adding NOLINT for typedefs.h and common_types.h
Now that we have moved WebRTC from src/webrtc to src/, common_types.h
and typedefs.h are triggering a cpplint error.

The cpplint complaint is:
Include the directory when naming .h files  [build/include] [4]

This CL disables the error but we have to remove these two headers
from the root directory.

NOPRESUBMIT=true

Bug: webrtc:5876
Change-Id: I08e1b69aadcc4b28ab83bf25e3819d135d41d333
Reviewed-on: https://webrtc-review.googlesource.com/1577
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19859}
2017-09-15 13:03:51 +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