[FFmpeg-devel] [PATCH] Add FITS Encoder

Paras Chadha paraschadha18 at gmail.com
Sun Jul 16 15:30:17 EEST 2017


On Sat, Jul 15, 2017 at 12:13 PM, Reimar Döffinger <Reimar.Doeffinger at gmx.de
> wrote:

> On 14.07.2017, at 19:04, Paras Chadha <paraschadha18 at gmail.com> wrote:
>
> > +            if (bitpix == 16) {
> > +                for (j = 0; j < avctx->width; j++) {
> > +                    bytestream2_put_be16(&pbc, AV_RB16(ptr) - bzero);
> > +                    ptr += 2;
> > +                }
>
> Can't bzero be chosen as 0? Because then this is just a normal memcpy...
>
>
No, actually FITS does not support unsigned 16-bit integers as data. So,
unsigned 16 bit integers are represented as signed integers by setting
BZERO = 32768 and subtracting the same from each data element. Any FITS
reader will add the BZERO value to each data elements before processing.

Rest all changes have been done. I will post a patch soon.


> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list