Hi,
About 'Welcome.mpg', I'm sorry that it includes audio data. So with the switch '-t'
./mpeg2dec -t Welcome.mpg
we can see the beautiful sand art.
For Nios CPU, we already have the directory '/uClinux-dist/lib/mpeg2dec', and we can select it from the 'menuconfig'. So.
make menuconfig
Kernel/Library/Defaults Selection ---> <Select>
Customize Application/Library Settings < Exit > < Exit >
Library Configuration ---> <Select>
Build libmpeg2 < Exit > < Exit >
.
Before to 'make', please modify the file '/uClinux-dist/lib/mpeg2dec/mpeg2dec-0.4.1/configure' line 23984 like
echo "$as_me:$LINENO: checking if libtool supports -prefer-non-pic flag" >&5
echo $ECHO_N "checking if libtool supports -prefer-non-pic flag... $ECHO_C" >&6
mkdir ac_test_libtool; cd ac_test_libtool; ac_cv_libtool_non_pic=no
echo "int g (int i); static int h (int i) {return g (i);} int f (int i) {return h (i);}" >f.c
echo "int (* hook) (int) = 0; int g (int i) {if (hook) i = hook (i); return i + 1;}" >g.c
../libtool --mode=compile $CC $CFLAGS -prefer-non-pic
-c f.c >/dev/null 2>&1 &&
../libtool --mode=compile $CC $CFLAGS -prefer-non-pic
-c g.c >/dev/null 2>&1 &&
../libtool --mode=link $CC $CFLAGS -prefer-non-pic -o libfoo.la
-rpath / f.lo g.lo >/dev/null 2>&1 &&
ac_cv_libtool_non_pic=yes
cd ..; rm -fr ac_test_libtool; echo "$as_me:$LINENO: result: $ac_cv_libtool_non_pic" >&5
echo "${ECHO_T}$ac_cv_libtool_non_pic" >&6
if test x"$ac_cv_libtool_non_pic" = x"yes"; then
# LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS -prefer-non-pic" <-- line 23984
LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS -fPIC"
else
:
fi
.
(Without this,we have some relocation bugs that is caused the dynamic linking.)
After the compilation, you can get 'libmpeg2.so.0' and 'libmpeg2convert.so.0' in '/usr/lib' automatically, but copy 'mpeg2dec' in the directory 'uClinux-dist/lib/mpeg2dec/build/src/.libs' by yourself to the adequate directory e.g. '/usr/bin' with 'nokia7_dual.bit'. And please execute
./mpeg2dec -o pgm nokia7_dual.bit
In my NEEK, the result is fine.
Kazu