Lines Matching refs:avctx
26 static av_cold int y41p_encode_init(AVCodecContext *avctx)
28 if (avctx->width & 7) {
29 av_log(avctx, AV_LOG_ERROR, "y41p requires width to be divisible by 8.\n");
33 avctx->coded_frame = av_frame_alloc();
34 avctx->bits_per_coded_sample = 12;
36 if (!avctx->coded_frame) {
37 av_log(avctx, AV_LOG_ERROR, "Could not allocate frame.\n");
44 static int y41p_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
51 if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width * avctx->height * 1.5)) < 0)
54 avctx->coded_frame->key_frame = 1;
55 avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
58 for (i = avctx->height - 1; i >= 0; i--) {
62 for (j = 0; j < avctx->width; j += 8) {
85 static av_cold int y41p_encode_close(AVCodecContext *avctx)
87 av_freep(&avctx->coded_frame);