Lines Matching defs:avctx

39     AVCodecContext *avctx;
67 static av_cold int qtrle_encode_end(AVCodecContext *avctx)
69 QtrleEncContext *s = avctx->priv_data;
78 static av_cold int qtrle_encode_init(AVCodecContext *avctx)
80 QtrleEncContext *s = avctx->priv_data;
82 if (av_image_check_size(avctx->width, avctx->height, 0, avctx) < 0) {
85 s->avctx=avctx;
86 s->logical_width=avctx->width;
88 switch (avctx->pix_fmt) {
90 if (avctx->width % 4) {
91 av_log(avctx, AV_LOG_ERROR, "Width not being a multiple of 4 is not supported\n");
94 s->logical_width = avctx->width / 4;
107 av_log(avctx, AV_LOG_ERROR, "Unsupported colorspace.\n");
110 avctx->bits_per_coded_sample = avctx->pix_fmt == AV_PIX_FMT_GRAY8 ? 40 : s->pixel_size*8;
116 av_log(avctx, AV_LOG_ERROR, "Error allocating memory.\n");
121 av_log(avctx, AV_LOG_ERROR, "Error allocating picture\n");
125 s->max_buf_size = s->logical_width*s->avctx->height*s->pixel_size*2 /* image base material */
127 + s->avctx->height*2 /* skip code+rle end */
297 if (s->avctx->pix_fmt == AV_PIX_FMT_GRAY8) {
311 if (s->avctx->pix_fmt == AV_PIX_FMT_GRAY8) {
330 int end_line = s->avctx->height;
335 for (start_line = 0; start_line < s->avctx->height; start_line++)
341 for (end_line=s->avctx->height; end_line > start_line; end_line--)
350 if ((start_line == 0 && end_line == s->avctx->height) || start_line == s->avctx->height)
367 static int qtrle_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
370 QtrleEncContext * const s = avctx->priv_data;
373 if ((ret = ff_alloc_packet(avctx, pkt, s->max_buf_size)) < 0)
376 if (avctx->gop_size == 0 || !s->previous_frame->data[0] ||
377 (s->avctx->frame_number % avctx->gop_size) == 0) {
391 av_log(avctx, AV_LOG_ERROR, "cannot add reference\n");