Lines Matching defs:avctx

62 static void put_lines_bits(AVCodecContext *avctx, int planes, int row_width, int pixel_size, State * state, uint8_t * row, AVFrame *p)
66 for (int y = 0; y < state->vdup && (state->y + y) < avctx->height; y++)
68 for (int i = 7; i >= 0 && x * 8 + 7 - i < avctx->width; i--)
79 static void put_lines_bytes(AVCodecContext *avctx, int planes, int row_width, int pixel_size, State * state, uint8_t * row, AVFrame *p)
81 for (int y = 0; y < state->vdup && (state->y + y) < avctx->height; y++)
82 memcpy(p->data[0] + (state->y + y) * p->linesize[0], row, avctx->width * pixel_size);
88 static int gem_decode_frame(AVCodecContext *avctx, AVFrame *p,
102 void (*put_lines)(AVCodecContext *avctx, int planes, int row_width, int pixel_size, State * state, uint8_t * row, AVFrame *p);
115 avctx->sample_aspect_ratio.num = bytestream2_get_be16(&gb);
116 avctx->sample_aspect_ratio.den = bytestream2_get_be16(&gb);
119 ret = ff_set_dimensions(avctx, width, height);
123 row_width = (avctx->width + 7) / 8;
129 avpriv_request_sample(avctx, "count_scalar=%d", count_scalar);
133 avctx->pix_fmt = AV_PIX_FMT_BGR24;
137 avctx->pix_fmt = AV_PIX_FMT_BGR555BE;
139 avctx->pix_fmt = AV_PIX_FMT_BGR555LE;
143 avctx->pix_fmt = AV_PIX_FMT_RGB565BE;
146 avctx->pix_fmt = AV_PIX_FMT_RGB24;
149 avctx->pix_fmt = AV_PIX_FMT_0RGB;
152 avctx->pix_fmt = AV_PIX_FMT_PAL8;
161 avpriv_request_sample(avctx, "STTT planes=%d", planes);
166 avpriv_request_sample(avctx, "TIMG planes=%d", planes);
171 avpriv_request_sample(avctx, "XIMG planes=%d", planes);
175 avpriv_request_sample(avctx, "planes=%d", planes);
179 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
216 row_width = ((avctx->width + 7)/8)*8 * pixel_size;
220 row_width = ((avctx->width + 15)/16)*16 * pixel_size;
224 row_width = avctx->width * pixel_size;
249 row_width = avctx->width * pixel_size;
253 row_width = avctx->width * pixel_size;
258 ret = av_reallocp_array(&avctx->priv_data, planes, row_width);
261 row = avctx->priv_data;
263 memset(p->data[0], 0, avctx->height * p->linesize[0]);
271 put_lines(avctx, planes, row_width, pixel_size, &state, row + state.pl * row_width, p); \
272 if (state.y >= avctx->height) goto abort; \
281 put_lines(avctx, planes, row_width, pixel_size, &state, row + state.pl * row_width, p); \
282 if (state.y >= avctx->height) goto abort; \
347 static av_cold int gem_close(AVCodecContext *avctx)
349 av_freep(&avctx->priv_data);