[FFmpeg-devel] [PATCH] avformat/riffenc: indicate storage of flipped RGB bitmaps
Andreas Rheinhardt
andreas.rheinhardt at gmail.com
Tue Jul 14 14:44:19 EEST 2020
Gyan Doshi:
> Some legacy applications such as AVI2MVE expect raw RGB bitmaps
> to be stored bottom-up, whereas our RIFF BITMAPINFOHEADER assumes
> they are always stored top-down and thus write a negative value
> for height. This can prevent reading of these files.
>
> Option flipped_raw_rgb added to AVI and Matroska muxers
> which will write positive value for height when enabled.
>
> Note that the user has to flip the bitmaps beforehand using other
> means such as the vflip filter.
> ---
1. The avi demuxer adds "BottomUp" to the extradata in case it demuxes
bottom up data. The Matroska demuxer currently doesn't and so rawvideo
stored in Matroska in vfw mode will always be treated as top-down. This
needs to be fixed, too.
2. But why don't we add an option to the raw encoder so that it adds (or
maybe switches?) "BottomUp" to the extradata to indicate that the output
is bottom-up? That seems like a better place for me. (E.g. it would
naturally allow to set the bottom-up/top-down property on a per-stream
basis.)
- Andreas
More information about the ffmpeg-devel
mailing list