Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i.MX6 rework which decouples GUI (fb0) and video rendering (fb1), framebuffers are composed with DP in hw #6351

Merged
merged 8 commits into from Mar 1, 2015

Conversation

smallint
Copy link
Contributor

@smallint smallint commented Feb 5, 2015

This is another rework of the i.IMX6 decoding and rendering path that supersedes #5805. More details in http://forum.kodi.tv/showthread.php?tid=211289&pid=1892440#pid1892440.

Excerpt of architecture:

  • Instead of render VPU decoded buffers with GPU (which involves expensive memory copy operations in combination with de-interlacing) we now render exclusively to another hardware framebuffer (fb1)
  • Rendering directly to this new framebuffer can be combined with de-interlacing in one step
  • DP combines both framebuffers in hardware with alpha blending (if 32bpp) or colour keying (if 16bpp)
  • Together with the optimizations brought in by @FernetMenta regarding video rendering we can now even achieve double rate de-interlacing of 1080i streams
  • In a nutshell: video rendering with GPU is bad, IPU is good

What does not work yet:

  • RenderCapture

TODOs:

  • Find a better place for class CIMXContext which is currently part of the decoder implementation but required on some other places as well

Recommendations for client setup:

  • enable VPU@352Mhz in kernel
  • setup 32 bit framebuffer in uEnv.txt (bpp=32)
  • disable console blanking in uEnv.txt (consoleblank=0)

Have fun!

@smallint
Copy link
Contributor Author

smallint commented Feb 5, 2015

One additional note: algorithmdirtyregions must be set to either 0 or 3. 1 and 2 do not work for the time being. I suppose that is a side effect of the hardware clipping work in progress.

@@ -618,7 +663,6 @@ void CLinuxRendererGLES::FlipPage(int source)
m_iYV12RenderBuffer = NextYV12Texture();

m_buffers[m_iYV12RenderBuffer].flipindex = ++m_flipindex;

This comment was marked as spam.

This comment was marked as spam.

@FernetMenta
Copy link
Contributor

this is mostly code exclusively used by MX6 which you know best. the other code looks ok to me.

@fritsch
Copy link
Member

fritsch commented Feb 6, 2015

On the raspberry PI the gui update is slowed down, when in video mode. I tried this afternoon to apply the specific patch also to the imx work, but it works a bit different.

Is there a chance that we e.g. throttle the OSD rendering, codec screen, when playing fullscreen video?

That would help imx, wetek and all those a lot. But is slightly off topic here.

@smallint
Copy link
Contributor Author

smallint commented Feb 6, 2015

@koying, it would be interesting if that PR works on Android as well. If not it is most likely just a matter of device names which are different there. If it won't work at all I could still activate the old path and your Bob deinterlacer for Android. I would like to avoid to break Android support with that PR.

@wolfgar
Copy link
Contributor

wolfgar commented Feb 7, 2015

Thanks a lot smallint for this PR.
I am definitively convinced that this approach is the one which gets the best out of the imx6 architecture...

@koying
Copy link
Contributor

koying commented Feb 7, 2015

@smallint Would you mind adding a high level description of the new architecture in the PR header, please.
Both for my comprehension and for future reference ;)

[EDIT] in tl;dr style, I mean ;)

@smallint smallint changed the title i.MX6 rework i.MX6 rework which decouples GUI (fb0) and video rendering (fb1), framebuffers are composed with DP in hw Feb 7, 2015
@smallint
Copy link
Contributor Author

smallint commented Feb 7, 2015

@koying, I tried ... OK?

@koying
Copy link
Contributor

koying commented Feb 7, 2015

Perfect thanks. Re your initial question, it works the same way with amlogic, so if the permissions are set right in the FW, we should be able to do the same thing on android.

@smallint
Copy link
Contributor Author

Latest changes and impressive improvements from @wolfgar merged (thanks) and tested. RenderCapture was added and this PR is now complete.

@fritsch
Copy link
Member

fritsch commented Feb 20, 2015

Then let's build it. Thank you very much for bringing IMX to a new level.

jenkins build this please

@wolfgar
Copy link
Contributor

wolfgar commented Feb 21, 2015

Thanks a lot for your tremendous work on this rendering refactoring @smallint
I have just tested that the current rebase works fine
To me it is all good for merge...

@fritsch
Copy link
Member

fritsch commented Feb 21, 2015

Oki - final build after laster build and that's wait for @FernetMenta final ack.

jenkins build this please

Edit: jenkins build to only show, we did not regress other platforms.

@wolfgar
Copy link
Contributor

wolfgar commented Feb 21, 2015

To fix little remaining build issue : wolfgar@e9b6dfe

@fritsch
Copy link
Member

fritsch commented Feb 21, 2015

@FernetMenta
Copy link
Contributor

+1

@fritsch
Copy link
Member

fritsch commented Feb 22, 2015

jenkins build this please

@MartijnKaijser
Copy link
Member

feature merge window is closed so this can go in 1 March

@MartijnKaijser MartijnKaijser added this to the I******* 15.0-alpha2 milestone Feb 22, 2015
@fritsch
Copy link
Member

fritsch commented Feb 22, 2015

Sorry for yet another build, did not see that: wolfgar@e9b6dfe was not yet picked.

@FernetMenta
Copy link
Contributor

we agreed that we start Match 1st with new process. currently we don't have a merge window, means this can go in when ready. I also want the pvr binary addon PR merged soon because it blocks pvr development.

@smallint
Copy link
Contributor Author

I picked the fix from @wolfgar and removed the compiler warning. Hope it builds now.

@fritsch
Copy link
Member

fritsch commented Feb 22, 2015

jenkins build this please

@wolfgar
Copy link
Contributor

wolfgar commented Feb 22, 2015

seems the build issue is unrelated to this commit so we may be fine ?

@MartijnKaijser
Copy link
Member

jenkins build this please

fritsch added a commit that referenced this pull request Mar 1, 2015
i.MX6 rework which decouples GUI (fb0) and video rendering (fb1), framebuffers are composed with DP in hw
@fritsch fritsch merged commit 645b1c6 into xbmc:master Mar 1, 2015
@fritsch
Copy link
Member

fritsch commented Mar 1, 2015

Thanks to everyone involved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants