Lines Matching defs:avctx
36 int (*decode)(AVCodecContext *avctx, AVFrame *frame,
41 static int bitpacked_decode_uyvy422(AVCodecContext *avctx, AVFrame *frame,
54 avctx->pix_fmt, avctx->width, avctx->height, 1);
63 static int bitpacked_decode_yuv422p10(AVCodecContext *avctx, AVFrame *frame,
66 uint64_t frame_size = (uint64_t)avctx->width * (uint64_t)avctx->height * 20;
72 ret = ff_thread_get_buffer(avctx, frame, 0);
79 if (avctx->width % 2)
82 ret = init_get_bits(&bc, avpkt->data, avctx->width * avctx->height * 20);
86 for (i = 0; i < avctx->height; i++) {
91 for (j = 0; j < avctx->width; j += 2) {
102 static av_cold int bitpacked_init_decoder(AVCodecContext *avctx)
104 struct BitpackedContext *bc = avctx->priv_data;
106 if (!avctx->codec_tag || !avctx->width || !avctx->height)
109 if (avctx->codec_tag == MKTAG('U', 'Y', 'V', 'Y')) {
110 if (avctx->bits_per_coded_sample == 16 &&
111 avctx->pix_fmt == AV_PIX_FMT_UYVY422)
113 else if (avctx->bits_per_coded_sample == 20 &&
114 avctx->pix_fmt == AV_PIX_FMT_YUV422P10)
125 static int bitpacked_decode(AVCodecContext *avctx, AVFrame *frame,
128 struct BitpackedContext *bc = avctx->priv_data;
132 res = bc->decode(avctx, frame, avpkt);