Lines Matching defs:avctx
915 av_log(roq->avctx, AV_LOG_ERROR, "Cannot encode video in Quake compatible form\n");
918 av_log(roq->avctx, AV_LOG_ERROR,
950 static av_cold int roq_encode_end(AVCodecContext *avctx)
952 RoqEncContext *const enc = avctx->priv_data;
969 static av_cold int roq_encode_init(AVCodecContext *avctx)
971 RoqEncContext *const enc = avctx->priv_data;
976 roq->avctx = avctx;
979 if ((avctx->width & 0xf) || (avctx->height & 0xf)) {
980 av_log(avctx, AV_LOG_ERROR, "Dimensions must be divisible by 16\n");
984 if (avctx->width > 65535 || avctx->height > 65535) {
985 av_log(avctx, AV_LOG_ERROR, "Dimensions are max %d\n", enc->quake3_compat ? 32768 : 65535);
989 if (((avctx->width)&(avctx->width-1))||((avctx->height)&(avctx->height-1)))
990 av_log(avctx, AV_LOG_ERROR, "Warning: dimensions not power of two, this is not supported by quake\n");
992 roq->width = avctx->width;
993 roq->height = avctx->height;
1054 static int roq_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
1057 RoqEncContext *const enc = avctx->priv_data;
1061 roq->avctx = avctx;
1073 if ((ret = ff_alloc_packet(avctx, pkt, size)) < 0)
1078 if (enc->framesSinceKeyframe == avctx->gop_size)
1084 if ((ret = ff_encode_alloc_frame(avctx, roq->current_frame)) < 0 ||
1085 (ret = ff_encode_alloc_frame(avctx, roq->last_frame )) < 0)