The default bug view has changed. See this FAQ.

We perform 32bpp slow video decoding on arm instead of 16bpp neon

RESOLVED FIXED in mozilla17

Status

()

Core
Graphics
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: romaxa, Assigned: romaxa)

Tracking

(Depends on: 1 bug)

Trunk
mozilla17
ARM
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Assignee)

Description

5 years ago
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
(Assignee)

Comment 1

5 years ago
Created attachment 646798 [details] [diff] [review]
Use platform image format for temp Image surface
Assignee: nobody → romaxa
Attachment #646798 - Flags: review?(bas.schouten)
(Assignee)

Updated

5 years ago
Attachment #646798 - Flags: review?(bas.schouten) → feedback?(bas.schouten)
Attachment #646798 - Flags: feedback+
(Assignee)

Comment 2

5 years ago
Created attachment 650905 [details] [diff] [review]
Use Platform offscreen format for 565 optimization when possible

https://tbpl.mozilla.org/?tree=Try&rev=6a03810006ab
Attachment #646798 - Attachment is obsolete: true
Attachment #646798 - Flags: feedback?(bas.schouten)
Attachment #650905 - Flags: review?(bas.schouten)
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.
Attachment #650905 - Flags: review?(bas.schouten) → review-
(Assignee)

Comment 4

5 years ago
Created attachment 651448 [details] [diff] [review]
Use Platform offscreen format for 565 optimization when possible

Does this looks better?
Attachment #650905 - Attachment is obsolete: true
Attachment #651448 - Flags: review?
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
Attachment #651448 - Flags: review? → review+
(Assignee)

Comment 6

5 years ago
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.
Attachment #651448 - Attachment is obsolete: true
(Assignee)

Comment 7

5 years ago
Will wait for try finish
https://tbpl.mozilla.org/?tree=Try&rev=b9b980ea8ce7
(Assignee)

Updated

5 years ago
Attachment #651918 - Flags: review?(joe)
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!
Attachment #651918 - Flags: review?(joe) → review+
(Assignee)

Comment 9

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/23c6383ace2f
https://hg.mozilla.org/mozilla-central/rev/23c6383ace2f
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Depends on: 798989
You need to log in before you can comment on or make changes to this bug.