oneam / h264bsd

A simple h264 software decoding library
Other
194 stars 52 forks source link

failed to run on 64bit #5

Closed soliton4 closed 7 years ago

soliton4 commented 9 years ago

hi, first of all thx for this project and giving a shoutout to broadway.js i am currently maintaining broadway.js and its great to see other projects picking up the spirit.

i tried to use the h264 sources in your repos to build a native node module. unfortunately when i build it in 64 bit i get a segmentation fault error.

i created a makefile you can use in linux to reproduce the error in 64bit mode. i also tried to fix some of the pointer arithmetic but i was not successful in getting it run: https://github.com/soliton4/h264bsd/commit/98ab48e372af6881f3f3d13fb79c1b35f602d1df

to reproduce type

cd make
make
./binfile ../test/test_640x360.h264 

since i need this for a commercial project i am currently working on it would be great if you could offer any assistance. are the h264 sources from you? if not can you point me to the origin?

thx sol

oneam commented 9 years ago

I've had the same issue. I was forced to compile in 32bit mode. It appears that the decoder library is not 64bit compatible.

The main h264bsd libraries are pulled directly from the Android source. Specifically frameworks/av/media/libstagefright/codecs/on2/h264dec with some modifications. There are too many changes to name here but they're not major (some find/replace and new methods for FFI integration)

When I get a chance I'll see if there are any changes between my version and Android.

oneam commented 9 years ago

The git logs indicate that the h264bsd library from Android was updated with 64bit support last year. I'll upgrade the sources sometime this week.

soliton4 commented 9 years ago

i found the originals too and pulled from https://android.googlesource.com/platform/frameworks/av/+/master/media/libstagefright/codecs/on2/h264dec/

i got the decoder running in a 64 bit build on linux https://github.com/soliton4/h264bsd/tree/sourceUpdate

now i am working on integrating them

what git logs are you refering to?

oneam commented 9 years ago

Extracted from Android git log:

commit 377b2ec9a2885f9b6405b07ba900a9e3f4349c38
Author: Kévin PETIT <kevin.petit@arm.com>
Date:   Mon Feb 3 12:35:36 2014 +0000

Make frameworks/av 64-bit compatible

Contains the necessary changes to make frameworks/av build and work
on a 64-bit machine.

Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>

Change-Id: I725feaae50ed8eee25ca2c947cf15aee1f395c43
soliton4 commented 9 years ago

how do you get access to this log? can you post a link?

oneam commented 9 years ago

This should be easier to grab: https://android.googlesource.com/platform/frameworks/av/+log/master/media/libstagefright/codecs/on2/h264dec/source

oneam commented 9 years ago

I've updated the source to incorporate the 64bit changes from the Android source. Unfortunately, I've only done limited testing (non-visual posix test and js test)

Let me know if you notice any strange behavior.

soliton4 commented 9 years ago

i have created my own build from the android sources. but thanks for taking care of it. i am afraid i dont have the time to do a lot of testing now.