621 Commits

Author SHA1 Message Date
kjellander
56cf60e717 Revert of Add check_deps rules in DEPS files. (patchset #2 id:60001 of https://codereview.webrtc.org/1796413002/ )
Reason for revert:
The openmax_dl include change breaks downstream projects.

Original issue's description:
> Add check_deps rules in DEPS files.
>
> Add fine-grained check_deps rules for all of WebRTC.
> This will help both maintaining sane dependencies and provides a way
> to visualize dependency graphs using the buildtools/checkdeps/graphdeps.py script.
>
> Example:
> buildtools/checkdeps/graphdeps.py --root=. --format=png \
> --out=./webrtc.png --incl='^webrtc/modules/bitrate_controller->' \
> --excl='chromium|base|external|testing|webrtc/test|\.h$|\.cc$'
>
> will produce a neat webrtc.png image showcasing the dependencies
> (according to the DEPS file) for the bitrate_controller module.
> Some dependencies are filtered out for readability.
>
> BUG=webrtc:5623
> TESTED=Passing runs using:
> buildtools/checkdeps/checkdeps.py --root=. talk
> buildtools/checkdeps/checkdeps.py --root=. webrtc
>
> R=tommi@webrtc.org
>
> Committed: https://crrev.com/086f851b7b9b4bcbd4fe507c3bf83b760bd7f4d9
> Cr-Commit-Position: refs/heads/master@{#12008}

TBR=tommi@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5623

Review URL: https://codereview.webrtc.org/1808573002

Cr-Commit-Position: refs/heads/master@{#12009}
2016-03-16 00:41:04 +00:00
kjellander@webrtc.org
086f851b7b Add check_deps rules in DEPS files.
Add fine-grained check_deps rules for all of WebRTC.
This will help both maintaining sane dependencies and provides a way
to visualize dependency graphs using the buildtools/checkdeps/graphdeps.py script.

Example:
buildtools/checkdeps/graphdeps.py --root=. --format=png \
--out=./webrtc.png --incl='^webrtc/modules/bitrate_controller->' \
--excl='chromium|base|external|testing|webrtc/test|\.h$|\.cc$'

will produce a neat webrtc.png image showcasing the dependencies
(according to the DEPS file) for the bitrate_controller module.
Some dependencies are filtered out for readability.

BUG=webrtc:5623
TESTED=Passing runs using:
buildtools/checkdeps/checkdeps.py --root=. talk
buildtools/checkdeps/checkdeps.py --root=. webrtc

R=tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1796413002 .

Cr-Commit-Position: refs/heads/master@{#12008}
2016-03-16 00:22:53 +00:00
philipel
83f831a919 Experiment for the nack module.
Testing the nack module by implementing it into the current jitter buffer
under the experiment WebRTC-NewVideoJitterBuffer.

BUG=webrtc:5514

Review URL: https://codereview.webrtc.org/1778503002

Cr-Commit-Position: refs/heads/master@{#11969}
2016-03-12 11:30:31 +00:00
magjed
4bf0c71774 VCMCodecTimer: Change filter from max to 95th percentile
The purpose with this change is to make the filter more robust against anomalies. googMaxDecodeMs is expected to drop a litte by this.

BUG=b/27306053

Review URL: https://codereview.webrtc.org/1742323002

Cr-Commit-Position: refs/heads/master@{#11952}
2016-03-11 10:15:12 +00:00
tkchin
5ed5ed953d Fix VideoToolbox backgrounding issues.
When the iOS application is not in the foreground, the hardware encoder and
decoder become invalidated. There doesn't seem to be a way to query their state
so we don't know they're invalid until we get an error code after an
encode/decode request. To solve the issue, we just don't encode/decode when the
app is not active, and reinitialize the encoder/decoder when the app is active
again.

Also fixes a leak in the decoder.

BUG=webrtc:4081

Review URL: https://codereview.webrtc.org/1732953003

Cr-Commit-Position: refs/heads/master@{#11916}
2016-03-08 18:51:58 +00:00
philipel
7b4c9db28a DCHECK fix for https://codereview.webrtc.org/1769113003/
TBR=stefan@webrtc.org

BUG=webrtc:5514

Review URL: https://codereview.webrtc.org/1770373002 .

Cr-Commit-Position: refs/heads/master@{#11905}
2016-03-08 12:06:55 +00:00
philipel
5ab4c6d7e0 Revert "Revert of Implement the NackModule as part of the new jitter buffer. (patchset #19 id:360001 of https://codereview.webrtc.org/1715673002/ )"
This reverts commit eb648bf0e5a9bae185bcd6b4b3be371e1da3507d.

Re-reverting to fix original CL (https://codereview.webrtc.org/1715673002/).

TBR=stefan@webrtc.org, tommi@webrtc.org, torbjorng@webrtc.org

BUG=webrtc:5514

Review URL: https://codereview.webrtc.org/1769113003

Cr-Commit-Position: refs/heads/master@{#11904}
2016-03-08 11:36:22 +00:00
asapersson
5249599a9b Update histogram "WebRTC.Video.OnewayDelayInMs" to use the estimated one-way delay.
Previous logged delay was: network delay (rtt/2) + jitter delay + decode time + render delay.

Make capture time in local timebase available for decoded VP9 video frames (propagate ntp_time_ms from EncodedImage to decoded VideoFrame).

BUG=

Review URL: https://codereview.webrtc.org/1688143003

Cr-Commit-Position: refs/heads/master@{#11901}
2016-03-08 10:10:24 +00:00
kjellander
eb648bf0e5 Revert of Implement the NackModule as part of the new jitter buffer. (patchset #19 id:360001 of https://codereview.webrtc.org/1715673002/ )
Reason for revert:
Unfortunately this breaks in the main waterfall: https://build.chromium.org/p/client.webrtc/builders/Android32%20Builder/builds/6362

I think it's related to dcheck_always_on=1 which is set in GYP_DEFINES only on the trybots, but not on the bots in the main waterfall.

Original issue's description:
> Implement the NackModule as part of the new jitter buffer.
>
> Things done/implemented in this CL:
>   - An interface that can send Nack (VCMNackSender).
>   - An interface that can request KeyFrames (VCMKeyFrameRequestSender).
>   - The nack module (NackModule).
>   - A set of convenience functions for modular numbers (mod_ops.h).
>
> BUG=webrtc:5514
>
> Committed: https://crrev.com/f472c5b6722dfb221f929fc4d3a2b4ca54647701
> Cr-Commit-Position: refs/heads/master@{#11882}

TBR=sprang@webrtc.org,stefan@webrtc.org,terelius@webrtc.org,torbjorng@webrtc.org,perkj@webrtc.org,tommi@webrtc.org,philipel@webrtc.org
BUG=webrtc:5514
NOTRY=True

Review URL: https://codereview.webrtc.org/1771883002

Cr-Commit-Position: refs/heads/master@{#11887}
2016-03-07 17:56:34 +00:00
isheriff
7620be8492 Frame dropper improvements & cleanup
1. Fix the case of key frame accumulation being incorrect due to the chunk
    size being computed at the time of leak based on input frame rate. The issue
    is that the count is computed based on key frame ratio and the actual chunk
    size computed from current input frame rate. These can be wildly different
    especially at the beginning of the stream (key frame ratio defaults based
    on 30 fps) resulting in incorrect key frame accumulation causing large frame
    drops when the input frame rate is low.

    2. Add large delta frame compensation. The current code accounts for key frames
    but not large delta frames. This is a common occurence in some application
    (remote desktop as an example)

    3. Fixes an issue identified by the unit tests. The accumulation of
    key frames had an issue in the scenario of a high key frame ratio where
    the full key frame was not being accounted for.

    3. Removes fast mode and other methods that are mostly dead code.

    4. Cleans up variable names as per chromium style.

Review URL: https://codereview.webrtc.org/1750493002

Cr-Commit-Position: refs/heads/master@{#11884}
2016-03-07 07:22:42 +00:00
philipel
f472c5b672 Implement the NackModule as part of the new jitter buffer.
Things done/implemented in this CL:
  - An interface that can send Nack (VCMNackSender).
  - An interface that can request KeyFrames (VCMKeyFrameRequestSender).
  - The nack module (NackModule).
  - A set of convenience functions for modular numbers (mod_ops.h).

BUG=webrtc:5514

Review URL: https://codereview.webrtc.org/1715673002

Cr-Commit-Position: refs/heads/master@{#11882}
2016-03-05 11:56:45 +00:00
kjellander
e26e78784b Roll chromium_revision ee31124..508edd3 (378158:379249)
This includes renaming back libvpx_new to libvpx in
https://codereview.chromium.org/1765703002

Add symlink to src/mojo as workaround while figuring out how to fix
this upstream in Chromium. See webrtc:5629.

Change log: ee31124..508edd3
Full diff: ee31124..508edd3

Changed dependencies:
* src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/6d49157..708db16
* src/third_party/libvpx_new/source/libvpx: https://chromium.googlesource.com/webm/libvpx.git/+log/89cc682..None
* src/tools/swarming_client: https://chromium.googlesource.com/external/swarming.client.git/+log/a72f46e..df6e95e
DEPS diff: https://chromium.googlesource.com/chromium/src/+/ee31124..508edd3/DEPS

No update to Clang.

BUG=webrtc:5629
TBR=marpan@webrtc.org, stefan@webrtc.org,
NOTRY=True

Review URL: https://codereview.webrtc.org/1766643002

Cr-Commit-Position: refs/heads/master@{#11879}
2016-03-04 22:39:32 +00:00
kjellander
0e73934694 Remove webrtc/test/webrtc_test_common.gyp
Move the "webrtc_test_common" target to test.gyp and rename
it to "test_common".

Move all tests in "webrtc_test_common_unittests" (which
wasn't run on the bots) into "test_support_unittests".

NOTRY=True
NOPRESUBMIT=True

Review URL: https://codereview.webrtc.org/1754593002

Cr-Commit-Position: refs/heads/master@{#11848}
2016-03-02 18:46:25 +00:00
sprang
b0fdfea9e8 Add stats (histograms) for vp8 screenshare layers
BUG=

Review URL: https://codereview.webrtc.org/1734793003

Cr-Commit-Position: refs/heads/master@{#11830}
2016-03-01 13:51:20 +00:00
kwiberg
3f55dea259 Replace scoped_ptr with unique_ptr in webrtc/modules/video_coding/
BUG=webrtc:5520

Review URL: https://codereview.webrtc.org/1721353002

Cr-Commit-Position: refs/heads/master@{#11814}
2016-02-29 13:52:06 +00:00
pbos
a26ac925f7 Reland of move ignored return code from modules. (patchset #1 id:1 of https://codereview.webrtc.org/1736663004/ )
Reason for revert:
Revert breaks other uses, a fix will be rolled into Chromium instead.

Original issue's description:
> Revert of Remove ignored return code from modules. (patchset #3 id:40001 of https://codereview.webrtc.org/1703833002/ )
>
> Reason for revert:
> Breaks Chromium.
>
> Original issue's description:
> > Remove ignored return code from modules.
> >
> > ModuleProcessImpl doesn't act on return codes and having them around is
> > confusing (it's unclear what an error return code here would do even).
> >
> > BUG=
> > R=tommi@webrtc.org
> >
> > Committed: f14c47a58c
>
> TBR=tommi@webrtc.org,pbos@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=
>
> Committed: https://crrev.com/da33a8a2a22f6d19ba2a8cce963beafbdbaa8fd8
> Cr-Commit-Position: refs/heads/master@{#11761}

TBR=tommi@webrtc.org,torbjorng@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.webrtc.org/1737013002

Cr-Commit-Position: refs/heads/master@{#11762}
2016-02-25 12:50:09 +00:00
torbjorng
da33a8a2a2 Revert of Remove ignored return code from modules. (patchset #3 id:40001 of https://codereview.webrtc.org/1703833002/ )
Reason for revert:
Breaks Chromium.

Original issue's description:
> Remove ignored return code from modules.
>
> ModuleProcessImpl doesn't act on return codes and having them around is
> confusing (it's unclear what an error return code here would do even).
>
> BUG=
> R=tommi@webrtc.org
>
> Committed: f14c47a58c

TBR=tommi@webrtc.org,pbos@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.webrtc.org/1736663004

Cr-Commit-Position: refs/heads/master@{#11761}
2016-02-25 12:34:12 +00:00
Peter Boström
f14c47a58c Remove ignored return code from modules.
ModuleProcessImpl doesn't act on return codes and having them around is
confusing (it's unclear what an error return code here would do even).

BUG=
R=tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1703833002 .

Cr-Commit-Position: refs/heads/master@{#11747}
2016-02-24 15:51:23 +00:00
hbos
12f4cda086 Histograms for H264EncoderImpl/H264DecoderImpl
initialization and errors.

The stats are counts using enumeration, an instance of
H264EncoderImpl/H264DecoderImpl will report at most 1 Init
and 1 Error for its entire lifetime. This is to avoid
spamming reports if initialization or coding fails and it
retries in a loop. The Init stats will give us an idea of
usage counts for the encoder/decoder. The Error stats will
give us an idea of how many of these usages encounters some
type of problem, such as encode or decode errors.

- WebRTC.Video.H264EncoderImpl.Event:
  * kH264EncoderEventInit: Occurs at InitEncode.
  * kH264EncoderEventError: Occurs if any type of error
    occurs during initialization or encoding.
- WebRTC.Video.H264DecoderImpl.Event:
  * kH264DecoderEventInit: Occurs at InitDecode.
  * kH264DecoderEventError: Occurs if any type of error
    occurs during initialization, AVGetBuffer2 or decoding.

Chromium sibling CL:
https://codereview.chromium.org/1719273002/

BUG=chromium:500605, chromium:468365

Review URL: https://codereview.webrtc.org/1716173002

Cr-Commit-Position: refs/heads/master@{#11736}
2016-02-24 11:03:11 +00:00
tkchin
f75d008235 Bitrate controller for VideoToolbox encoder.
Also fixes a crash on encoder Release.

BUG=webrtc:4081

Review URL: https://codereview.webrtc.org/1660963002

Cr-Commit-Position: refs/heads/master@{#11729}
2016-02-24 06:49:48 +00:00
Marco
91fe304b0f vp9: Adjust parameter for a test in videoprocessor_integrationtest.cc
Needed for upcoming libvpx roll.

TBR=stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1717843002 .

Cr-Commit-Position: refs/heads/master@{#11693}
2016-02-19 23:31:29 +00:00
Alex Glaznev
a9d0892946 Add initial bitrate and frame resolution parameters to quality scaler.
- Scale down to VGA immediately if call starts with HD resolution
and bitrate below 500 kbps.
- Adjust QP threshold for HW VP8 encoder to scale down faster.

BUG=b/26504665
R=mflodman@webrtc.org, pbos@webrtc.org, sprang@google.com, stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1672173002 .

Cr-Commit-Position: refs/heads/master@{#11692}
2016-02-19 23:24:12 +00:00
kjellander
28c99bc44a iOS: Include legacy objc API in all.gyp + fix H264 libyuv dependency
The legacy objc API is not included in the GYP generation if include_tests=0.
This causes problems downstream in some cases, so it's changed in this CL.

The libyuv dependency needs to be possible to disable using the build_libyuv
GYP variable.

NOTRY=True

Review URL: https://codereview.webrtc.org/1705733002

Cr-Commit-Position: refs/heads/master@{#11652}
2016-02-17 13:38:35 +00:00
kjellander
0206000a66 iOS: Add resource files for tests and implement OutputPath
With this change the following tests have been successfully
passing in the iOS Simulator for iPhone 5 and iOS 9:
* audio_decoder_unittests
* common_video_unittests
* modules_tests
* rtc_api_objc_tests
* rtc_pc_unittests
* system_wrappers_unittests
* voice_engine_unittests

The modules_unittests and common_audio_unittests are
handled in https://codereview.webrtc.org/1698033002/

BUG=webrtc:4755
NOTRY=True

Review URL: https://codereview.webrtc.org/1694353003

Cr-Commit-Position: refs/heads/master@{#11646}
2016-02-17 06:06:17 +00:00
Peter Boström
b72dada927 Remove Reset from conditionally-compiled decoders.
Reset is no longer called but removal of them was missed in a previous
commit.

BUG=webrtc:5475
TBR=hbos@webrtc.org,tkchin@webrtc.org

Review URL: https://codereview.webrtc.org/1690193003 .

Cr-Commit-Position: refs/heads/master@{#11603}
2016-02-12 14:57:03 +00:00
hbos
0715a83a07 Avoid OpenH264 encoder bug for #threads > 1 on Mac and Chromium+Sandbox.
Until the bug has been further investigated, we're limiting the number
of threads to 1 to avoid problems. See crbug.com/583348.

BUG=chromium:500605, chromium:468365, chromium:583348

Review URL: https://codereview.webrtc.org/1677543002

Cr-Commit-Position: refs/heads/master@{#11536}
2016-02-09 10:34:34 +00:00
kjellander
f6b5509229 Fix GYP and GN references that are invalid in Chromium builds.
There were a couple of GN and GYP references that were incorrect in Chromium builds:
- GN references between WebRTC targets must be using relative paths, not absolute.
- GYP references between WebRTC targets must be using the <(webrtc_root)v variable
  in order to be expanded to the correct path in a Chromium build.

NOTRY=True
TBR=hjon@webrtc.org, hbos@webrtc.org

Review URL: https://codereview.webrtc.org/1681493002

Cr-Commit-Position: refs/heads/master@{#11521}
2016-02-08 07:04:33 +00:00
hbos
900f97534b H264: Improve FFmpeg decoder performance by using I420BufferPool.
Had to update I420BufferPool to allow zero-initializing buffers.

BUG=chromium:500605, chromium:468365, webrtc:5428

Review URL: https://codereview.webrtc.org/1645543003

Cr-Commit-Position: refs/heads/master@{#11505}
2016-02-05 16:08:39 +00:00
Peter Boström
1d04ac6f29 Untangle ViEChannel and ViEEncoder.
Extracts shared members outside the two objects, removing PayloadRouter
from receivers and the VCM for ViEChannel from senders.

Removes Start/StopThreadsAndSetSharedMembers that was used to set the
shared state between them.

Also adding DCHECKs to document what's only used by the
sender/receiver side.

BUG=webrtc:5494
R=stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1654913002 .

Cr-Commit-Position: refs/heads/master@{#11500}
2016-02-05 10:25:52 +00:00
Peter Boström
e449915455 Measure encoding time on encode callbacks.
Permits measuring encoding time even when performed on another thread,
typically for hardware encoding, instead of assuming that encoding is
blocking the calling thread.

Permitted encoding time is increased for hardware encoders since they
can be timed to keep 30fps, for instance, without indicating overload.

Merges EncodingTimeObserver into EncodedFrameObserver to have one post-encode
callback.

BUG=webrtc:5042, webrtc:5132
R=asapersson@webrtc.org, mflodman@webrtc.org

Review URL: https://codereview.webrtc.org/1569853002 .

Cr-Commit-Position: refs/heads/master@{#11499}
2016-02-05 10:13:41 +00:00
sprang
2ddb8bd359 Avoid undefined behavior in vp8 screenshare_layers
active_layer_ could be dereferenced while being -1...
Also added som DCHECKs

BUG=webrtc:5490

Review URL: https://codereview.webrtc.org/1656233002

Cr-Commit-Position: refs/heads/master@{#11486}
2016-02-04 11:59:57 +00:00
hbos
9dc5928eb2 Ability to disable the effects of |rtc_use_h264| with DisableRtcUseH264.
Renamed the WEBRTC_THIRD_PARTY_H264 macro to WEBRTC_USE_H264 to match flag name.

The idea is to be able to turn off H264 from chromium with this function because...
1) The Chromium trybots will soon use this flag, we want to temporarily disable H264 from chromium even if flag is set in case something is broken. That way when we are ready to flip the switch the trybots will run our test code then and not after it is already enabled.
2) If feature is launched and we discover major problems we can easily disable H264 and merge with beta/stable.
3) Or, if feature is behind a *runtime* flag, this is how we would control if it is used or not.

The idea is to call DisableRtcUseH264 in chromium's PeerConnectionDependencyFactory.

BUG=chromium:500605, chromium:468365
NOTRY=True
NOPRESUBMIT=True

Review URL: https://codereview.webrtc.org/1657273002

Cr-Commit-Position: refs/heads/master@{#11474}
2016-02-03 13:09:40 +00:00
Peter Boström
ed3277bf14 Deprecate VideoDecoder::Reset() and remove calls.
Removes calls to decoder reset and instead drops delta frames and
requests keyframes until one arrives.

BUG=webrtc:5475
R=stefan@webrtc.org
TBR=mflodman@webrtc.org

Review URL: https://codereview.webrtc.org/1647163002 .

Cr-Commit-Position: refs/heads/master@{#11460}
2016-02-02 14:40:13 +00:00
hbos
c5a39c2591 H264: Thread-safe InitializeFFmpeg. Flag to control if InitializeFFmpeg should be called.
New flag: rtc_initialize_ffmpeg, default value = !build_with_chromium.

In WebRTC standalone we initialize FFmpeg by default, in Chromium we don't by default.
Chromium is an external project that also use FFmpeg. If both projects do FFmpeg initialization code things will break. The flag makes it possible for other external projects than chromium to decide whether or not WebRTC should initialize FFmpeg.

BUG=chromium:500605, chromium:468365, webrtc:5427

Review URL: https://codereview.webrtc.org/1639273002

Cr-Commit-Position: refs/heads/master@{#11456}
2016-02-02 10:30:57 +00:00
Peter Boström
74451a5ea9 Prevent zero division in VCMJitterEstimator.
BUG=webrtc:5124
R=sprang@webrtc.org, stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1652903002 .

Cr-Commit-Position: refs/heads/master@{#11445}
2016-02-01 15:31:17 +00:00
Peter Boström
5e8351b325 Prevent division-by-zero in VCMFecMethod.
Clamps frameRate to at least 1.0 to prevent a zero division.

BUG=webrtc:5124
R=stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1642903002 .

Cr-Commit-Position: refs/heads/master@{#11421}
2016-01-28 22:55:45 +00:00
Peter Boström
fb152707ed Replace const-reference with pointer in SendData.
This argument is never used as a reference and the pointer that's bound
to the const reference may be nullptr. This is undefined behavior and
barks under UBSan.

BUG=webrtc:5124
R=stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1642863003 .

Cr-Commit-Position: refs/heads/master@{#11418}
2016-01-28 18:12:09 +00:00
hbos
bab934bffe H.264 video codec support using OpenH264 (http://www.openh264.org/) for encoding and FFmpeg (https://www.ffmpeg.org/) for decoding.
It works on all platforms except Android and iOS (FFmpeg limitation).

Implemented behind compile time flags, off by default.
The plan is to have it enabled in Chrome (see bug), but not in Chromium/webrtc by default.

Flags to turn it on:
- rtc_use_h264 = true
- ffmpeg_branding = "Chrome" (or other brand that includes H.264 decoder)

Tests using H264:
- video_loopback --codec=H264
- screenshare_loopback --codec=H264
- video_engine_tests (EndToEndTest.SendsAndReceivesH264)

NOTRY=True
BUG=500605, 468365
BUG=https://bugs.chromium.org/p/webrtc/issues/detail?id=5424

Review URL: https://codereview.webrtc.org/1306813009

Cr-Commit-Position: refs/heads/master@{#11390}
2016-01-27 09:36:07 +00:00
asapersson
7fd881743c Fix type of local encoded length variable from uint32_t to size_t.
BUG=chromium:571594

Review URL: https://codereview.webrtc.org/1635083002

Cr-Commit-Position: refs/heads/master@{#11383}
2016-01-26 15:26:12 +00:00
Peter Boström
59b2d3ebe7 Remove zero-divide in VCMContentMetricsProcessing.
Protects against zero-framerate in UpdateFrameRate.

BUG=webrtc:5124
R=stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1636943003 .

Cr-Commit-Position: refs/heads/master@{#11382}
2016-01-26 15:18:56 +00:00
asapersson
ffa3fdc8d6 Reallocate encoded buffer size if needed for VP8. Initially set to the input image size.
Issue may occur for very small input images (e.g. 4x4) when encoded image length > input image size.

BUG=chromium:571594

Review URL: https://codereview.webrtc.org/1626373002

Cr-Commit-Position: refs/heads/master@{#11376}
2016-01-26 09:56:35 +00:00
Peter Boström
4fd6cda067 Add tracing to VCMGenericEncoder::Release.
This call can take time, especially on mobile HW encoders. Make sure it
shows up in tracing.

BUG=webrtc:5167
R=stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1606413002 .

Cr-Commit-Position: refs/heads/master@{#11374}
2016-01-26 09:20:03 +00:00
asapersson
86956ded42 Small cleanup in VP9EncoderImpl::GetEncodedLayerFrame.
BUG=

Review URL: https://codereview.webrtc.org/1616843004

Cr-Commit-Position: refs/heads/master@{#11373}
2016-01-26 09:05:28 +00:00
Peter Boström
85b22e2306 Remove vp8_factory.{cc,h}.
Removes use of global VP8EncoderFactory::use_simulcast_adapter which is
thread-unsafe. Also the code wasn't in use.

BUG=
R=stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1598803005 .

Cr-Commit-Position: refs/heads/master@{#11370}
2016-01-25 16:58:08 +00:00
asapersson
28ba92731d Switch to use new implementation in metrics.h.
Sparse macro replaced for all video histograms that have a constant name.

BUG=webrtc:5283

Review URL: https://codereview.webrtc.org/1616153005

Cr-Commit-Position: refs/heads/master@{#11368}
2016-01-25 13:58:27 +00:00
pbos
5ad935cb56 Remove mutable from rtc::CriticalSection members.
rtc::CriticalSection is now lockable from const methods and no longer
need to remain mutable.

BUG=
R=tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1613643004

Cr-Commit-Position: refs/heads/master@{#11367}
2016-01-25 11:52:53 +00:00
hbos
3fe2c6a161 VideoProcessorImpl using EncodedImage::GetBufferPaddingBytes.
BUG=https://bugs.chromium.org/p/webrtc/issues/detail?id=5424

Review URL: https://codereview.webrtc.org/1618853002

Cr-Commit-Position: refs/heads/master@{#11353}
2016-01-22 08:07:17 +00:00
hbos
d664836efa Added EncodedImage::GetBufferPaddingBytes.
The FFmpeg video decoder requires up to 8 additional bytes to be allocated for its encoded image buffer input, due to optimized byte readers over-reading on some platforms.
We plan to use FFmpeg for a soon-to-land H.264 enc/dec.

This CL adds support for padding encoded image buffers based on codec type, and makes sure calls to VCMEncodedFrame::VerifyAndAllocate use the padding.

All padding constants are 0 but making H.264 pad with 8 bytes will be a one-line change.

Also, added -framework CoreFoundation to webrtc_h264_video_toolbox which was missing.

BUG=chromium:468365
BUG=https://bugs.chromium.org/p/webrtc/issues/detail?id=5424
NOTRY=True

Review URL: https://codereview.webrtc.org/1602523004

Cr-Commit-Position: refs/heads/master@{#11337}
2016-01-21 13:43:18 +00:00
hbos
902c03e724 rtc_use_h264 flag (replacing use_third_party_h264 flag) for building OpenH264/FFmpeg, false by default but can be overridden in supplement.gypi and build_overrides/webrtc.gni.
BUG=468365
NOTRY=True

Review URL: https://codereview.webrtc.org/1601813005

Cr-Commit-Position: refs/heads/master@{#11333}
2016-01-21 11:34:47 +00:00
asapersson
d9f641e341 Reallocate encoded buffer size if needed. Initially set to the input image size.
Issue may occur for very small input images (e.g. 4x4) when encoded image length > input image size.

BUG=chromium:578193

Review URL: https://codereview.webrtc.org/1603643006

Cr-Commit-Position: refs/heads/master@{#11329}
2016-01-21 09:11:43 +00:00