Lines Matching defs:avctx
35 int (*decode)(AVCodecContext *avctx, AVFrame *frame,
40 static int bitpacked_decode_uyvy422(AVCodecContext *avctx, AVFrame *frame,
49 avctx->pix_fmt, avctx->width, avctx->height, 1);
58 static int bitpacked_decode_yuv422p10(AVCodecContext *avctx, AVFrame *frame,
61 uint64_t frame_size = (uint64_t)avctx->width * (uint64_t)avctx->height * 20;
67 ret = ff_get_buffer(avctx, frame, 0);
74 if (avctx->width % 2)
77 ret = init_get_bits(&bc, avpkt->data, avctx->width * avctx->height * 20);
81 for (i = 0; i < avctx->height; i++) {
86 for (j = 0; j < avctx->width; j += 2) {
97 static av_cold int bitpacked_init_decoder(AVCodecContext *avctx)
99 struct BitpackedContext *bc = avctx->priv_data;
101 if (!avctx->codec_tag || !avctx->width || !avctx->height)
104 if (avctx->codec_tag == MKTAG('U', 'Y', 'V', 'Y')) {
105 if (avctx->bits_per_coded_sample == 16 &&
106 avctx->pix_fmt == AV_PIX_FMT_UYVY422)
108 else if (avctx->bits_per_coded_sample == 20 &&
109 avctx->pix_fmt == AV_PIX_FMT_YUV422P10)
120 static int bitpacked_decode(AVCodecContext *avctx, void *data, int *got_frame,
123 struct BitpackedContext *bc = avctx->priv_data;
131 res = bc->decode(avctx, frame, avpkt);