364 Commits

Author SHA1 Message Date
nisse
0e7c7ce35d Delete webrtc::VideoFrame::CopyFrame.
BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/2371363003
Cr-Commit-Position: refs/heads/master@{#14550}
2016-10-06 12:00:13 +00:00
Kári Tristan Helgason
470c0887b3 Fix modules_unittests on iOS.
Some of the module tests were failing on iOS, causing them to be ignored
on the trybots. Specifically this CL:
- Skips some tests that should not run on the simulator
- Fixes iOS file system test helpers
- Fixes failing nalu parser unittest

BUG=webrtc:4752
R=henrika@webrtc.org, peah@webrtc.org, sprang@webrtc.org
TBR=tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14472}
2016-10-03 11:13:33 +00:00
kwiberg
ac9f876bc0 Sort #includes that got unsorted when gmock.h and gtest.h moved to webrtc/test/
gmock.h and gtest.h were moved (or rather, got wrappers so that we
could put some icky compatibility hacks in one place instead of 500)
in this CL: https://codereview.webrtc.org/2358993004/

NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2381013002
Cr-Commit-Position: refs/heads/master@{#14464}
2016-10-01 05:29:53 +00:00
nisse
115bd153c7 New helper function test::ReadI420Buffer, refactor FrameReader to use it.
This change reduces the number of places where we first fread a I420
frame into a uint8_t buffer, followed by a copy into a frame buffer
object.

BUG=None

Review-Url: https://codereview.webrtc.org/2362683002
Cr-Commit-Position: refs/heads/master@{#14456}
2016-09-30 11:14:11 +00:00
nisse
6f112cc136 Delete unused support for vp8 partitions.
This also makes it possible to drop the RTPFragmentationHeader from
the class VCMEncodedFrame.

BUG=None

Review-Url: https://codereview.webrtc.org/2380933003
Cr-Commit-Position: refs/heads/master@{#14455}
2016-09-30 10:43:07 +00:00
Kári Tristan Helgason
15e4ec334c Remove compat for iOS 7/8
BUG=None
R=magjed@webrtc.org, tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14448}
2016-09-30 06:56:44 +00:00
kwiberg
77eab70470 Enable the -Wundef warning for clang
NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2358993004
Cr-Commit-Position: refs/heads/master@{#14425}
2016-09-29 00:42:08 +00:00
kthelgason
478681e1e6 Move the QP scaling thresholds to the relevant encoders.
Also provide a new set of thresholds for the VideoToolbox encoder. The new thresholds were experimentally determined to work well on the iPhone 6S, and also adequately on the iPhone 5S.

BUG=webrtc:5678

Review-Url: https://codereview.webrtc.org/2309743002
Cr-Commit-Position: refs/heads/master@{#14420}
2016-09-28 15:17:51 +00:00
nisse
e5684c5387 Delete method webrtc::VideoFrame::allocated_size and enum PlaneType.
BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/2380623002
Cr-Commit-Position: refs/heads/master@{#14416}
2016-09-28 10:14:15 +00:00
nisse
64ec8f826f Reland of Move MutableDataY{,U,V} methods to I420Buffer only. (patchset #1 id:1 of https://codereview.webrtc.org/2354223002/ )
Reason for revert:
Downstream application now fixed.

Original issue's description:
> Revert of Move MutableDataY{,U,V} methods to I420Buffer only. (patchset #14 id:260001 of https://codereview.webrtc.org/2278883002/ )
>
> Reason for revert:
> Broke downstream application.
>
> Original issue's description:
> > Move MutableDataY{,U,V} methods to I420Buffer only.
> >
> > Deleted from the VideoFrameBuffer base class.
> >
> > BUG=webrtc:5921
> >
> > Committed: https://crrev.com/5539ef6c03c273f39fadae41ace47fdc11ac6d60
> > Cr-Commit-Position: refs/heads/master@{#14317}
>
> TBR=perkj@webrtc.org,magjed@webrtc.org,pthatcher@webrtc.org,honghaiz@webrtc.org,stefan@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:5921
>
> Committed: https://crrev.com/776870a2599b8f43ad56987f9031690e3ccecde8
> Cr-Commit-Position: refs/heads/master@{#14325}

TBR=perkj@webrtc.org,magjed@webrtc.org,pthatcher@webrtc.org,honghaiz@webrtc.org,stefan@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:5921

Review-Url: https://codereview.webrtc.org/2372483002
Cr-Commit-Position: refs/heads/master@{#14389}
2016-09-27 07:17:40 +00:00
magjed
44428a8aa6 iOS: Always build H264 HW encoder/decoder
This CL removes the use_objc_h264 flag. This means that the VideoToolbox
H264 encoder and decoder will always be built.

BUG=webrtc:4081
NOTRY=TRUE

Review-Url: https://codereview.webrtc.org/2366443003
Cr-Commit-Position: refs/heads/master@{#14372}
2016-09-23 14:01:44 +00:00
asapersson
1490f7aa55 Add histogram for end-to-end delay:
"WebRTC.Video.EndToEndDelayInMs"

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

BUG=webrtc:6409

Review-Url: https://codereview.webrtc.org/1905563002
Cr-Commit-Position: refs/heads/master@{#14367}
2016-09-23 09:09:59 +00:00
nisse
776870a259 Revert of Move MutableDataY{,U,V} methods to I420Buffer only. (patchset #14 id:260001 of https://codereview.webrtc.org/2278883002/ )
Reason for revert:
Broke downstream application.

Original issue's description:
> Move MutableDataY{,U,V} methods to I420Buffer only.
>
> Deleted from the VideoFrameBuffer base class.
>
> BUG=webrtc:5921
>
> Committed: https://crrev.com/5539ef6c03c273f39fadae41ace47fdc11ac6d60
> Cr-Commit-Position: refs/heads/master@{#14317}

TBR=perkj@webrtc.org,magjed@webrtc.org,pthatcher@webrtc.org,honghaiz@webrtc.org,stefan@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5921

Review-Url: https://codereview.webrtc.org/2354223002
Cr-Commit-Position: refs/heads/master@{#14325}
2016-09-21 10:52:21 +00:00
nisse
5539ef6c03 Move MutableDataY{,U,V} methods to I420Buffer only.
Deleted from the VideoFrameBuffer base class.

BUG=webrtc:5921

Review-Url: https://codereview.webrtc.org/2278883002
Cr-Commit-Position: refs/heads/master@{#14317}
2016-09-21 08:27:38 +00:00
Erik Språng
78ce619a0c Extract simulcast rate allocation outside of video encoder.
This is a first step to refactor this code.
I'm deprecating https://codereview.webrtc.org/1913073002 and
implementing this in smaller more isolated steps.

BUG=webrtc:5206
R=asapersson@webrtc.org, kjellander@webrtc.org, noahric@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#14186}
2016-09-12 14:04:56 +00:00
noahric
fac0ff022b Change SimulcastEncoderAdapter to allow a 0 for SetRates.
0 means "pause", so forcing it to the min bitrate means we'll never
allow pausing for internal source encoders.

BUG=

Review-Url: https://codereview.webrtc.org/2304603002
Cr-Commit-Position: refs/heads/master@{#14168}
2016-09-09 17:27:20 +00:00
hbos
c928453fd0 Significantly increased max_num_buffers_ of Vp9FrameBufferPool.
Changed from 10 to 68.

This is to avoid a flake where the limit is exceeded, see
crbug.com/638554. Our performance tests should flag performance
regressions, we shouldn't rely on crashing because the number of
referenced buffers is not tiny to detect this. However, if a really big
number of buffers (>68) are referenced without being dereferenced it is
likely that we have a bug and frames are leaking in which case we can
DCHECK-crash.

BUG=chromium:638554

Review-Url: https://codereview.webrtc.org/2280593002
Cr-Commit-Position: refs/heads/master@{#14084}
2016-09-06 08:38:34 +00:00
perkj
275afc5d2e Add codec name to CodecSpecificInfo and get the codec name stats from there instead.
BUG=webrtc:5687

Review-Url: https://codereview.webrtc.org/2253563002
Cr-Commit-Position: refs/heads/master@{#14012}
2016-09-01 07:21:18 +00:00
kjellander
d8dd190a08 GN: Fix test_support_unittests and MIPS compile issue.
Move the webrtc/test/test_support/metrics sources into
test_support[_unittests] targets.
This is essentially reverting https://webrtc-codereview.appspot.com/5789004
and moving these sources back to the right target.

Add missing foreman_cif.yuv resource needed for these tests.

For MIPS, a compile error was surfacing for logcat_trace_context.h when
flipping bot to GN, which was fixed.

BUG=webrtc:5949
NOTRY=True

Review-Url: https://codereview.webrtc.org/2267113002
Cr-Commit-Position: refs/heads/master@{#13860}
2016-08-23 11:52:19 +00:00
magjed
8177452698 iOS H264VideoToolBoxEncoder: Stop scaling native CVPixelBuffers
If the input to H264VideoToolBoxEncoder is a native CVPixelBuffer and
the quality scaler requests scaling, we fall back to a slow path where
the buffer is converted from NV12 to I420 on the CPU and then uploaded
to a native CVPixelBuffer again. It turns out this scaling is not needed
and that the H264VideoToolBoxEncoder can handle the scaling internally.

BUG=b/30939444

Review-Url: https://codereview.webrtc.org/2258103003
Cr-Commit-Position: refs/heads/master@{#13835}
2016-08-20 17:53:32 +00:00
jianjun.zhu
e1b4d243e2 Skip AUD while extracting SPS and PPS on iOS.
H.264 frames may have AUD before SPS. This change detects AUD and try to extract SPS and PPS behind AUD.

BUG=webrtc:6173

Review-Url: https://codereview.webrtc.org/2209143002
Cr-Commit-Position: refs/heads/master@{#13765}
2016-08-16 01:56:23 +00:00
tkchin
4c45234b81 Fix regression for h264 VideoToolbox entering background.
We need to check the pool to make sure that the encoder session is valid. Otherwise, it appears as if the encoder just does not output frames.

NOTRY=True
BUG=

Review-Url: https://codereview.webrtc.org/2226383002
Cr-Commit-Position: refs/heads/master@{#13698}
2016-08-09 20:02:03 +00:00
tkchin
6ce738da31 Disable encoder scaling on iPhone4S.
Scaling causes us to work the CPU too much, which very quickly degrades quality. This causes us to at least behave better on good networks.

NOTRY=True
BUG=

Review-Url: https://codereview.webrtc.org/2205763002
Cr-Commit-Position: refs/heads/master@{#13630}
2016-08-03 19:57:18 +00:00
Sergey Ulanov
525df3ffd1 Add EncodedImageCallback::OnEncodedImage().
OnEncodedImage() is going to replace Encoded(), which is deprecated now.
The new OnEncodedImage() returns Result struct that contains frame_id,
which tells the encoder RTP timestamp for the frame.

BUG=chromium:621691
R=niklas.enbom@webrtc.org, sprang@webrtc.org, stefan@webrtc.org

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

Committed: https://crrev.com/4c7f4cd2ef76821edca6d773d733a924b0bedd25
Committed: https://crrev.com/ad34dbe934d47f88011045671b4aea00dbd5a795
Cr-Original-Original-Commit-Position: refs/heads/master@{#13613}
Cr-Original-Commit-Position: refs/heads/master@{#13615}
Cr-Commit-Position: refs/heads/master@{#13617}
2016-08-03 00:46:47 +00:00
sergeyu
51db4dd1bd Revert of Add EncodedImageCallback::OnEncodedImage(). (patchset #14 id:300001 of https://codereview.chromium.org/2089773002/ )
Reason for revert:
broke browser_tests

Original issue's description:
> Add EncodedImageCallback::OnEncodedImage().
>
> OnEncodedImage() is going to replace Encoded(), which is deprecated now.
> The new OnEncodedImage() returns Result struct that contains frame_id,
> which tells the encoder RTP timestamp for the frame.
>
> BUG=chromium:621691
> R=niklas.enbom@webrtc.org, sprang@webrtc.org, stefan@webrtc.org
>
> Committed: https://crrev.com/4c7f4cd2ef76821edca6d773d733a924b0bedd25
> Committed: https://crrev.com/ad34dbe934d47f88011045671b4aea00dbd5a795
> Cr-Original-Commit-Position: refs/heads/master@{#13613}
> Cr-Commit-Position: refs/heads/master@{#13615}

TBR=pbos@webrtc.org,mflodman@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,niklas.enbom@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:621691

Review-Url: https://codereview.webrtc.org/2203233002
Cr-Commit-Position: refs/heads/master@{#13616}
2016-08-03 00:33:47 +00:00
Sergey Ulanov
4c7f4cd2ef Add EncodedImageCallback::OnEncodedImage().
OnEncodedImage() is going to replace Encoded(), which is deprecated now.
The new OnEncodedImage() returns Result struct that contains frame_id,
which tells the encoder RTP timestamp for the frame.

BUG=chromium:621691
R=niklas.enbom@webrtc.org, sprang@webrtc.org, stefan@webrtc.org

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

Committed: https://crrev.com/ad34dbe934d47f88011045671b4aea00dbd5a795
Cr-Original-Commit-Position: refs/heads/master@{#13613}
Cr-Commit-Position: refs/heads/master@{#13615}
2016-08-02 22:14:51 +00:00
sergeyu
ac4dc2cefe Revert of Add EncodedImageCallback::OnEncodedImage(). (patchset #13 id:280001 of https://codereview.webrtc.org/2089773002/ )
Reason for revert:
broke internal tests

Original issue's description:
> Add EncodedImageCallback::OnEncodedImage().
>
> OnEncodedImage() is going to replace Encoded(), which is deprecated now.
> The new OnEncodedImage() returns Result struct that contains frame_id,
> which tells the encoder RTP timestamp for the frame.
>
> BUG=chromium:621691
> R=niklas.enbom@webrtc.org, sprang@webrtc.org, stefan@webrtc.org
>
> Committed: https://crrev.com/ad34dbe934d47f88011045671b4aea00dbd5a795
> Cr-Commit-Position: refs/heads/master@{#13613}

TBR=pbos@webrtc.org,mflodman@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,niklas.enbom@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:621691

Review-Url: https://codereview.webrtc.org/2206743002
Cr-Commit-Position: refs/heads/master@{#13614}
2016-08-02 21:33:21 +00:00
Sergey Ulanov
ad34dbe934 Add EncodedImageCallback::OnEncodedImage().
OnEncodedImage() is going to replace Encoded(), which is deprecated now.
The new OnEncodedImage() returns Result struct that contains frame_id,
which tells the encoder RTP timestamp for the frame.

BUG=chromium:621691
R=niklas.enbom@webrtc.org, sprang@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13613}
2016-08-02 20:44:25 +00:00
jackychen
8bc773430f Memset svc_params in vp9 wrapper to avoid undefined behavior.
Due to a recent interface change for svc_params in vp9 svc, which
allows speed setting per layer, svc_params should be inited to 0
for safety.

Review-Url: https://codereview.webrtc.org/2179753003
Cr-Commit-Position: refs/heads/master@{#13561}
2016-07-28 20:07:52 +00:00
magjed
62d695f655 iOS HW encoder: Increase data rate limit
The iOS H264 video toolbox encoder is currently undershooting the
intended bitrate. This seems to be caused by the data rate limit
property. This CL increases the data rate limit to a set
percentage above the intended bitrate to avoid undershooting. The
AverageBitRate property is still set to the intended bitrate, which
keeps it from overshooting the intended bitrate.

BUG=b/28713684

Review-Url: https://codereview.webrtc.org/2177873003
Cr-Commit-Position: refs/heads/master@{#13526}
2016-07-26 10:10:37 +00:00
Marco
433ed06800 Adjust parameter in vp9 videoprocessor_integration test.
Needed for libvpx roll, to prevent failure on arm.

TBR=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13495}
2016-07-16 16:02:19 +00:00
magjed
11dd52bcc6 H264VideoToolboxEncoder: Add support for native handles
Support encoding from CVPixelBuffers directly in H264VideoToolboxEncoder.
If the frame needs to be scaled, it will fall back to the previous slow
path:
CVPixelBuffer -> NV12 -> I420 -> (scale) I420 -> NV12 -> CVPixelBuffer.

BUG=webrtc:4081

Review-Url: https://codereview.webrtc.org/2140573002
Cr-Commit-Position: refs/heads/master@{#13439}
2016-07-12 08:26:47 +00:00
noahric
fe3654d5dc Add native handle support to SimulcastEncoderAdapter.
If all subencoders support textures, the adapter will claim support.
Texture frames will be passed on directly to subencoders, without any
attempt at scaling, and subencoders will be expected to sample/scale
correctly from source textures.

BUG=
NOTRY=true

Review-Url: https://codereview.webrtc.org/2099483002
Cr-Commit-Position: refs/heads/master@{#13365}
2016-07-01 16:06:00 +00:00
André Susano Pinto
e703f41336 Remove unused copy of last received keyframe.
Copy method was the user of those fields but it has been removed in May 2015 by refs/heads/master@{#9244}.

R=pbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13362}
2016-07-01 11:36:21 +00:00
Peter Boström
3d2e853f86 Replace OS_ANDROID define to disable webrtc test.
Replaces OS_ANDROID with WEBRTC_ANDROID to disable
ProcessNoLossChangeFrameRateFrameDropVP9 on Android.

BUG=webrtc:6057
R=danilchap@webrtc.org
TBR=phoglund@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13300}
2016-06-27 17:47:20 +00:00
Patrik Höglund
3532ee2f0a Disable flaky ProcessNoLossChangeFrameRateFrameDropVP9 on Android
BUG=webrtc:6057
R=pbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13298}
2016-06-27 16:17:21 +00:00
Peter Boström
329c9407e0 Add encoder/decoder names to software H264.
BUG=
R=hbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13258}
2016-06-22 16:27:11 +00:00
Peter Boström
6d3e0c22c3 Use QualityScaler for OpenH264 encoder.
BUG=
R=sprang@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13222}
2016-06-20 18:49:45 +00:00
nisse
ac62bd4a3b Rewrite CreateBlackFrame in webrtcvideoengine.
Don't use VideoFrameBuffer::MutableDataY and friends, instead, use
I420Buffer::SetToBlack.

Also introduce static method I420Buffer::Create, to create an object and
return a scoped_refptr.

TBR=marpan@webrtc.org # Trivial change to video_denoiser.cc
BUG=webrtc:5921

Review-Url: https://codereview.webrtc.org/2078943002
Cr-Commit-Position: refs/heads/master@{#13212}
2016-06-20 10:39:00 +00:00
nisse
ca6d5d1c9f Partial reland of Delete unused and almost unused frame-related methods. (patchset #1 id:1 of https://codereview.webrtc.org/2076113002/ )
Reason for revert:
Taking out the VideoFrameBuffer changes which broke downstream.

Original issue's description:
> Revert of Delete unused and almost unused frame-related methods. (patchset #12 id:220001 of https://codereview.webrtc.org/2065733003/ )
>
> Reason for revert:
> Breaks downstream applications which inherits webrtc::VideoFrameBuffer and tries to override deleted methods data(), stride() and MutableData().
>
> Original issue's description:
> > Delete unused and almost unused frame-related methods.
> >
> > webrtc::VideoFrame::set_video_frame_buffer
> > webrtc::VideoFrame::ConvertNativeToI420Frame
> >
> > cricket::WebRtcVideoFrame::InitToBlack
> >
> > VideoFrameBuffer::data
> > VideoFrameBuffer::stride
> > VideoFrameBuffer::MutableData
> >
> > TBR=tkchin@webrtc.org # Refactoring affecting RTCVideoFrame
> > BUG=webrtc:5682
> >
> > Committed: https://crrev.com/76270de4bc2dac188f10f805e6e2fb86693ef864
> > Cr-Commit-Position: refs/heads/master@{#13183}
>
> TBR=perkj@webrtc.org,pbos@webrtc.org,marpan@webrtc.org,tkchin@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:5682
>
> Committed: https://crrev.com/72e735d3867a0fd6ab7e4d0761c7ba5f6c068617
> Cr-Commit-Position: refs/heads/master@{#13184}

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

Review-Url: https://codereview.webrtc.org/2076123002
Cr-Commit-Position: refs/heads/master@{#13189}
2016-06-17 12:03:09 +00:00
nisse
72e735d386 Revert of Delete unused and almost unused frame-related methods. (patchset #12 id:220001 of https://codereview.webrtc.org/2065733003/ )
Reason for revert:
Breaks downstream applications which inherits webrtc::VideoFrameBuffer and tries to override deleted methods data(), stride() and MutableData().

Original issue's description:
> Delete unused and almost unused frame-related methods.
>
> webrtc::VideoFrame::set_video_frame_buffer
> webrtc::VideoFrame::ConvertNativeToI420Frame
>
> cricket::WebRtcVideoFrame::InitToBlack
>
> VideoFrameBuffer::data
> VideoFrameBuffer::stride
> VideoFrameBuffer::MutableData
>
> TBR=tkchin@webrtc.org # Refactoring affecting RTCVideoFrame
> BUG=webrtc:5682
>
> Committed: https://crrev.com/76270de4bc2dac188f10f805e6e2fb86693ef864
> Cr-Commit-Position: refs/heads/master@{#13183}

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

Review-Url: https://codereview.webrtc.org/2076113002
Cr-Commit-Position: refs/heads/master@{#13184}
2016-06-17 09:55:23 +00:00
nisse
76270de4bc Delete unused and almost unused frame-related methods.
webrtc::VideoFrame::set_video_frame_buffer
webrtc::VideoFrame::ConvertNativeToI420Frame

cricket::WebRtcVideoFrame::InitToBlack

VideoFrameBuffer::data
VideoFrameBuffer::stride
VideoFrameBuffer::MutableData

TBR=tkchin@webrtc.org # Refactoring affecting RTCVideoFrame
BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/2065733003
Cr-Commit-Position: refs/heads/master@{#13183}
2016-06-17 09:00:19 +00:00
Alex Glaznev
2cc8baa144 Adjust the amount of VP8 encoder threads for Android builds.
Current number of threads selection code does not work well
for Android builds - middle and low end devices are having hard time
encoding VGA and QVGA with just one thread.

Increase the amount of vp8 encoder threads for 180p and above resolution.

Also limit maximum number of thread to 3, since for 8 core devices
most of time 4 cores are idle when thermal throttling kicks in.

BUG=b/27946721
R=marpan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13142}
2016-06-14 21:28:42 +00:00
Niels Möller
718a763d59 Refactor scaling.
Introduce a new method I420Buffer::CropAndScale, and a static
convenience helper I420Buffer::CenterCropAndScale. Use them for almost
all scaling needs.

Delete the Scaler class and the cricket::VideoFrame::Stretch* methods.

BUG=webrtc:5682
R=pbos@webrtc.org, perkj@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13110}
2016-06-13 11:06:14 +00:00
kjellander
fb11424551 GN: Add modules_unittests
Changes:
* Enabled protobuf for iOS globally.
* Set WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE on a global
scope similar to GYP since tests depend on it.
* Added missing rtc_libvpx_build_vp9 variable.
* Moved out audio_coding defines into .gni file to avoid code duplication
* Renamed files to avoid object naming conflicts that GN disallows:
  * webrtc/modules/audio_processing/{echo_cancellation_unittest.cc->echo_cancellation_bit_exact_unittest.cc}
  * webrtc/modules/video_coding/codecs/vp9/{screenshare_layers_unittest.cc->vp9_screenshare_layers_unittest.cc}

BUG=webrtc:5949
TESTED=Built and ran the tests on Mac. Also ran:
gn gen out/Default --args="rtc_enable_bwe_test_logging=true"
and verified that more objects are being built (1885 vs 1883)
when compiling modules_unittests.

NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2041233006
Cr-Commit-Position: refs/heads/master@{#13108}
2016-06-13 07:19:53 +00:00
Peter Bostrom
58d4fe7be9 Reduce VT keyframe frequency.
Also adds data rate limit in addition to average bitrate.

BUG=webrtc:5815
R=mflodman@webrtc.org, pbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13017}
2016-06-02 13:36:48 +00:00
nisse
69adc9c7c0 Delete unused code in webrtc_libyuv.cc.
Delete unused ConvertFromYV12, and dead prototypes ConvertRGB24ToARGB
ConvertNV12ToRGB565. Move Calc16ByteAlignedStride to the test file
where it is used.

BUG=

Review-Url: https://codereview.webrtc.org/2021843002
Cr-Commit-Position: refs/heads/master@{#13003}
2016-06-02 07:58:43 +00:00
hbos
073eb7ed1e Updated #if in IsH264CodecSupported to match H264[En/De]coder::Create.
This will hopefully resolve a crash that might occur if it thinks H264 is
supported when in fact it isn't.

BUG=chromium:615513

Review-Url: https://codereview.webrtc.org/2018273002
Cr-Commit-Position: refs/heads/master@{#12958}
2016-05-30 12:15:33 +00:00
Peter Boström
a4463bcd07 Report framedrops outside libvpx to QualityScaler.
BUG=webrtc:5678
R=danilchap@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12896}
2016-05-25 16:08:55 +00:00
noahric
57779104f0 Forward Encode failure codes from sub encoders.
Previously, failure codes were ignored, which meant simulcasted codecs
couldn't e.g. trigger software fallback. This stops the simulcasted
Encode call at the first faiulre and returns that code.

Another option is to continue sending the frame to the other encoders
but still return the first failure code. It's not clear that that is any
better than just quitting as soon as a failure happens.

BUG=

Review-Url: https://codereview.webrtc.org/2008723002
Cr-Commit-Position: refs/heads/master@{#12892}
2016-05-25 13:48:54 +00:00