Lines Matching defs:avctx
41 static int fill_tile4(AVCodecContext *avctx, int color, AVFrame *frame)
43 ARBCContext *s = avctx->priv_data;
46 int h = avctx->height - 1;
49 if ((avctx->width / 4 + 1) * (avctx->height / 4 + 1) < nb_tiles)
62 if (j >= avctx->height || k >= avctx->width) {
76 static int fill_tileX(AVCodecContext *avctx, int tile_width, int tile_height,
79 ARBCContext *s = avctx->priv_data;
84 int h = avctx->height - 1;
87 if ((avctx->width / tile_width + 1) * (avctx->height / tile_height + 1) < nb_tiles)
97 if (start_x >= avctx->width || start_y >= avctx->height)
105 if (j + m >= avctx->height || k + n >= avctx->width)
110 pixels_overwritten += FFMIN(step_h, avctx->height - j) * FFMIN(step_w, avctx->width - k);
119 static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
122 ARBCContext *s = avctx->priv_data;
124 int prev_pixels = avctx->width * avctx->height;
138 if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0)
163 prev_pixels -= fill_tileX(avctx, 1024, 1024, fill, frame);
165 prev_pixels -= fill_tileX(avctx, 256, 256, fill, frame);
167 prev_pixels -= fill_tileX(avctx, 64, 64, fill, frame);
169 prev_pixels -= fill_tileX(avctx, 16, 16, fill, frame);
171 prev_pixels -= fill_tile4(avctx, fill, frame);
185 static av_cold int decode_init(AVCodecContext *avctx)
187 ARBCContext *s = avctx->priv_data;
189 avctx->pix_fmt = AV_PIX_FMT_RGB24;
198 static void decode_flush(AVCodecContext *avctx)
200 ARBCContext *s = avctx->priv_data;
205 static av_cold int decode_close(AVCodecContext *avctx)
207 ARBCContext *s = avctx->priv_data;