Lines Matching refs:ctx
45 static int read_code_table(CLLCContext *ctx, GetBitContext *gb, VLC *vlc)
58 av_log(ctx->avctx, AV_LOG_ERROR, "To long VLCs %d\n", num_lens);
67 av_log(ctx->avctx, AV_LOG_ERROR,
81 symbols, 1, 1, 0, 0, ctx->avctx);
88 static int read_argb_line(CLLCContext *ctx, GetBitContext *gb, int *top_left,
104 for (i = 0; i < ctx->avctx->width; i++) {
157 static int read_rgb24_component_line(CLLCContext *ctx, GetBitContext *gb,
170 for (i = 0; i < ctx->avctx->width; i++) {
187 static int read_yuv_component_line(CLLCContext *ctx, GetBitContext *gb,
199 for (i = 0; i < ctx->avctx->width >> is_chroma; i++) {
215 static int decode_argb_frame(CLLCContext *ctx, GetBitContext *gb, AVFrame *pic)
217 AVCodecContext *avctx = ctx->avctx;
235 ret = read_code_table(ctx, gb, &vlc[i]);
240 av_log(ctx->avctx, AV_LOG_ERROR,
248 read_argb_line(ctx, gb, pred, vlc, dst);
259 static int decode_rgb24_frame(CLLCContext *ctx, GetBitContext *gb, AVFrame *pic)
261 AVCodecContext *avctx = ctx->avctx;
278 ret = read_code_table(ctx, gb, &vlc[i]);
283 av_log(ctx->avctx, AV_LOG_ERROR,
292 read_rgb24_component_line(ctx, gb, &pred[j], &vlc[j], &dst[j]);
303 static int decode_yuv_frame(CLLCContext *ctx, GetBitContext *gb, AVFrame *pic)
305 AVCodecContext *avctx = ctx->avctx;
325 avpriv_request_sample(ctx->avctx, "Blocked YUV");
331 ret = read_code_table(ctx, gb, &vlc[i]);
336 av_log(ctx->avctx, AV_LOG_ERROR,
344 read_yuv_component_line(ctx, gb, &pred[0], &vlc[0], dst[0], 0); /* Y */
345 read_yuv_component_line(ctx, gb, &pred[1], &vlc[1], dst[1], 1); /* U */
346 read_yuv_component_line(ctx, gb, &pred[2], &vlc[1], dst[2], 1); /* V */
361 CLLCContext *ctx = avctx->priv_data;
392 av_fast_padded_malloc(&ctx->swapped_buf,
393 &ctx->swapped_buf_size, data_size);
394 if (!ctx->swapped_buf) {
400 ctx->bdsp.bswap16_buf((uint16_t *) ctx->swapped_buf, (uint16_t *) src,
403 if ((ret = init_get_bits8(&gb, ctx->swapped_buf, data_size)) < 0)
428 ret = decode_yuv_frame(ctx, &gb, pic);
441 ret = decode_rgb24_frame(ctx, &gb, pic);
453 ret = decode_argb_frame(ctx, &gb, pic);
473 CLLCContext *ctx = avctx->priv_data;
475 av_freep(&ctx->swapped_buf);
482 CLLCContext *ctx = avctx->priv_data;
485 ctx->avctx = avctx;
486 ctx->swapped_buf = NULL;
487 ctx->swapped_buf_size = 0;
489 ff_bswapdsp_init(&ctx->bdsp);