Lines Matching refs:avctx
28 static av_cold int v410_encode_init(AVCodecContext *avctx)
30 if (avctx->width & 1) {
31 av_log(avctx, AV_LOG_ERROR, "v410 requires width to be even.\n");
35 avctx->coded_frame = av_frame_alloc();
37 if (!avctx->coded_frame) {
38 av_log(avctx, AV_LOG_ERROR, "Could not allocate frame.\n");
45 static int v410_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
53 if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width * avctx->height * 4)) < 0)
57 avctx->coded_frame->key_frame = 1;
58 avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
64 for (i = 0; i < avctx->height; i++) {
65 for (j = 0; j < avctx->width; j++) {
82 static av_cold int v410_encode_close(AVCodecContext *avctx)
84 av_freep(&avctx->coded_frame);