[FFmpeg-devel] [PATCH] Fix incorrect bitmap header in rawvideo AVI output and allow input of resulting files.
Michael Niedermayer
michaelni
Sat Jul 28 14:00:03 CEST 2007
Hi
On Thu, Jul 26, 2007 at 06:07:48PM -0400, Martin Gentry wrote:
> Since I didn't get any response on the issue I was having with raw video
> output to AVI, attached is what I did to fix it.
>
> As stated in my earlier email on the topic, currently if the video is run
> through the raw video encoder the frame data seems to always be top-down
> thus always requiring a negative height in the AVI bitmap header, but the
> current code in SVN outputs a positive value resulting in an AVI that plays
> upside down in Windows Media Player. Introducing the negative height to fix
> this rendered the output as unacceptable input for ffmpeg, so I made an
> attempt to fix that also, but don't know that my use of a flag that the raw
> video decoder looks at is the correct way to fix that. Alternatively fixing
> this without introducing the negative height in the bitmap header would have
> necessitated always flipping the final data going through the raw encoder,
> which seemed a larger code modification and thus undesirable?
>
> So that said, I somewhat expect this to be rejected but am hoping that
> process will at least inform me as to a more correct way to fix the problem.
the avi raw flip problem is not an easy one to solve
also there are 2 problems
1. is reading raw avi properly with either vertical direction
2. is storing it properly
to solve 1. i would move the flip code from rawdec.c to avidec.c this
avoids a headache for the stream copy case between avi and non avi
also the flip code is avi specific not raw specific
to solve 2. i would simply always assume top down raw in avienc.c
also read:
http://www.fourcc.org/fccbihgt.php
(negtive height is invalid for anything but raw rgb)
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070728/42352fb5/attachment.pgp>
More information about the ffmpeg-devel
mailing list