Lines Matching refs:avctx
26 static av_cold int v410_encode_init(AVCodecContext *avctx)
28 if (avctx->width & 1) {
29 av_log(avctx, AV_LOG_ERROR, "v410 requires even width.\n");
33 avctx->coded_frame = avcodec_alloc_frame();
35 if (!avctx->coded_frame) {
36 av_log(avctx, AV_LOG_ERROR, "Could not allocate frame.\n");
43 static int v410_encode_frame(AVCodecContext *avctx, uint8_t *buf,
53 if (buf_size < avctx->width * avctx->height * 4) {
54 av_log(avctx, AV_LOG_ERROR, "Out buffer is too small.\n");
58 avctx->coded_frame->reference = 0;
59 avctx->coded_frame->key_frame = 1;
60 avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
66 for (i = 0; i < avctx->height; i++) {
67 for (j = 0; j < avctx->width; j++) {
83 static av_cold int v410_encode_close(AVCodecContext *avctx)
85 av_freep(&avctx->coded_frame);