Lines Matching defs:parse_ctx
83 static void parse_context_init(SchroParseUnitContext *parse_ctx,
86 parse_ctx->buf = buf;
87 parse_ctx->buf_size = buf_size;
90 static SchroBuffer *find_next_parse_unit(SchroParseUnitContext *parse_ctx)
96 if (parse_ctx->buf_size < 13 ||
97 parse_ctx->buf[0] != 'B' ||
98 parse_ctx->buf[1] != 'B' ||
99 parse_ctx->buf[2] != 'C' ||
100 parse_ctx->buf[3] != 'D')
103 next_pu_offset = (parse_ctx->buf[5] << 24) +
104 (parse_ctx->buf[6] << 16) +
105 (parse_ctx->buf[7] << 8) +
106 parse_ctx->buf[8];
109 SCHRO_PARSE_CODE_IS_END_OF_SEQUENCE(parse_ctx->buf[4]))
112 if (next_pu_offset <= 0 || parse_ctx->buf_size < next_pu_offset)
117 av_log(parse_ctx, AV_LOG_ERROR, "Unable to allocate input buffer\n");
121 memcpy(in_buf, parse_ctx->buf, next_pu_offset);
126 parse_ctx->buf += next_pu_offset;
127 parse_ctx->buf_size -= next_pu_offset;
219 SchroParseUnitContext parse_ctx;
224 parse_context_init(&parse_ctx, buf, buf_size);
234 if ((enc_buf = find_next_parse_unit(&parse_ctx))) {