|
From: John C. <jn...@ec...> - 2001-04-06 16:53:04
|
I suspect I'm mad but since I need to get at dv formatted video, in a
vendor independent manner this seems a good place to start.
I'm using the 0.7 version, and have that working under SUSE 7.0 as a
reference implementation.
To make life easy (and to be sure I understand libdv) I have built a very
simple application (called minidv) which reads a dv stream and outputs the
first n frames as .ppm files. This works as expected under linux.
After copying all the files to the windows environment. I've had the
following success.
The first attempt a building the C files caused a segmentation fault, which
I tracked down to some look up tables being indexed by large positive and
negative numbers.
Both gcc and Visual C++(vcc) gave the same result.
I cured this when I realized that the on X86 implementation (the C code)
was probably for a Sun or other such machine with a different byte order.
So the parse.c was changed as follows
#if !ARCH_X86
#if WIN32
dv_reorder[DV_DCT_88][i] = ((dv_88_reorder_prime[i] / 8) * 8) +
(dv_88_reorder_prime[i] % 8);
#else
dv_reorder[DV_DCT_88][i] = ((dv_88_reorder_prime[i] % 8) * 8) +
(dv_88_reorder_prime[i] / 8);
#endif
#else
dv_reorder[DV_DCT_88][i] = ((dv_88_reorder_prime[i] % 8) * 8) +
(dv_88_reorder_prime[i] / 8);
#endif
going back to the byte order of an Intel machine.
As I said, this cured the segmentation fault, and even produced pictures,
but they were almost unrecognizable, similar to a television picture with a
dubious horizontal sync, and lots of block errors.
I've also attempted to recompile the assembly language version with the
cygwin implementation of gcc, but have had to make many changes, and it
currently blows up as it starts.
Before I go any further I would appreciate some advice and information.
Should the C code compiled on an Intel machine give the same results as the
assembler version?
If not, is it a byte order problem and could I have some pointers where to
look.
Is it possible to build a C version under linux so I can see exactly what
is going on and what the differences are?
Any other advice would be wonderful, unfortunately not doing this is not an
option. I have the SMPTE standard and will probably start there next
Thanks in advance,
John Carter
Dr. John N. Carter jn...@ec...
ISIS http://www.ecs.soton.ac.uk/~jnc/
|