720p x264 .mkv slow on appletv (with gentoo :) )
#16
davilla Wrote:sudo mkdir /lib/firmware

gentoo must not use "/lib/firmware" dir path.


I also don't know anything about gentoo and how it works. Some gentoo person will have to help here.

re-read the wiki, it says "sudo make install" and not "make install".
Reply
#17
im logged in as root so i didnt need sudo. thank you. i will check on gentoo forums about file structure
Reply
#18
i just did
Code:
mkdir /lib/firmware/
everything worked afterwards with this change for the /linux compilation:
Code:
cd /crystalhd/driver/linux
dos2unix configure.ac
dos2unix Makefile.in
autoconf
./configure
make
make install
modprobe crystalhd

see the dos2unix part, which needs to be emerged as well as needed.

Now I am ready to compile XBMC from subversion trunk. do i have to remove my existing xbmc gentoo patched version?
Reply
#19
h2sammo Wrote:im logged in as root so i didnt need sudo. thank you. i will check on gentoo forums about file structure

Logged in as root is very dangerous and a sure way to screw up a system. The only time you should need to is to install and sudo works fine for that. You should not be doing any "make" as root.
Reply
#20
h2sammo Wrote:i just did
Code:
mkdir /lib/firmware/
everything worked afterwards with this change for the /linux compilation:
Code:
cd /crystalhd/driver/linux
dos2unix configure.ac
dos2unix Makefile.in
autoconf
./configure
make
make install
modprobe crystalhd

see the dos2unix part, which needs to be emerged as well as needed.

Now I am ready to compile XBMC from subversion trunk. do i have to remove my existing xbmc gentoo patched version?

http://wiki.xbmc.org/index.php?title=HOW...nd_library does not mention dos2unix and if you have pulled from that tag I referenced, the dos line endings are already fixed.

"do i have to remove my existing xbmc gentoo patched version?" not a clue.
Reply
#21
it didnt work without the dos2unix part...

i have used that command before for compiling crystalhd from broadcom and i figured it would apply here as well, and it did.
Reply
#22
h2sammo Wrote:it didnt work without the dos2unix part...

i have used that command before for compiling crystalhd from broadcom and i figured it would apply here as well, and it did.

Then you are not using the crystalhd-for-osx-1.0.3 tag. R3 corrected the line endings (http://code.google.com/p/crystalhd-for-o...detail?r=3) and that was long long ago...
Reply
#23
yep... i redid the steps... didnt need dos2unix, thx for insisting i was wrong.


Code:
appletv ~ # modprobe crystalhd
appletv ~ # rm -r ~/crystalhd-for-osx-1.0.3
appletv ~ # ls
hybrid_w1  trunk
appletv ~ # svn checkout http://crystalhd-for-osx.googlecode.com/svn/tags/crystalhd-for-osx-1.0.3
A    crystalhd-for-osx-1.0.3/crystalhd
.
.
.
A    crystalhd-for-osx-1.0.3/crystalhd/examples
A    crystalhd-for-osx-1.0.3/crystalhd/examples/hellobcm.cpp
A    crystalhd-for-osx-1.0.3/crystalhd/examples/mpeg2test.cpp
A    crystalhd-for-osx-1.0.3/crystalhd/examples/Makefile
Checked out revision 60.
appletv ~ # ls
crystalhd-for-osx-1.0.3  hybrid_w1  trunk
appletv ~ # cd crystalhd-for-osx-1.0.3/crystalhd/linux_lib/libcrystalhd
appletv libcrystalhd # make
OBJFILES = libcrystalhd_if.o libcrystalhd_int_if.o libcrystalhd_fwcmds.o libcrystalhd_priv.o libcrystalhd_fwdiag_if.o
SRCFILES = libcrystalhd_if.cpp libcrystalhd_int_if.cpp libcrystalhd_fwcmds.cpp libcrystalhd_priv.cpp libcrystalhd_fwdiag_if.cpp
LNM = libcrystalhd.so.1.0 libcrystalhd.so.1
g++  -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -g -Wall -fPIC -shared  -c -o libcrystalhd_if.o libcrystalhd_if.cpp
libcrystalhd_if.cpp: In function 'BC_STATUS DtsProcInput(void*, uint8_t*, uint32_t, uint64_t, BOOL)':
libcrystalhd_if.cpp:1340: warning: format not a string literal and no format arguments
libcrystalhd_if.cpp:1346: warning: format not a string literal and no format arguments
libcrystalhd_if.cpp:1366: warning: format not a string literal and no format arguments
g++  -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -g -Wall -fPIC -shared  -c -o libcrystalhd_int_if.o libcrystalhd_int_if.cpp
g++  -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -g -Wall -fPIC -shared  -c -o libcrystalhd_fwcmds.o libcrystalhd_fwcmds.cpp
g++  -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -g -Wall -fPIC -shared  -c -o libcrystalhd_priv.o libcrystalhd_priv.cpp
libcrystalhd_priv.cpp: In function 'BC_STATUS DtsDeleteMdataPool(DTS_LIB_CONTEXT*)':
libcrystalhd_priv.cpp:579: warning: format '%lx' expects type 'long unsigned int', but argument 2 has type 'uintptr_t'
g++  -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -g -Wall -fPIC -shared  -c -o libcrystalhd_fwdiag_if.o libcrystalhd_fwdiag_if.cpp
g++ -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -g -Wall -fPIC -shared -Wl,-soname,libcrystalhd.so.1 -o libcrystalhd.so.1.0 libcrystalhd_if.o libcrystalhd_int_if.o libcrystalhd_fwcmds.o libcrystalhd_priv.o libcrystalhd_fwdiag_if.o
ln -sf libcrystalhd.so.1.0 libcrystalhd.so
ln -sf libcrystalhd.so.1.0 libcrystalhd.so.1
appletv libcrystalhd # make install
mkdir -p /usr/include/libcrystalhd
cp libcrystalhd_if.h /usr/include/libcrystalhd/
cp ../../include/bc_dts_defs.h /usr/include/libcrystalhd/
cp ../../include/bc_dts_types.h /usr/include/libcrystalhd/
cp ../../firmware/fwbin/70012/bcmFilePlayFw.bin /lib/firmware/
install -m 755 libcrystalhd.so.1.0 /usr/lib
(cd /usr/lib; ln -sf libcrystalhd.so.1.0 libcrystalhd.so)
(cd /usr/lib; ln -sf libcrystalhd.so.1.0 libcrystalhd.so.1)
appletv libcrystalhd # cd ~/crystalhd-for-osx-1.0.3/crystalhd/driver/linux
appletv linux # autoconf
appletv linux # /.configure
-bash: /.configure: No such file or directory
appletv linux # ./configure
checking for ld... ld
configure: creating ./config.status
config.status: creating ./Makefile
appletv linux # make
make -C /lib/modules/2.6.31-gentoo-r6v03/build SUBDIRS=/root/crystalhd-for-osx-1.0.3/crystalhd/driver/linux modules
make[1]: Entering directory `/usr/src/linux-2.6.31-gentoo-r6'
  CC [M]  /root/crystalhd-for-osx-1.0.3/crystalhd/driver/linux/crystalhd_lnx.o
  CC [M]  /root/crystalhd-for-osx-1.0.3/crystalhd/driver/linux/crystalhd_misc.o
  CC [M]  /root/crystalhd-for-osx-1.0.3/crystalhd/driver/linux/crystalhd_cmds.o
  CC [M]  /root/crystalhd-for-osx-1.0.3/crystalhd/driver/linux/crystalhd_hw.o
  LD [M]  /root/crystalhd-for-osx-1.0.3/crystalhd/driver/linux/crystalhd.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /root/crystalhd-for-osx-1.0.3/crystalhd/driver/linux/crystalhd.mod.o
  LD [M]  /root/crystalhd-for-osx-1.0.3/crystalhd/driver/linux/crystalhd.ko
make[1]: Leaving directory `/usr/src/linux-2.6.31-gentoo-r6'
appletv linux # make install
if [ -e "/lib/udev/rules.d" ] ; then cp -f 20-crystalhd.rules /lib/udev/rules.d/ ; fi
if [ -e "/etc/udev/rules.d" ] ; then cp -f 20-crystalhd.rules /etc/udev/rules.d/ ; fi
install -d /lib/modules/2.6.31-gentoo-r6v03/kernel/drivers/video/broadcom
install -m 0644 crystalhd.ko /lib/modules/2.6.31-gentoo-r6v03/kernel/drivers/video/broadcom
/sbin/depmod -a
appletv linux # modprobe crystalhd
Reply
#24
ok i was able to install svn revision 28256 from xbmc-9999 package in gentoo. if anyone is interested how i did it, check this thread: http://forums.gentoo.org/viewtopic-t-827...ight-.html

xbmc opens and play 720p files very stutterish, frankly worse than it was playing it before with Camelot version. i have module crystalhd loaded but i dont see it in xbmc.log.

here is the xbmc.log file: http://pastebin.com/6b3jZPW5

please let me know how i can troubleshoot this further.
Reply
#25
the image stuttering seems to go away after a while, but i do not see any indication of crystalhd in xbmc.log.

here is another log from a longer playback: http://pastebin.com/WqPLcvUn

the cpu usage histogram from conky also shows usage in the 14-15% area with 720p playback (used to be maxed out at 100% with camelot).

i will try to play a fast scene in 720p and report the results
Reply
#26
That version was not built with crystalhd enabled and you are using CDVDVideoCodecFFmpeg. At the very end of the xbmc configure step, your will see a listing of what is enabled and what is not.
Reply
#27
how can i build it with crystalhd enabled? is it a configure option i have to pass? if so how do i pass it?

this is the ebuild the source was compiled based on: http://pastebin.com/yijAAKby
Reply
#28
i use a Panasonic 720p/1080i.

i tested this xbmc revision with the movie Solaris, 1080p mkv file. i do not know too much about how xbmc plays this resolution on my screen but it is refitted such that it fits perfectly. my purpose was to stress the appletv and xbmc/broadcom decoder setup.

with crystalhd module enabled xbmc plays the movie perfectly, stutters only the first few frames after which it catches up. the cpu usage stays at about 15%. this is weird since from my xbmc.log you are saying i compiled this xbmc revision w/out crystalhd support.

if i disable the crystalhd module, xbmc plays the movie stuttering, and never recovers. cpu usage jumps to 100%.
if i re-enable it (crystalhd module), and restart xbmc, playback is good again.

if i play the same file with mplayer it plays very badly (same like xbmc would plays the file w/out crystalhd module enabled) with or w/out crystalhd enabled. the size of the playback frame does NOT fit onto my screen and cpu usage is busting at 100%.

all this makes me believe that however i managed to compile xbmc, it does take into consideration my crystalhd module and makes wonderful use of it. i do not know or understand why the xbmc.log tells a different story.

please explain Smile
Reply
#29
Quote:davilla@atv-doser:~$ cat .xbmc/temp/xbmc.log | grep CrystalHD
01:41:45 T:3044960096 M: 54276096 INFO: CrystalHD: device opened
23:16:41 T:2931817360 M: 80302080 DEBUG: CrystalHD: Input Thread Started...
23:16:41 T:2880588688 M: 80240640 DEBUG: CrystalHD: Output Thread Started...
23:16:41 T:2987703184 M: 80240640 DEBUG: CrystalHD: codec opened
23:16:41 T:2987703184 M: 80240640 INFO: DVDVideoCodecCrystalHD: Opened Broadcom Crystal HD Codec

Classic signature of CrystalHD being used. Your log does not show this.

If it says "NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-4 part 2", then the ffmpeg codec is being used.

Again, I know nothing about gentoo so can't help you there. If CrystalHD is compiled in, then

Skunkworks:xbmc-svn davilla$ grep CRYSTAL config.h
#define HAVE_LIBCRYSTALHD /**/

will be defined. That means configure found the CrystalHD lib.

More classic signs;

Quote:davilla@atv-doser:~$ dmesg
...
[ 221.795261] Starting BCM70012 Device
[ 222.031463] clock is moving to 175 with n 35 with vco_mg 2
[ 222.031494] CInitializing Dio pool 10 1024 505c cda92a20
[ 224.474183] Firmware Downloaded Successfully
[133104.192168] DelQAddr:4fdc8 RelQAddr:4fecc
[221972.844145] App PIB:0 0 420 2 e 410 410 0 0 0
[133106.348233] list_index:0 rx[1] Y:2 UV:2 Int:28 YDnSz:0 UVDnSz:0
[221975.037780] list_index:0 rx[2] Y:2 UV:2 Int:28 YDnSz:0 UVDnSz:0
[221975.598115] list_index:1 rx[3] Y:10 UV:10 Int:2800 YDnSz:0 UVDnSz:0
[133114.126160] Flush issued
[222119.370028] DelQAddr:4fdc8 RelQAddr:4fecc
[133193.712497] App PIB:0 0 420 2 1f 2b8 2b8 0 0 0
[441177.713724] DelQAddr:4fdc8 RelQAddr:4fecc
[441177.949452] App PIB:0 0 420 2 1f 218 218 0 0 0
[526384.427833] DelQAddr:4fdc8 RelQAddr:4fecc
[315645.687929] App PIB:0 0 420 2 1f 218 218 0 0 0
[535358.813941] DelQAddr:4fdc8 RelQAddr:4fecc
[321027.174968] App PIB:0 1 420 2 f 218 218 0 0 0
Reply
#30
i see. so somehow the xbmc.log does not show crystalhd as being used, but dmesg shows it is being used:

Code:
appletv ~ # cat /home/appletv/.xbmc/temp/xbmc.log | grep CrystalHD

my complete dmesg message:

http://pastebin.com/JBdRzQvd

few lines of interest:

Code:
appletv ~ # Broadcom 70012 Decoder 0000:02:00.0: PCI INT A disabled
Loading crystalhd 0.9.27
PCI_INFO: Vendor:0x14e4 Device:0x1612 s_vendor:0x14e4 s_device: 0x2612
Broadcom 70012 Decoder 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
allocated 18 elem
Starting BCM70012 Device
clock is moving to 175 with n 35 with vco_mg 2
CStopping BCM70012 Device
Broadcom 70012 Decoder 0000:02:00.0: setting latency timer to 64
Opening new user[0] handle
Starting BCM70012 Device
clock is moving to 175 with n 35 with vco_mg 2
CInitializing Dio pool 10 1024 605c c81560c0
Firmware Downloaded Successfully
DelQAddr:4fdc8 RelQAddr:4fecc
App PIB:0 ff 420 2 20 330 330 0 0 0
list_index:0 rx[1] Y:2 UV:2 Int:28 YDnSz:0 UVDnSz:0
list_index:1 rx[2] Y:10 UV:10 Int:2800 YDnSz:0 UVDnSz:0
list_index:0 rx[3] Y:2 UV:2 Int:28 YDnSz:0 UVDnSz:0
list_index:1 rx[4] Y:10 UV:10 Int:2800 YDnSz:0 UVDnSz:0
list_index:1 rx[5] Y:10 UV:10 Int:2800 YDnSz:0 UVDnSz:0
list_index:1 rx[6] Y:10 UV:10 Int:2800 YDnSz:0 UVDnSz:0
Closing user[0] handle
Deleting IOQs
Releasing RX Pkt pool
Released dio pool 10
Stopping BCM70012 Device
Opening new user[0] handle
Starting BCM70012 Device
clock is moving to 175 with n 35 with vco_mg 2
CInitializing Dio pool 10 1024 605c c8156cc0
Firmware Downloaded Successfully
DelQAddr:4fdc8 RelQAddr:4fecc
App PIB:0 ff 420 2 20 330 330 0 0 0
Flush issued
Closing user[0] handle
Deleting IOQs
Releasing RX Pkt pool
Released dio pool 10
Stopping BCM70012 Device

well thank you very much. mission accomplished Smile
Reply

Logout Mark Read Team Forum Stats Members Help
720p x264 .mkv slow on appletv (with gentoo :) )0