1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avcodec/fitsdec: write output to frame directly

Signed-off-by: Paras Chadha <paraschadha18@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Paras Chadha 2017-09-03 00:37:21 +05:30 committed by James Almer
parent ef7fe81b85
commit b07faf39ed

View File

@ -264,11 +264,10 @@ static int fits_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
for (j = 0; j < avctx->width; j++) { \
t = rd; \
if (!header.blank_found || t != header.blank) { \
t = ((t - header.data_min) * ((1 << (sizeof(type) * 8)) - 1)) / (header.data_max - header.data_min); \
*dst++ = ((t - header.data_min) * ((1 << (sizeof(type) * 8)) - 1)) / (header.data_max - header.data_min); \
} else { \
t = fitsctx->blank_val; \
*dst++ = fitsctx->blank_val; \
} \
*dst++ = (type) t; \
ptr8 += abs(cas) >> 3; \
} \
} \