Lines Matching defs:avctx
87 static int pcx_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
98 if (avctx->width > 65535 || avctx->height > 65535) {
99 av_log(avctx, AV_LOG_ERROR, "image dimensions do not fit in 16 bits\n");
103 switch (avctx->pix_fmt) {
115 avpriv_set_systematic_pal2(palette256, avctx->pix_fmt);
129 av_log(avctx, AV_LOG_ERROR, "unsupported pixfmt\n");
133 line_bytes = (avctx->width * bpp + 7) >> 3;
136 max_pkt_size = 128 + avctx->height * 2 * line_bytes * nplanes + (pal ? 256*3 + 1 : 0);
137 if ((ret = ff_alloc_packet(avctx, pkt, max_pkt_size)) < 0)
142 sw = avctx->sample_aspect_ratio.num;
143 sh = avctx->sample_aspect_ratio.den;
153 bytestream_put_le16(&buf, avctx->width - 1); // x max
154 bytestream_put_le16(&buf, avctx->height - 1); // y max
168 for (y = 0; y < avctx->height; y++) {
171 av_log(avctx, AV_LOG_ERROR, "buffer too small\n");
180 av_log(avctx, AV_LOG_ERROR, "buffer too small\n");