[FFmpeg-devel] libavcodec/exr : Fix PXR24 uncompress

Martin Vignali martin.vignali at gmail.com
Thu Apr 21 10:16:45 CEST 2016


2016-04-20 23:05 GMT+02:00 Paul B Mahol <onemda at gmail.com>:

> On 4/19/16, Martin Vignali <martin.vignali at gmail.com> wrote:
> > 2016-04-13 20:17 GMT+02:00 Martin Vignali <martin.vignali at gmail.com>:
> >
> >> Hello,
> >>
> >> In attach a patch, to change the way PXR24 uncompress calc the expected
> >> size.
> >>
> >> My previous patch (fix PXR24 float) doesn't work when all channels of a
> >> file
> >> doesn't have the same pixel type.
> >>
> >> Now this patch calc the expected_len channel by channel.
> >>
> >> Comments welcome
> >>
> >> Martin
> >> Jokyo Images
> >>
> >
> > Ping
> >
>
> Shouldn't this be refactored and reused by other compressors too?
>
>
I don't think, this particular patch can be share with other compressor.

The goal of this part of the pxr24_uncompress function, is to calculate,
the size of the result of the unzip part.
PXR24 compression, make the compression in two step for float data (only)
1 - unzip
2 - "extend" float from 24 to 32 bits.

So when PXR24 uncompress Float data (or picture where one or more channel
is in float), the result of the unzip part, is not equal to uncompress size.

When PXR24 only have UINT32, or Half Float channels, the result of the
unzip part have the same size than the uncompress size.

For the ZIP1/ZIP16 compressor, the size output by the unzip step, is equal
to the uncompress size for all kinds of channel.


Maybe other compressor can also have trouble when all channels doesn't have
the same pixel type. But probably need a different approach for each
compressor.
I will try to take a look later on this.

Martin
Jokyo Images


More information about the ffmpeg-devel mailing list