diff options
author | fischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-10 01:03:23 +0000 |
---|---|---|
committer | fischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-10 01:03:23 +0000 |
commit | 907bc6fb0e9db6b31eef1d3403b116e43ea7bec9 (patch) | |
tree | eb41d143dab8fca0cb5c55296125160462617833 /webkit/media | |
parent | bb12d853e4af985379bd56ba3025ec0d2b087148 (diff) | |
download | chromium_src-907bc6fb0e9db6b31eef1d3403b116e43ea7bec9.zip chromium_src-907bc6fb0e9db6b31eef1d3403b116e43ea7bec9.tar.gz chromium_src-907bc6fb0e9db6b31eef1d3403b116e43ea7bec9.tar.bz2 |
Revert 113895 - <video> decode in hardware!
This uses the GpuVideoDecodeAccelerator machinery (already written to enable
ppapi to take advantage of OpenMAX HW where available) to decode <video> data.
This increases idle CPU from 20% to 45% on one particularly large (internal)
test video (red0.mp4), on an ARM crosbook.
HW decode is done on a best-effort basis; if the GPU code doesn't know how to
deal with a codec/profile we still fall back to ffmpeg for decode. Because the
vast majority of chrome installs will be on HW with no video decode support
(yet) we only attempt HW video decode on platforms we know have a shot at it.
BUG=104579
TEST=manual testing w/ video test matrix, trybots.
Review URL: http://codereview.chromium.org/8686010
TBR=fischman@chromium.org
Review URL: http://codereview.chromium.org/8897022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113908 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/media')
-rw-r--r-- | webkit/media/webmediaplayer_impl.cc | 2 | ||||
-rw-r--r-- | webkit/media/webvideoframe_impl.cc | 14 | ||||
-rw-r--r-- | webkit/media/webvideoframe_impl.h | 13 |
3 files changed, 9 insertions, 20 deletions
diff --git a/webkit/media/webmediaplayer_impl.cc b/webkit/media/webmediaplayer_impl.cc index a4eb991..a246945 100644 --- a/webkit/media/webmediaplayer_impl.cc +++ b/webkit/media/webmediaplayer_impl.cc @@ -700,8 +700,6 @@ void WebMediaPlayerImpl::putCurrentFrame( WebVideoFrameImpl::toVideoFrame(web_video_frame)); proxy_->PutCurrentFrame(video_frame); delete web_video_frame; - } else { - proxy_->PutCurrentFrame(NULL); } } diff --git a/webkit/media/webvideoframe_impl.cc b/webkit/media/webvideoframe_impl.cc index 93970f0..5a5b182 100644 --- a/webkit/media/webvideoframe_impl.cc +++ b/webkit/media/webvideoframe_impl.cc @@ -43,8 +43,6 @@ COMPILE_ASSERT_MATCHING_ENUM(FormatYV16, YV16); COMPILE_ASSERT_MATCHING_ENUM(FormatNV12, NV12); COMPILE_ASSERT_MATCHING_ENUM(FormatEmpty, EMPTY); COMPILE_ASSERT_MATCHING_ENUM(FormatASCII, ASCII); -COMPILE_ASSERT_MATCHING_ENUM(FormatI420, I420); -COMPILE_ASSERT_MATCHING_ENUM(FormatNativeTexture, NATIVE_TEXTURE); WebVideoFrame::Format WebVideoFrameImpl::format() const { if (video_frame_.get()) @@ -77,15 +75,9 @@ int WebVideoFrameImpl::stride(unsigned plane) const { } const void* WebVideoFrameImpl::data(unsigned plane) const { - if (!video_frame_.get() || format() == FormatNativeTexture) - return NULL; - return static_cast<const void*>(video_frame_->data(plane)); -} - -unsigned WebVideoFrameImpl::textureId() const { - if (!video_frame_.get() || format() != FormatNativeTexture) - return 0; - return video_frame_->texture_id(); + if (video_frame_.get()) + return static_cast<const void*>(video_frame_->data(plane)); + return NULL; } } // namespace webkit_media diff --git a/webkit/media/webvideoframe_impl.h b/webkit/media/webvideoframe_impl.h index 72e81a5..f82c4d7 100644 --- a/webkit/media/webvideoframe_impl.h +++ b/webkit/media/webvideoframe_impl.h @@ -19,13 +19,12 @@ class WebVideoFrameImpl : public WebKit::WebVideoFrame { WebVideoFrameImpl(scoped_refptr<media::VideoFrame> video_frame); virtual ~WebVideoFrameImpl(); - virtual WebVideoFrame::Format format() const; - virtual unsigned width() const; - virtual unsigned height() const; - virtual unsigned planes() const; - virtual int stride(unsigned plane) const; - virtual const void* data(unsigned plane) const; - virtual unsigned textureId() const; + virtual WebVideoFrame::Format format() const OVERRIDE; + virtual unsigned width() const OVERRIDE; + virtual unsigned height() const OVERRIDE; + virtual unsigned planes() const OVERRIDE; + virtual int stride(unsigned plane) const OVERRIDE; + virtual const void* data(unsigned plane) const OVERRIDE; private: scoped_refptr<media::VideoFrame> video_frame_; |