Lines Matching defs:avctx
42 static void sunrast_image_write_header(AVCodecContext *avctx)
44 SUNRASTContext *s = avctx->priv_data;
47 bytestream2_put_be32u(&s->p, avctx->width);
48 bytestream2_put_be32u(&s->p, avctx->height);
56 static void sunrast_image_write_image(AVCodecContext *avctx,
61 SUNRASTContext *s = avctx->priv_data;
83 len = (s->depth * avctx->width + 7) >> 3;
93 #define GET_VALUE y >= avctx->height ? 0 : x >= len ? ptr[len-1] : ptr[x]
97 while (y < avctx->height) {
107 while (value2 == value && run < 256 && y < avctx->height) {
131 for (y = 0; y < avctx->height; y++) {
140 static av_cold int sunrast_encode_init(AVCodecContext *avctx)
142 SUNRASTContext *s = avctx->priv_data;
150 switch (avctx->pix_fmt) {
167 s->length = avctx->height * (FFALIGN(avctx->width * s->depth, 16) >> 3);
173 static int sunrast_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
176 SUNRASTContext *s = avctx->priv_data;
179 if ((ret = ff_alloc_packet(avctx, avpkt, s->size)) < 0)
183 sunrast_image_write_header(avctx);
184 sunrast_image_write_image(avctx, frame->data[0],