Lines Matching defs:avctx
247 static av_cold int cfhd_encode_init(AVCodecContext *avctx)
249 CFHDEncContext *s = avctx->priv_data;
255 ret = av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt,
261 if (avctx->width & 15) {
262 av_log(avctx, AV_LOG_ERROR, "Width must be multiple of 16.\n");
266 s->planes = av_pix_fmt_count_planes(avctx->pix_fmt);
270 int width = i ? avctx->width >> s->chroma_h_shift : avctx->width;
271 int height = i ? FFALIGN(avctx->height >> s->chroma_v_shift, 8) :
272 FFALIGN(avctx->height >> s->chroma_v_shift, 8);
370 s->alpha = av_calloc(avctx->width * avctx->height, sizeof(*s->alpha));
422 static int cfhd_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
425 CFHDEncContext *s = avctx->priv_data;
447 process_alpha(input, avctx->width, avctx->height,
450 in_stride = avctx->width;
520 if (avctx->pix_fmt != AV_PIX_FMT_YUV422P10) {
550 ret = ff_alloc_packet(avctx, pkt, 64LL + s->planes * (2LL * avctx->width * avctx->height + 1000LL));
575 bytestream2_put_be16(pby, avctx->pix_fmt == AV_PIX_FMT_YUV422P10 ? 1 : 3 + (s->planes == 4));
590 bytestream2_put_be16(pby, avctx->width);
593 bytestream2_put_be16(pby, avctx->height);
599 bytestream2_put_be16(pby, avctx->pix_fmt == AV_PIX_FMT_YUV422P10 ? 10 : 12);
602 bytestream2_put_be16(pby, avctx->pix_fmt == AV_PIX_FMT_YUV422P10 ? 0x2000 : 0x2800);
661 s->plane[p].quantization[1 + l * 3 + i] = quantization_per_subband[avctx->pix_fmt != AV_PIX_FMT_YUV422P10][p >= 3 ? 0 : p][s->quality][l * 3 + i];
801 static av_cold int cfhd_encode_close(AVCodecContext *avctx)
803 CFHDEncContext *s = avctx->priv_data;