[FFmpeg-devel] [PATCH] Add FITS Decoder

Paras Chadha paraschadha18 at gmail.com
Thu Jul 20 21:33:39 EEST 2017

On Thu, Jul 20, 2017 at 11:19 PM, Nicolas George <george at nsup.org> wrote:

> Hi.
> Le duodi 2 thermidor, an CCXXV, Paras Chadha a écrit :
> > +    size = abs(header->bitpix) >> 3;
> > +        size *= header->naxisn[i];
> Can you explain why PCOUNT and GCOUNT are not taken into account here
> while they are taken into account in the demuxer?

It is because for image extensions, PCOUNT = 0 and GCOUNT = 1 are mandatory
in the header according to the standard. These keywords are not even
mandatory in the header of first image.
Anyways as i have told before, it is not necessary FITS file will contain
an image always. It is a general data storage and transport format too. It
supports various extensions - ASCII table extension and binary table
extension that are used to store and transport data. After that there is
something called Random Groups structure which is also used for the same
purpose. PCOUNT and GCOUNT can affect the size of data in those extensions.
In demuxer, i am skipping over these extensions and only sending the images
to the decoder. So, these keywords are taken into account in demuxer but
not in decoder.

> Regards,
> --
>   Nicolas George

More information about the ffmpeg-devel mailing list