Lines Matching refs:br
151 static int ParseSegmentHeader(VP8BitReader* br,
153 assert(br != NULL);
155 hdr->use_segment_ = VP8Get(br);
157 hdr->update_map_ = VP8Get(br);
158 if (VP8Get(br)) { // update data
160 hdr->absolute_delta_ = VP8Get(br);
162 hdr->quantizer_[s] = VP8Get(br) ? VP8GetSignedValue(br, 7) : 0;
165 hdr->filter_strength_[s] = VP8Get(br) ? VP8GetSignedValue(br, 6) : 0;
171 proba->segments_[s] = VP8Get(br) ? VP8GetValue(br, 8) : 255u;
177 return !br->eof_;
191 VP8BitReader* const br = &dec->br_;
198 dec->num_parts_ = 1 << VP8GetValue(br, 2);
219 static int ParseFilterHeader(VP8BitReader* br, VP8Decoder* const dec) {
221 hdr->simple_ = VP8Get(br);
222 hdr->level_ = VP8GetValue(br, 6);
223 hdr->sharpness_ = VP8GetValue(br, 3);
224 hdr->use_lf_delta_ = VP8Get(br);
226 if (VP8Get(br)) { // update lf-delta?
229 if (VP8Get(br)) {
230 hdr->ref_lf_delta_[i] = VP8GetSignedValue(br, 6);
234 if (VP8Get(br)) {
235 hdr->mode_lf_delta_[i] = VP8GetSignedValue(br, 6);
241 return !br->eof_;
250 VP8BitReader* br;
356 br = &dec->br_;
357 VP8InitBitReader(br, buf, buf + frm_hdr->partition_length_);
362 pic_hdr->colorspace_ = VP8Get(br);
363 pic_hdr->clamp_type_ = VP8Get(br);
365 if (!ParseSegmentHeader(br, &dec->segment_hdr_, &dec->proba_)) {
370 if (!ParseFilterHeader(br, dec)) {
386 dec->buffer_flags_ = VP8Get(br) << 0; // update golden
387 dec->buffer_flags_ |= VP8Get(br) << 1; // update alt ref
389 dec->buffer_flags_ |= VP8GetValue(br, 2) << 2;
392 dec->buffer_flags_ |= VP8GetValue(br, 2) << 4;
394 dec->buffer_flags_ |= VP8Get(br) << 6; // sign bias golden
395 dec->buffer_flags_ |= VP8Get(br) << 7; // sign bias alt ref
406 dec->update_proba_ = VP8Get(br);
412 (frm_hdr->key_frame_ || VP8Get(br)) << 8; // refresh last frame
414 VP8Get(br); // just ignore the value of update_proba_
417 VP8ParseProba(br, dec);
468 static int GetLargeValue(VP8BitReader* const br, const uint8_t* const p) {
470 if (!VP8GetBit(br, p[3])) {
471 if (!VP8GetBit(br, p[4])) {
474 v = 3 + VP8GetBit(br, p[5]);
477 if (!VP8GetBit(br, p[6])) {
478 if (!VP8GetBit(br, p[7])) {
479 v = 5 + VP8GetBit(br, 159);
481 v = 7 + 2 * VP8GetBit(br, 165);
482 v += VP8GetBit(br, 145);
486 const int bit1 = VP8GetBit(br, p[8]);
487 const int bit0 = VP8GetBit(br, p[9 + bit1]);
491 v += v + VP8GetBit(br, *tab);
501 static int GetCoeffs(VP8BitReader* const br, ProbaArray prob,
505 if (!VP8GetBit(br, p[0])) { // first EOB is more a 'CBP' bit.
510 if (!VP8GetBit(br, p[1])) {
514 if (!VP8GetBit(br, p[2])) {
518 v = GetLargeValue(br, p);
521 out[kZigzag[n]] = VP8GetSigned(br, v) * dq[n > 0];
522 if (n < 15 && !VP8GetBit(br, p[0])) { // EOB
636 VP8BitReader* const br = &dec->br_;
644 dec->segment_ = !VP8GetBit(br, dec->proba_.segments_[0]) ?
645 VP8GetBit(br, dec->proba_.segments_[1]) :
646 2 + VP8GetBit(br, dec->proba_.segments_[2]);
648 info->skip_ = dec->use_skip_proba_ ? VP8GetBit(br, dec->skip_p_) : 0;
650 VP8ParseIntraMode(br, dec);
651 if (br->eof_) {