Reason for revert:
Internal project has been fixed
Original issue's description:
> Revert of Move bitstream parser to more appropriate directory. (patchset #4 id:60001 of https://codereview.webrtc.org/2370853005/ )
>
> Reason for revert:
> Breaks internal project
>
> Original issue's description:
> > Move current bitstream parser to more appropriate directory.
> >
> > This CL groups together the code that has to do with parsing H264 bitstreams.
> > This code logically belongs together, and having it in the same directory not
> > only simplifies things from a project structure perspective, but also makes it
> > easier to refactor out common parts incrementally.
> > An added benefit is that this simplifies modular compilation, where for example
> > one would like a build of WebRTC without the H264 codec-specific parts.
> >
> > BUG=webrtc:6338
> >
> > Committed: https://crrev.com/cc6817e9ce4a5ffc73efb660cf0368afbc7d9a4f
> > Cr-Commit-Position: refs/heads/master@{#14684}
>
> TBR=magjed@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:6338
>
> Committed: https://crrev.com/f04f14e772f803de39f8a6128e5157127cd35103
> Cr-Commit-Position: refs/heads/master@{#14685}
TBR=magjed@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:6338
Review-Url: https://codereview.webrtc.org/2434043002
Cr-Commit-Position: refs/heads/master@{#14783}
This refactoring allows runtime checks that functions that access
codec specific information are using the correct union member.
The API also allows replacing the union with another implementation
without changes at calling sites.
BUG=webrtc:6603
Review-Url: https://codereview.webrtc.org/2001533003
Cr-Commit-Position: refs/heads/master@{#14775}
The API has changed for the slice config of SSpatialLayerConfig as of
OpenH264 v1.6. Update H264EncoderImpl with an ifdef that uses the
correct API depending on what version of OpenH264 is being used.
BUG=webrtc:6583
Review-Url: https://codereview.webrtc.org/2440113002
Cr-Commit-Position: refs/heads/master@{#14762}
This CL makes scaling and cropping lazy in AVFoundationVideoCapturer and
provides optimized paths for SW and HW encoding. For SW encoding, an
efficient NV12 -> I420 cropping and scaling is implemented in
CoreVideoFrameBuffer::NativeToI420. For HW encoding, an efficient NV12 ->
NV12 cropping and scaling is implemented in
CoreVideoFrameBuffer::CropAndScaleTo. The performance improvement over
the existing cropping and scaling is that it is now done in one step
instead of making an intermediary copy of the Y plane.
There might still be room for improvement in the HW path using some HW
support. That will be explored in a future CL.
BUG=b/30939444
Review-Url: https://codereview.webrtc.org/2394483005
Cr-Commit-Position: refs/heads/master@{#14701}
Reason for revert:
Breaks internal project
Original issue's description:
> Move current bitstream parser to more appropriate directory.
>
> This CL groups together the code that has to do with parsing H264 bitstreams.
> This code logically belongs together, and having it in the same directory not
> only simplifies things from a project structure perspective, but also makes it
> easier to refactor out common parts incrementally.
> An added benefit is that this simplifies modular compilation, where for example
> one would like a build of WebRTC without the H264 codec-specific parts.
>
> BUG=webrtc:6338
>
> Committed: https://crrev.com/cc6817e9ce4a5ffc73efb660cf0368afbc7d9a4f
> Cr-Commit-Position: refs/heads/master@{#14684}
TBR=magjed@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:6338
Review-Url: https://codereview.webrtc.org/2430353004
Cr-Commit-Position: refs/heads/master@{#14685}
This CL groups together the code that has to do with parsing H264 bitstreams.
This code logically belongs together, and having it in the same directory not
only simplifies things from a project structure perspective, but also makes it
easier to refactor out common parts incrementally.
An added benefit is that this simplifies modular compilation, where for example
one would like a build of WebRTC without the H264 codec-specific parts.
BUG=webrtc:6338
Review-Url: https://codereview.webrtc.org/2370853005
Cr-Commit-Position: refs/heads/master@{#14684}
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}
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}
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}
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}
"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}
Deleted from the VideoFrameBuffer base class.
BUG=webrtc:5921
Review-Url: https://codereview.webrtc.org/2278883002
Cr-Commit-Position: refs/heads/master@{#14317}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}