[FFmpeg-devel] [PATCH] avcodec/pnm: avoid mirroring PFM images vertically
Leo Izen
leo.izen at gmail.com
Tue Dec 27 15:38:10 EET 2022
On 12/14/22 15:13, Leo Izen wrote:
> On 11/29/22 06:14, Anton Khirnov wrote:
>> Quoting Leo Izen (2022-11-16 12:43:06)
>>> PFM (aka Portable FloatMap) encodes its scanlines from bottom-to-top,
>>> not from top-to-bottom, unlike other NetPBM formats. Without this
>>> patch, FFmpeg ignores this exception and decodes/encodes PFM images
>>> mirrored vertically from their proper orientation.
>>>
>>> For reference, see the NetPBM tool pfmtopam, which encodes a .pam
>>> from a .pfm, using the correct orientation (and which FFmpeg reads
>>> correctly). Also compare ffplay to magick display, which shows the
>>> correct orientation as well.
>>>
>>> See: http://www.pauldebevec.com/Research/HDR/PFM/ and see:
>>> https://netpbm.sourceforge.net/doc/pfm.html for descriptions of this
>>> image format.
>>>
>>> Signed-off-by: Leo Izen <leo.izen at gmail.com>
>>> ---
>>> libavcodec/pnmdec.c | 10 ++++++++++
>>> libavcodec/pnmenc.c | 18 ++++++++++--------
>>> tests/ref/lavf/gbrpf32be.pfm | 2 +-
>>> tests/ref/lavf/gbrpf32le.pfm | 2 +-
>>> tests/ref/lavf/grayf32be.pfm | 2 +-
>>> tests/ref/lavf/grayf32le.pfm | 2 +-
>>> 6 files changed, 24 insertions(+), 12 deletions(-)
>>
>> Looks reasonable, will push soonish.
>>
>
> I got a LGTM, can someone push this? Thanks.
>
> - Leo Izen (thebombzen)
Did this ever get applied?
- Leo Izen (thebombzen)
More information about the ffmpeg-devel
mailing list