Lines Matching defs:avctx

280 static av_cold int decode_end(AVCodecContext *avctx)
282 HYuvContext *s = avctx->priv_data;
294 static av_cold int decode_init(AVCodecContext *avctx)
296 HYuvContext *s = avctx->priv_data;
299 ret = av_image_check_size(avctx->width, avctx->height, 0, avctx);
303 ff_huffyuvdsp_init(&s->hdsp, avctx->pix_fmt);
307 s->interlaced = avctx->height > 288;
310 if (avctx->extradata_size) {
311 if ((avctx->bits_per_coded_sample & 7) &&
312 avctx->bits_per_coded_sample != 12)
314 else if (avctx->extradata_size > 3 && avctx->extradata[3] == 0)
328 if (avctx->extradata_size < 4)
331 method = avctx->extradata[0];
335 s->bitstream_bpp = avctx->extradata[1];
337 s->bitstream_bpp = avctx->bits_per_coded_sample & ~7;
339 s->bps = (avctx->extradata[1] >> 4) + 1;
342 s->chroma_h_shift = avctx->extradata[1] & 3;
343 s->chroma_v_shift = (avctx->extradata[1] >> 2) & 3;
344 s->yuv = !!(avctx->extradata[2] & 1);
345 s->chroma= !!(avctx->extradata[2] & 3);
346 s->alpha = !!(avctx->extradata[2] & 4);
348 interlace = (avctx->extradata[2] & 0x30) >> 4;
350 s->context = avctx->extradata[2] & 0x40 ? 1 : 0;
352 if ((ret = read_huffman_tables(s, avctx->extradata + 4,
353 avctx->extradata_size - 4)) < 0)
356 switch (avctx->bits_per_coded_sample & 7) {
367 s->decorrelate = avctx->bits_per_coded_sample >= 24;
378 s->bitstream_bpp = avctx->bits_per_coded_sample & ~7;
388 avctx->pix_fmt = AV_PIX_FMT_YUV420P;
393 avctx->pix_fmt = AV_PIX_FMT_YUYV422;
395 avctx->pix_fmt = AV_PIX_FMT_YUV422P;
400 avctx->pix_fmt = AV_PIX_FMT_0RGB32;
402 avctx->pix_fmt = AV_PIX_FMT_BGR24;
406 avctx->pix_fmt = AV_PIX_FMT_RGB32;
412 av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt,
418 avctx->pix_fmt = AV_PIX_FMT_GRAY8;
421 avctx->pix_fmt = AV_PIX_FMT_GRAY16;
424 avctx->pix_fmt = AV_PIX_FMT_GBRP;
427 avctx->pix_fmt = AV_PIX_FMT_GBRP9;
430 avctx->pix_fmt = AV_PIX_FMT_GBRP10;
433 avctx->pix_fmt = AV_PIX_FMT_GBRP12;
436 avctx->pix_fmt = AV_PIX_FMT_GBRP14;
439 avctx->pix_fmt = AV_PIX_FMT_GBRP16;
442 avctx->pix_fmt = AV_PIX_FMT_GBRAP;
445 avctx->pix_fmt = AV_PIX_FMT_YUV444P;
448 avctx->pix_fmt = AV_PIX_FMT_YUV444P9;
451 avctx->pix_fmt = AV_PIX_FMT_YUV444P10;
454 avctx->pix_fmt = AV_PIX_FMT_YUV444P12;
457 avctx->pix_fmt = AV_PIX_FMT_YUV444P14;
460 avctx->pix_fmt = AV_PIX_FMT_YUV444P16;
463 avctx->pix_fmt = AV_PIX_FMT_YUV422P;
466 avctx->pix_fmt = AV_PIX_FMT_YUV422P9;
469 avctx->pix_fmt = AV_PIX_FMT_YUV422P10;
472 avctx->pix_fmt = AV_PIX_FMT_YUV422P12;
475 avctx->pix_fmt = AV_PIX_FMT_YUV422P14;
478 avctx->pix_fmt = AV_PIX_FMT_YUV422P16;
481 avctx->pix_fmt = AV_PIX_FMT_YUV411P;
484 avctx->pix_fmt = AV_PIX_FMT_YUV440P;
487 avctx->pix_fmt = AV_PIX_FMT_YUV420P;
490 avctx->pix_fmt = AV_PIX_FMT_YUV420P9;
493 avctx->pix_fmt = AV_PIX_FMT_YUV420P10;
496 avctx->pix_fmt = AV_PIX_FMT_YUV420P12;
499 avctx->pix_fmt = AV_PIX_FMT_YUV420P14;
502 avctx->pix_fmt = AV_PIX_FMT_YUV420P16;
505 avctx->pix_fmt = AV_PIX_FMT_YUV410P;
508 avctx->pix_fmt = AV_PIX_FMT_YUVA444P;
511 avctx->pix_fmt = AV_PIX_FMT_YUVA444P9;
514 avctx->pix_fmt = AV_PIX_FMT_YUVA444P10;
517 avctx->pix_fmt = AV_PIX_FMT_YUVA444P16;
520 avctx->pix_fmt = AV_PIX_FMT_YUVA422P;
523 avctx->pix_fmt = AV_PIX_FMT_YUVA422P9;
526 avctx->pix_fmt = AV_PIX_FMT_YUVA422P10;
529 avctx->pix_fmt = AV_PIX_FMT_YUVA422P16;
532 avctx->pix_fmt = AV_PIX_FMT_YUVA420P;
535 avctx->pix_fmt = AV_PIX_FMT_YUVA420P9;
538 avctx->pix_fmt = AV_PIX_FMT_YUVA420P10;
541 avctx->pix_fmt = AV_PIX_FMT_YUVA420P16;
548 ff_huffyuv_common_init(avctx);
550 if ((avctx->pix_fmt == AV_PIX_FMT_YUV422P || avctx->pix_fmt == AV_PIX_FMT_YUV420P) && avctx->width & 1) {
551 av_log(avctx, AV_LOG_ERROR, "width must be even for this colorspace\n");
554 if (s->predictor == MEDIAN && avctx->pix_fmt == AV_PIX_FMT_YUV422P &&
555 avctx->width % 4) {
556 av_log(avctx, AV_LOG_ERROR, "width must be a multiple of 4 "
821 if (!s->avctx->draw_horiz_band)
839 s->avctx->draw_horiz_band(s->avctx, frame, offset, y, 3, h);
871 static int decode_slice(AVCodecContext *avctx, AVFrame *p, int height,
874 HYuvContext *s = avctx->priv_data;
967 av_log(avctx, AV_LOG_ERROR,
1169 av_log(avctx, AV_LOG_ERROR,
1173 av_log(avctx, AV_LOG_ERROR,
1182 static int decode_frame(AVCodecContext *avctx, AVFrame *p,
1187 HYuvContext *s = avctx->priv_data;
1206 if ((ret = ff_thread_get_buffer(avctx, p, 0)) < 0)
1220 if (avctx->codec_id == AV_CODEC_ID_HYMT &&
1254 ret = decode_slice(avctx, p, slice_height, slice_size, y_offset, table_size);