-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
amlcodec: cleanup and simplify 3D handling code #13552
Conversation
Supersedes #13523 |
perhaps sysinfo should be cleaned up now. http://ix.io/Ltm |
ec9e4d1
to
a0cf7d3
Compare
Thanks @stefansaraev, I have included your patch into my commit. |
Ping @peak3d |
@@ -54,8 +54,7 @@ | |||
|
|||
// amcodec include | |||
extern "C" { | |||
#include <codec.h> | |||
#include <amports/amstream.h> | |||
#include <amcodec/codec.h> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
aml_ioctl_get(am_private->vcodec.handle, AMSTREAM_IOC_GET_3D_TYPE, (unsigned long)&decoder_sm); | ||
|
||
switch (decoder_sm) | ||
switch (m_processInfo.GetVideoSettings().m_StereoMode) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
} | ||
else | ||
SetVideo3dMode(MODE_3D_DISABLE); | ||
std::string videoStereoMode = GetVideoStereoMode(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
a0cf7d3
to
f355fb1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx @codesnake
Cleanup and simplify AMLCodec 3D handling code.
Description
AMLCodec historically uses AML kernel 3D post process manager for 3D to 2D conversion. In AML kernel 3.10 that worked more or less, but in kernel 3.14 it doesn't work at all and when you select 2D mode for a 3D video it just freezes. Because of that in LibreELEC AML 3D post process manager is disabled. When it is disabled Kodi just emulates 3D to 2D conversion by setting proper destination rectangle for video, displaying only top view for top/bottom (TAB) videos or only left view for left/right (SBS) videos. Because 3D to 2D coversion using AML 3D post process manager is not stable and causes problems I have removed that code from AMLCodec, but 3D to 2D conversion still continues to function properly.
Also I have removed the AMSTREAM_IOC_GET_3D_TYPE IOCTL call because it doesn't have any sense when AML 3D post process manager is disabled, and always returns 0. Moreover AMSTREAM_IOC_GET_3D_TYPE IOCTL was introduced only with kernel 3.14, so Kodi doesn't compile for older AML devices that use kernel 3.10, such as WeTek Core.
Motivation and Context
How Has This Been Tested?
Tested by playing TAB and SBS videos in 3D and 2D modes on a WeTek Hub (S905) connected to 3D TV.
Screenshots (if appropriate):
Types of change
Checklist: