[MPlayer-users] arm bitstream reader problems with svq3, mjpeg
smagoun at mac.com
Thu Apr 19 20:49:14 CEST 2007
I'm having some trouble with Sorenson v3 and MJPEG content on ARM
(XScale LE). It looks like A32_BITSTREAM_READER is broken (causing
trouble with svq3). I disabled the A32 reader, which in turn broke
MJPEG playback. Naturally I want both to work.
All Sorenson 3 content is scrambled, and MPlayer outputs lots of
errors like the following when playing an svq3 movie:
[svq3 @ 0x571c94]warning: first frame is no keyframe
[svq3 @ 0x571c94]error while decoding block
[svq3 @ 0x571c94]error while decoding MB 27 1
Error while decoding frame!
I'm using mplayer svn 23017 with libavcodec and libavformat svn 8738
(as someone already reported, changes to the ac3 parser break
compilation in libavcodec/libavformat 8739). Kernel is 18.104.22.168,
distro is a Montavista Linux derivative. libc is 2.3.2. I'm cross-
compiling with gcc 3.4.5, though I get the same results compiling
natively on ARM with gcc 3.3.1. Compiling at -O0 doesn't make a
I dug in a bit and found GET_CACHE was returning bad data.
Specifically, for the sample at http://samples.mplayerhq.hu/V-codecs/
In the very first call to svq3_get_ue_golomb for that sample, 'buf'
is populated with 0x3e25f040. On x86 I observed the value 0xf897c100,
which is 0x3e25f040<<2.
Disabling A32_BITSTREAM_READER in libavcodec/bitstream.h fixes the
problem - 'buf' contains 0xf897c100 the first time through, and the
errors/artifacts are gone.
Unfortunately that change breaks MJPEG playback (other codecs seem
unaffected). While there are no errors in the console, MJPEG content
has numerous green + purple vertical lines - it looks like the luma
is more or less intact, but chroma is completely broken. The same
MJPEG content works fine when A32_BITSTREAM_READER is enabled.
For the MJPEG content I've been looking at http://
samples.mplayerhq.hu/V-codecs/MJPEGs/dancing.avi . When playing that
sample, the very first call to GET_CACHE inside mjpeg.c's
decode_block returns 0x2dd2bec1 when A32_BITSTREAM_READER is enabled
and 0x2dd2bec0 when it's disabled. On x86 the value is 0x2dd2bec0. It
looks like fixing the broken reader unmasks a bug in the MJPEG decoder??
Could someone familiar with the bitstream reader suggest a fix that
would work for both formats?
More information about the MPlayer-users