Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1410)

Issue 1515873002: change videotoolbox format from NV12 to I420 (Closed)

Created:
5 years ago by wangrui
Modified:
3 years, 10 months ago
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, zhengzhonghou_agora.io, video-team_agora.io, stefan-webrtc, mflodman
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

change videotoolbox format from NV12 to I420 change videotoolbox encoder input pixelformat from NV12 to I420, also change decoder output from NV12 to I420. I use instruments to test the CPU usage change, there is about 2%~3% CPU drop after remove the conversion from NV12 to I420. BUG=webrtc:5230

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -45 lines) Patch
M webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_decoder.cc View 1 2 chunks +43 lines, -20 lines 0 comments Download
M webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.cc View 1 2 chunks +41 lines, -25 lines 0 comments Download

Messages

Total messages: 10 (3 generated)
wangrui
5 years ago (2015-12-10 08:15:55 UTC) #2
pbos-webrtc
I think tkchin is better for reviewing this than me https://codereview.webrtc.org/1515873002/diff/1/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_decoder.cc File webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_decoder.cc (right): https://codereview.webrtc.org/1515873002/diff/1/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_decoder.cc#newcode57 ...
5 years ago (2015-12-10 12:05:18 UTC) #3
pbos-webrtc
Please also change the CL description (Edit Issue) to <short description, one line> <long description> ...
5 years ago (2015-12-10 12:06:30 UTC) #4
tkchin_webrtc
On 2015/12/10 12:06:30, pbos-webrtc wrote: > Please also change the CL description (Edit Issue) to ...
5 years ago (2015-12-10 22:10:23 UTC) #5
wangrui
On 2015/12/10 22:10:23, tkchin_webrtc wrote: > On 2015/12/10 12:06:30, pbos-webrtc wrote: > > Please also ...
5 years ago (2015-12-11 03:18:46 UTC) #6
wangrui
modify code styles on patch set 2. and test performances after change from NV12 to ...
5 years ago (2015-12-11 03:43:10 UTC) #8
wangrui
4 years, 11 months ago (2016-01-05 01:18:27 UTC) #9
On 2015/12/10 22:10:23, tkchin_webrtc wrote:
> On 2015/12/10 12:06:30, pbos-webrtc wrote:
> > Please also change the CL description (Edit Issue) to 
> > 
> > <short description, one line>
> > 
> > <long description>
> > 
> > BUG=...
> > 
> > (Don't put BUG= at top, that becomes the subject for the CL)
> 
> What is the performance impact? If I420 is not a hardware-supported format,
then
> iOS is likely performing a conversion behind the scenes anyway from the
hardware
> output into the requested format. We should explicitly measure to get an idea
of
> what's going on.

according to comments in VideoToolbox framework:

The compression session creates this pixel buffer pool based on
the compressor's pixel buffer attributes and any pixel buffer
attributes passed in to VTCompressionSessionCreate.  If the
source pixel buffer attributes and the compressor pixel buffer
attributes cannot be reconciled, the pool is based on the source
pixel buffer attributes and the Video Toolbox converts each CVImageBuffer
internally.

So VideoToolbox will do internal conversion between different formats, that
could be a hardware conversion,
so why are we doing an external conversion(definitely soft) when there is an
internal one(could be hardware)?
please consider this. thanks.

Powered by Google App Engine
This is Rietveld 408576698