Lines Matching defs:avctx
99 * @param avctx AVCodec context
106 static int fits_read_header(AVCodecContext *avctx, const uint8_t **ptr, FITSHeader *header,
118 ret = avpriv_fits_header_parse_line(avctx, header, ptr8, &metadata);
131 av_log(avctx, AV_LOG_ERROR, "File contains RGB image but NAXIS = %d and NAXIS3 = %d\n", header->naxis, header->naxisn[2]);
136 av_log(avctx, AV_LOG_ERROR, "unsupported number of dimensions, NAXIS = %d\n", header->naxis);
141 av_log(avctx, AV_LOG_WARNING, "BLANK keyword found but BITPIX = %d\n. Ignoring BLANK", header->bitpix);
148 av_log(avctx, AV_LOG_ERROR, "unsupported size of FITS image");
161 av_log(avctx, AV_LOG_ERROR, "invalid BITPIX, %d\n", header->bitpix);
174 av_log(avctx, AV_LOG_ERROR, "data min/max (%g %g) is invalid\n", header->data_min, header->data_max);
177 av_log(avctx, AV_LOG_WARNING, "data min/max indicates a blank image\n");
184 static int fits_decode_frame(AVCodecContext *avctx, AVFrame *p,
200 FITSContext * fitsctx = avctx->priv_data;
204 ret = fits_read_header(avctx, &ptr8, &header, end, &p->metadata);
211 avctx->pix_fmt = AV_PIX_FMT_GBRP;
213 avctx->pix_fmt = AV_PIX_FMT_GBRAP;
217 avctx->pix_fmt = AV_PIX_FMT_GBRP16;
219 avctx->pix_fmt = AV_PIX_FMT_GBRAP16;
222 av_log(avctx, AV_LOG_ERROR, "unsupported BITPIX = %d\n", header.bitpix);
227 avctx->pix_fmt = AV_PIX_FMT_GRAY8;
229 avctx->pix_fmt = AV_PIX_FMT_GRAY16;
233 if ((ret = ff_set_dimensions(avctx, header.naxisn[0], header.naxisn[1])) < 0)
236 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
248 for (i = 0; i < avctx->height; i++) { \
249 dst = (type *) (p->data[map[k]] + (avctx->height - i - 1) * p->linesize[map[k]]); \
250 for (j = 0; j < avctx->width; j++) { \
278 for (i = 0; i < avctx->height; i++) { \
279 dst = (type *) (p->data[0] + (avctx->height-i-1)* p->linesize[0]); \
280 for (j = 0; j < avctx->width; j++) { \
299 av_log(avctx, AV_LOG_ERROR, "invalid BITPIX, %d\n", header.bitpix);