FFmpeg
Functions | Variables
fitsenc.c File Reference
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "bytestream.h"
#include "encode.h"
#include "internal.h"

Go to the source code of this file.

Functions

static int fits_encode_frame (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
 

Variables

const AVCodec ff_fits_encoder
 

Detailed Description

FITS image encoder

Specification: https://fits.gsfc.nasa.gov/fits_standard.html Version 3.0

RGBA images are encoded as planes in RGBA order. So, NAXIS3 is 3 or 4 for them. Also CTYPE3 = 'RGB ' is added to the header to distinguish them from 3d images.

Definition in file fitsenc.c.

Function Documentation

◆ fits_encode_frame()

static int fits_encode_frame ( AVCodecContext avctx,
AVPacket pkt,
const AVFrame pict,
int got_packet 
)
static

Definition at line 38 of file fitsenc.c.

Variable Documentation

◆ ff_fits_encoder

const AVCodec ff_fits_encoder
Initial value:
= {
.name = "fits",
.long_name = NULL_IF_CONFIG_SMALL("Flexible Image Transport System"),
.capabilities = AV_CODEC_CAP_DR1,
.encode2 = fits_encode_frame,
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_GBRAP16BE,
}

Definition at line 114 of file fitsenc.c.

AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
AV_PIX_FMT_GBRP16BE
@ AV_PIX_FMT_GBRP16BE
planar GBR 4:4:4 48bpp, big-endian
Definition: pixfmt.h:164
AV_PIX_FMT_GRAY16BE
@ AV_PIX_FMT_GRAY16BE
Y , 16bpp, big-endian.
Definition: pixfmt.h:97
AV_PIX_FMT_GBRAP
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
Definition: pixfmt.h:205
AV_PIX_FMT_GBRAP16BE
@ AV_PIX_FMT_GBRAP16BE
planar GBRA 4:4:4:4 64bpp, big-endian
Definition: pixfmt.h:206
AV_CODEC_ID_FITS
@ AV_CODEC_ID_FITS
Definition: codec_id.h:284
AV_PIX_FMT_GRAY8
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Definition: pixfmt.h:74
fits_encode_frame
static int fits_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
Definition: fitsenc.c:38
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:65
AV_PIX_FMT_GBRP
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
Definition: pixfmt.h:158
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201