[FFmpeg-devel] [PATCH] Add FITS Encoder
Derek Buitenhuis
derek.buitenhuis at gmail.com
Sun Jul 16 15:59:19 EEST 2017
On 7/16/2017 1:31 PM, Paras Chadha wrote:
> Signed-off-by: Paras Chadha <paraschadha18 at gmail.com>
> ---
> doc/general.texi | 2 +
> libavcodec/Makefile | 1 +
> libavcodec/allcodecs.c | 1 +
> libavcodec/fitsenc.c | 238 +++++++++++++++++++++++++++++++++++++++++++++++++
> libavformat/img2enc.c | 1 +
> 5 files changed, 243 insertions(+)
> create mode 100644 libavcodec/fitsenc.c
Why is there no decoder?
Also, missing configure change (?) and version bump.
> +
> +static int write_keyword_value(uint8_t **bytestream, const char * keyword, int value)
> +{
> + int len, ret;
> + uint8_t * header = * bytestream;
Please don't put spaces between '*' for pointers, it's pretty ambiguous to readers.
> + len = strlen(keyword);
> +
> + memcpy(header, keyword, len);
> + memset(header + len, ' ', 8 - len);
This sort of stuff makes me unfortable, even if the input is all literals. At
the very least, it should be documented, or checked, or a constant used instead
of a magic 8. Maybe I'm just paranoid.
> + data_size = (bitpix >> 3) * avctx->height * avctx->width * naxis3;
That's this based off of?
- Derek
More information about the ffmpeg-devel
mailing list