Last Comment Bug 778385 - We perform 32bpp slow video decoding on arm instead of 16bpp neon
: We perform 32bpp slow video decoding on arm instead of 16bpp neon
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: ARM Linux
: -- normal (vote)
: mozilla17
Assigned To: Oleg Romashin (:romaxa)
:
:
Mentors:
Depends on: 798989
Blocks: 715785
  Show dependency treegraph
 
Reported: 2012-07-27 19:09 PDT by Oleg Romashin (:romaxa)
Modified: 2012-10-07 18:32 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Use platform image format for temp Image surface (3.31 KB, patch)
2012-07-27 19:10 PDT, Oleg Romashin (:romaxa)
roc: feedback+
Details | Diff | Splinter Review
Use Platform offscreen format for 565 optimization when possible (3.63 KB, patch)
2012-08-10 09:17 PDT, Oleg Romashin (:romaxa)
joe: review-
Details | Diff | Splinter Review
Use Platform offscreen format for 565 optimization when possible (3.50 KB, patch)
2012-08-13 10:18 PDT, Oleg Romashin (:romaxa)
joe: review+
Details | Diff | Splinter Review
Use Platform offscreen format for 565 optimization when possible (2.59 KB, patch)
2012-08-14 15:41 PDT, Oleg Romashin (:romaxa)
joe: review+
Details | Diff | Splinter Review

Description Oleg Romashin (:romaxa) 2012-07-27 19:09:33 PDT
We perform yuv decoding into 24bpp surface without any conditions... which makes it slow on mobile (XUL IPC fennec) OMTC compositing without async video layers.

#0  mozilla::layers::PlanarYCbCrImage::GetAsSurface (this=0x4049f980) at gfx/layers/ImageLayers.cpp:461
#1  0x3c1d54dc in mozilla::layers::ImageContainer::LockCurrentAsSurface (this=0x44c78580, aSize=0xaec30c90, aCurrentImage=<value optimized out>)
    at gfx/layers/ImageLayers.cpp:262
#2  0x3c19eab8 in AutoLockImage (this=0x404b3cc0, aContext=0x40408890, aMaskLayer=0x0) at gfx/layers/ImageLayers.h:602
#3  mozilla::layers::BasicShadowableImageLayer::Paint (this=0x404b3cc0, aContext=0x40408890, aMaskLayer=0x0)
    at gfx/layers/basic/BasicImageLayer.cpp:268
#4  0x3c196458 in mozilla::layers::BasicLayerManager::PaintLayer (this=0x44429240, aTarget=0x40408890, aLayer=0x404b3cc0, aCallback=<value optimized out>, aCallbackData=0x0, aReadback=0xaec314f4)
    at gfx/layers/basic/BasicLayerManager.cpp:810
#5  0x3c1954f4 in mozilla::layers::BasicLayerManager::PaintLayer (this=0x44429240, aTarget=0x40408890, aLayer=0x4187dc00, aCallback=0, aCallbackData=0x0, aReadback=0x0)
    at gfx/layers/basic/BasicLayerManager.cpp:823
#6  0x3c196d88 in mozilla::layers::BasicLayerManager::EndTransactionInternal (this=0x44429240, aCallback=0, aCallbackData=0x0, aFlags=<value optimized out>)
    at gfx/layers/basic/BasicLayerManager.cpp:449
#7  0x3c197084 in EndEmptyTransaction (this=0x44429240) at gfx/layers/basic/BasicLayerManager.cpp:513
#8  mozilla::layers::BasicShadowLayerManager::EndEmptyTransaction (this=0x44429240) at gfx/layers/basic/BasicLayerManager.cpp:1039
---Type <return> to continue, or q <return> to quit---
#9  0x3b050960 in PresShell::Paint (this=0x44c5d880, aViewToPaint=0x444fe9a0, aWidgetToPaint=<value optimized out>, aDirtyRegion=..., aIntDirtyRegion=..., aWillSendDidPaint=124)
    at layout/base/nsPresShell.cpp:5268
#10 0x3b5eab7c in nsViewManager::Refresh (this=0x44d8a730, aView=<value optimized out>, aWidget=0x4043b660, aRegion=..., aWillSendDidPaint=true)
    at view/src/nsViewManager.cpp:339
#11 0x3b5ec4f8 in nsViewManager::DispatchEvent (this=0x44d8a730, aEvent=0xaec319c8, aView=0x444fe9a0, aStatus=0x444fe9a0)
    at view/src/nsViewManager.cpp:763
#12 0x3b5e85c4 in HandleEvent (aEvent=0xaec319c8) at view/src/nsView.cpp:127
#13 0x3be0ac84 in mozilla::widget::PuppetWidget::DispatchEvent (this=0x4043b660, event=0xaec319c8, aStatus=@0xaec31a5c)
    at widget/xpwidgets/PuppetWidget.cpp:274
#14 0x3be0be84 in mozilla::widget::PuppetWidget::DispatchPaintEvent (this=0x4043b660) at widget/xpwidgets/PuppetWidget.cpp:509
#15 0x3be0c0d4 in mozilla::widget::PuppetWidget::PaintTask::Run (this=<value optimized out>) at widget/xpwidgets/PuppetWidget.cpp:550
#16 0x3c0cb8fc in nsThread::ProcessNextEvent (this=0x40438d60, mayWait=<value optimized out>, result=0xaec31ae7)
    at xpcom/threads/nsThread.cpp:624
Comment 1 Oleg Romashin (:romaxa) 2012-07-27 19:10:27 PDT
Created attachment 646798 [details] [diff] [review]
Use platform image format for temp Image surface
Comment 2 Oleg Romashin (:romaxa) 2012-08-10 09:17:56 PDT
Created attachment 650905 [details] [diff] [review]
Use Platform offscreen format for 565 optimization when possible

https://tbpl.mozilla.org/?tree=Try&rev=6a03810006ab
Comment 3 Joe Drew (not getting mail) 2012-08-13 09:59:34 PDT
Comment on attachment 650905 [details] [diff] [review]
Use Platform offscreen format for 565 optimization when possible

Review of attachment 650905 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/ImageLayers.cpp
@@ +467,5 @@
>  
> +  gfxASurface::gfxImageFormat format = gfxPlatform::GetPlatform()->GetOffscreenFormat();
> +#if !defined(HAVE_YCBCR_TO_RGB565)
> +  if (format == gfxASurface::ImageFormatRGB16_565) {
> +    format = gfxASurface::ImageFormatRGB24;

Instead of doing this, maybe make imageSurface constructed differently based on HAVE_YCBCR_TO_RGB565.
Comment 4 Oleg Romashin (:romaxa) 2012-08-13 10:18:18 PDT
Created attachment 651448 [details] [diff] [review]
Use Platform offscreen format for 565 optimization when possible

Does this looks better?
Comment 5 Joe Drew (not getting mail) 2012-08-13 10:36:55 PDT
Comment on attachment 651448 [details] [diff] [review]
Use Platform offscreen format for 565 optimization when possible

Review of attachment 651448 [details] [diff] [review]:
-----------------------------------------------------------------

love it
Comment 6 Oleg Romashin (:romaxa) 2012-08-14 15:41:47 PDT
Created attachment 651918 [details] [diff] [review]
Use Platform offscreen format for 565 optimization when possible

Looks like last patch was not good enough...
I think we should reuse gfxUtils wrappers which already handle most of this functionality inside.
Comment 7 Oleg Romashin (:romaxa) 2012-08-14 15:42:15 PDT
Will wait for try finish
https://tbpl.mozilla.org/?tree=Try&rev=b9b980ea8ce7
Comment 8 Joe Drew (not getting mail) 2012-08-16 09:01:55 PDT
Comment on attachment 651918 [details] [diff] [review]
Use Platform offscreen format for 565 optimization when possible

Review of attachment 651918 [details] [diff] [review]:
-----------------------------------------------------------------

very nice!
Comment 10 Ryan VanderMeulen [:RyanVM] 2012-08-16 17:57:06 PDT
https://hg.mozilla.org/mozilla-central/rev/23c6383ace2f

Note You need to log in before you can comment on or make changes to this bug.