Lines Matching refs:num_contexts
337 size_t num_contexts, size_t min_block_size, double split_threshold, in InitContextBlockSplitter() argument
342 BROTLI_DCHECK(num_contexts <= BROTLI_MAX_STATIC_CONTEXTS); in InitContextBlockSplitter()
345 self->num_contexts_ = num_contexts; in InitContextBlockSplitter()
346 self->max_block_types_ = BROTLI_MAX_NUMBER_OF_BLOCK_TYPES / num_contexts; in InitContextBlockSplitter()
369 *histograms_size = max_num_types * num_contexts; in InitContextBlockSplitter()
374 ClearHistogramsLiteral(&self->histograms_[0], num_contexts); in InitContextBlockSplitter()
385 const size_t num_contexts = self->num_contexts_; in ContextBlockSplitterFinishBlock() local
398 for (i = 0; i < num_contexts; ++i) { in ContextBlockSplitterFinishBlock()
401 last_entropy[num_contexts + i] = last_entropy[i]; in ContextBlockSplitterFinishBlock()
405 self->curr_histogram_ix_ += num_contexts; in ContextBlockSplitterFinishBlock()
418 BROTLI_ALLOC(m, HistogramLiteral, 2 * num_contexts); in ContextBlockSplitterFinishBlock()
423 for (i = 0; i < num_contexts; ++i) { in ContextBlockSplitterFinishBlock()
429 size_t jx = j * num_contexts + i; in ContextBlockSplitterFinishBlock()
447 self->last_histogram_ix_[0] = split->num_types * num_contexts; in ContextBlockSplitterFinishBlock()
448 for (i = 0; i < num_contexts; ++i) { in ContextBlockSplitterFinishBlock()
449 last_entropy[num_contexts + i] = last_entropy[i]; in ContextBlockSplitterFinishBlock()
454 self->curr_histogram_ix_ += num_contexts; in ContextBlockSplitterFinishBlock()
467 for (i = 0; i < num_contexts; ++i) { in ContextBlockSplitterFinishBlock()
469 combined_histo[num_contexts + i]; in ContextBlockSplitterFinishBlock()
470 last_entropy[num_contexts + i] = last_entropy[i]; in ContextBlockSplitterFinishBlock()
471 last_entropy[i] = combined_entropy[num_contexts + i]; in ContextBlockSplitterFinishBlock()
481 for (i = 0; i < num_contexts; ++i) { in ContextBlockSplitterFinishBlock()
485 last_entropy[num_contexts + i] = last_entropy[i]; in ContextBlockSplitterFinishBlock()
497 *self->histograms_size_ = split->num_types * num_contexts; in ContextBlockSplitterFinishBlock()
517 size_t num_contexts, in MapStaticContexts() argument
529 uint32_t offset = (uint32_t)(i * num_contexts); in MapStaticContexts()
541 const size_t num_contexts, const uint32_t* static_context_map, in BrotliBuildMetaBlockGreedyInternal() argument
555 if (num_contexts == 1) { in BrotliBuildMetaBlockGreedyInternal()
560 InitContextBlockSplitter(m, &lit_blocks.ctx, 256, num_contexts, 512, 400.0, in BrotliBuildMetaBlockGreedyInternal()
580 if (num_contexts == 1) { in BrotliBuildMetaBlockGreedyInternal()
603 if (num_contexts == 1) { in BrotliBuildMetaBlockGreedyInternal()
614 if (num_contexts > 1) { in BrotliBuildMetaBlockGreedyInternal()
615 MapStaticContexts(m, num_contexts, static_context_map, mb); in BrotliBuildMetaBlockGreedyInternal()
626 size_t num_contexts, in BrotliBuildMetaBlockGreedy() argument
631 if (num_contexts == 1) { in BrotliBuildMetaBlockGreedy()
636 prev_byte2, literal_context_lut, num_contexts, static_context_map, in BrotliBuildMetaBlockGreedy()