Lines Matching defs:parse_ctx
76 static void SchroParseContextInit(SchroParseUnitContext *parse_ctx,
79 parse_ctx->buf = buf;
80 parse_ctx->buf_size = buf_size;
83 static SchroBuffer *FindNextSchroParseUnit(SchroParseUnitContext *parse_ctx)
89 if (parse_ctx->buf_size < 13 ||
90 parse_ctx->buf[0] != 'B' ||
91 parse_ctx->buf[1] != 'B' ||
92 parse_ctx->buf[2] != 'C' ||
93 parse_ctx->buf[3] != 'D')
96 next_pu_offset = (parse_ctx->buf[5] << 24) +
97 (parse_ctx->buf[6] << 16) +
98 (parse_ctx->buf[7] << 8) +
99 parse_ctx->buf[8];
102 SCHRO_PARSE_CODE_IS_END_OF_SEQUENCE(parse_ctx->buf[4]))
105 if (next_pu_offset <= 0 || parse_ctx->buf_size < next_pu_offset)
109 memcpy(in_buf, parse_ctx->buf, next_pu_offset);
114 parse_ctx->buf += next_pu_offset;
115 parse_ctx->buf_size -= next_pu_offset;
217 SchroParseUnitContext parse_ctx;
221 SchroParseContextInit(&parse_ctx, buf, buf_size);
231 if ((enc_buf = FindNextSchroParseUnit(&parse_ctx))) {