crystalhd

128 views
Skip to first unread message

rvdb

unread,
Feb 12, 2012, 4:53:26 PM2/12/12
to Android-x86
Hi, i am trying to port crystalhd.
kernel module and ffmpeg is no problem, but
user-land library libcrystalhd is using shm.
I know Google doesn't want us to use shm, but is there any
hack (in bionic libc?) to use it?
Or any other way?

tRene

monurdemirel

unread,
Feb 12, 2012, 7:29:04 PM2/12/12
to Android-x86
hi
I am using crystal hd on my s10-3t tablet. i can help for testing your
builds.
Good luck

rvdb

unread,
Feb 18, 2012, 6:44:25 AM2/18/12
to Android-x86
Oke, so others may use it if they want, I will awnser my own question.

The libcrystalhd userspace Library is using posix Shared Memory, and
Android doesn't use that.
(If applications are not nice, they can kill youre system, especially
since
android might kill any application and then SHM is not freed.
This application wil resuse its shared memory, so I do not believe
this
is a problem).

All shm is handled by the kernel, not from userspace.
So we need a kernel with SHM enabled.

Next step is to interface between a user programm and the kernel,
normally
the C library will do that. But not the bionic libc used by android.
In 2008 shm was enabled but only for arm. For x86 it was never
enabled.

There is however a syscall interface in this libc, so we "only" need
to create some functions (like shmget) call the correct syscall
(IPC-117) and create our own shm.h.
N.B. the one I created will only work on recent kernels on 32 bit x86.

All in all this libcrystalhd will compile, and is working on my system
(wetab)
(tested with a ffmpeg and libffmpeg, It did about 60fps on a H264
decode,
decode only no display at this time)

Using this in dolphin-player-x86 will still give me missing frames, I
believe
this is not a decode, but a display problem.
(Maybe color-space convertions or something like that).

If anyone can help here ?

Greetings Rene

rvdb

unread,
Feb 18, 2012, 8:14:38 AM2/18/12
to Android-x86

Chih-Wei Huang

unread,
Feb 19, 2012, 11:21:56 PM2/19/12
to andro...@googlegroups.com
2012/2/18 rvdb <rene.van....@gmail.com>:

> There is however a syscall interface in this libc, so we "only" need
> to create some functions (like shmget) call the correct syscall
> (IPC-117) and create our own shm.h.

If you just hope to add some missed syscall to
bionic, that's pretty easy.
See the git log of bionic, as example,
how I added missed ioperm and iopl to bionic.

But remind that Android discourages to use
traditional System V IPC. See
bionic/libc/docs/SYSV-IPC.TXT for details.

> N.B. the one I created will only work on recent kernels on 32 bit x86.
> All in all this libcrystalhd will compile, and is working on my system
> (wetab)
> (tested with a ffmpeg and libffmpeg, It did about 60fps on a H264
> decode,
> decode only no display at this time)

Wow, sounds great!

> Using this in dolphin-player-x86 will still give me missing frames, I
> believe
> this is not a decode, but a display problem.
> (Maybe color-space convertions or something like that).
>
> If anyone can help here ?


--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Reply all
Reply to author
Forward
0 new messages